Skip to main content
Statistics LibreTexts

8.3: Hypothesis Test for One Mean

  • Page ID
    24057
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    There are three methods used to test hypotheses:

    The Traditional Method (Critical Value Method)

    There are five steps in hypothesis testing when using the traditional method:

    1. Identify the claim and formulate the hypotheses.
    2. Compute the test statistic.
    3. Compute the critical value(s) and state the rejection rule (the rule by which you will reject the null hypothesis (H0).
    4. Make the decision to reject or not reject the null hypothesis by comparing the test statistic to the critical value(s). Reject H0 when the test statistic is in the critical tail(s).
    5. Summarize the results and address the claim using context and units from the research question.

    Steps ii and iii do not have to be in that order so make sure you know the difference between the critical value, which comes from the stated significance level \(\alpha\), and the test statistic, which is calculated from the sample data.

    Note: The test statistic and the critical value(s) come from the same distribution and will usually have the same letter such as z, t, or F. The critical value(s) will have a subscript with the lower tail area \((z_{\alpha}, z_{1–\alpha}, z_{\alpha / 2})\) or an asterisk next to it (z*) to distinguish it from the test statistic.

    You can find the critical value(s) or test statistic in any order, but make sure you know the difference when you compare the two. The critical value is found from α and is the start of the shaded area called the critical region (also called rejection region or area). The test statistic is computed using sample data and may or may not be in the critical region.

    The critical value(s) is set before you begin (a priori) by the level of significance you are using for your test. This critical value(s) defines the shaded area known as the rejection area. The test statistic for this example is the z-score we find using the sample data that is then compared to the shaded tail(s). When the test statistic is in the shaded rejection area, you reject the null hypothesis. When your test statistic is not in the shaded rejection area, then you fail to reject the null hypothesis. Depending on if your claim is in the null or the alternative, the sample data may or may not support your claim.

    The P-value Method

    Most modern statistics and research methods utilize this method with the advent of computers and graphing calculators.

    There are five steps in hypothesis testing when using the p-value method:

    1. Identify the claim and formulate the hypotheses.
    2. Compute the test statistic.
    3. Compute the p-value.
    4. Make the decision to reject or not reject the null hypothesis by comparing the p-value with \(\alpha\). Reject H0 when the p-value ≤ \(\alpha\).
    5. Summarize the results and address the claim.

    The ideas below review the process of evaluating hypothesis tests with p-values:

    • The null hypothesis represents a skeptic’s position or a position of no difference. We reject this position only if the evidence strongly favors the alternative hypothesis.
    • A small p-value means that if the null hypothesis is true, there is a low probability of seeing a point estimate at least as extreme as the one we saw. We interpret this as strong evidence in favor of the alternative hypothesis.
    • The p-value is constructed in such a way that we can directly compare it to the significance level (\(\alpha\)) to determine whether to reject H0. We reject the null hypothesis if the p-value is smaller than the significance level, \(\alpha\), which is usually 0.05. Otherwise, we fail to reject H0.
    • We should always state the conclusion of the hypothesis test in plain language use context and units so non-statisticians can also understand the results.

    The Confidence Interval Method (results are in the same units as the data)

    There are four steps in hypothesis testing when using the confidence interval method:

    1. Identify the claim and formulate the hypotheses.
    2. Compute confidence interval.
    3. Make the decision to reject or not reject the null hypothesis by comparing the p-value with \(\alpha\). Reject H0 when the hypothesized value found in H0 is outside the bounds of the confidence interval. We only will be doing a two-tailed version of this.
    4. Summarize the results and address the claim.

    For all 3 methods, Step i is the most important step. If you do not correctly set up your hypotheses then the next steps will be incorrect.

    The decision and summary would be the same no matter which method you use. Figure 8-12 is a flow chart that may help with starting your summaries, but make sure you finish the sentence with context and units from the question.

    clipboard_e1140413bcf9562500c92f289898037f4.png

    Figure 8-12

    The hypothesis-testing framework is a very general tool, and we often use it without a second thought. If a person makes a somewhat unbelievable claim, we are initially skeptical. However, if there is sufficient evidence that supports the claim, we set aside our skepticism and reject the null hypothesis in favor of the alternative.

    8.3.1 Z-Test

    When the population standard deviation is known and stated in the problem, we will use the z-test.

    The z-test is a statistical test for the mean of a population. It can be used when σ is known. The population should be approximately normally distributed when n < 30.

    When using this model, the test statistic is \(Z=\frac{\bar{x}-\mu_{0}}{\left(\frac{\sigma}{\sqrt{n}}\right)}\) where µ0 is the test value from the H0.

    M&Ms candies advertise a mean weight of 0.8535 grams. A sample of 50 M&M candies are randomly selected from a bag of M&Ms and the mean is found to be \(\overline{ x }\) = 0.8472 grams. The standard deviation of the weights of all M&Ms is (somehow) known to be σ = 0.06 grams. A skeptic M&M consumer claims that the mean weight is less than what is advertised. Test this claim using the traditional method of hypothesis testing. Use a 5% level of significance.

    Solution

    By letting \(\alpha\) = 0.05, we are allowing a 5% chance that the null hypothesis (average weight that is at least 0.8535 grams) is rejected when in actuality it is true.

    1. Identify the Claim: The claim is “M&Ms candies have a mean weight that is less than 0.8535 grams.” This translates mathematically to µ < 0.8535 grams. Therefore, the null and alternative hypotheses are:

    H0: µ = 0.8535

    H1: µ < 0.8535 (claim)

    This is a left-tailed test since the alternative hypothesis has a “less than” sign.

    We are performing a test about a population mean. We can use the z-test because we were given a population standard deviation σ (not a sample standard deviation s). In practice, σ is rarely known and usually comes from a similar study or previous year’s data.

    2. Find the Critical Value: The critical value for a left-tailed test with a level of significance \(\alpha\) = 0.05 is found in a way similar to finding the critical values from confidence intervals. Because we are using the z-test, we must find the critical value \(z_{\alpha}\) from the z (standard normal) distribution.

    This is a left-tailed test since the sign in the alternative hypothesis is < (most of the time a left-tailed test will have a negative z-score test statistic).

    clipboard_e30dde96c4893d599ab1beb1114682332.png

    Figure 8-13

    First draw your curve and shade the appropriate tale with the area \(\alpha\) = 0.05. Usually the technology you are using only asks for the area in the left tail, which in this case is \(\alpha\) = 0.05. For the TI calculators, under the DISTR menu use invNorm(0.05,0,1) = –1.645. See Figure 8-13.

    For Excel use =NORM.S.INV(0.05).

    3. Find the Test Statistic: The formula for the test statistic is the z-score that we used back in the Central Limit Theorem section \(z=\frac{\bar{x}-\mu_{0}}{\left(\frac{\sigma}{\sqrt{n}}\right)}=\frac{0.8472-0.8535}{\left(\frac{0.06}{\sqrt{50}}\right)}=-0.7425\).

    4. Make the Decision: Figure 8-14 shows both the critical value and the test statistic. There are only two possible correct answers for the decision step.

    i. Reject H0

    ii. Fail to reject H0

    clipboard_e7d1b91a777de3955030ec329dee1860c.png

    Figure 8-14

    To make the decision whether to “Do not reject H0” or “Reject H0” using the traditional method, we must compare the test statistic z = –0.7425 with the critical value zα = –1.645.

    When the test statistic is in the shaded tail, called the rejection area, then we would reject H0, if not then we fail to reject H0. Since the test statistic z ≈ –0.7425 is in the unshaded region, the decision is: Do not reject H0.

    5. Summarize the Results: At 5% level of significance, there is not enough evidence to support the claim that the mean weight is less than 0.8535 grams.

    Example 8-5 used the traditional critical value method. With the onset of computers, this method is outdated and the p-value and confidence interval methods are becoming more popular.

    Most statistical software packages will give a p-value and confidence interval but not the critical value.

    TI-84: Press the [STAT] key, go to the [TESTS] menu, arrow down to the [Z-Test] option and press the [ENTER] key. Arrow over to the [Stats] menu and press the [ENTER] key. Then type in value for the hypothesized mean (µ0), standard deviation, sample mean, sample size, arrow over to the \(\neq\), <, > sign that is in the alternative hypothesis statement then press the [ENTER] key, arrow down to [Calculate] and press the [ENTER] key. Alternatively (If you have raw data in a list) Select the [Data] menu and press the [ENTER] key. Then type in the value for the hypothesized mean (µ0), type in your list name (TI-84 L1 is above the 1 key).

    clipboard_e84bcfd52053cf54117018344a8499a9d.png

    Press the [STAT] key, go to the [TESTS] menu, arrow down to either the [Z-Test] option and press the [ENTER] key. Arrow over to the [Stats] menu and press the [ENTER] key. Then type in value for the hypothesized mean (µ0), standard deviation, sample mean, sample size, arrow over to the \(\neq\), <, > sign that is in the alternative hypothesis statement then press the [ENTER] key, arrow down to [Calculate] and press the [ENTER] key. Alternatively (If you have raw data in a list) Select the [Data] menu and press the [ENTER] key. Then type in the value for the hypothesized mean (µ0), type in your list name (TI-84 L1 is above the 1 key).

    clipboard_e40992627be2973329e831eef7c18a74d.png

    The calculator returns the alternative hypothesis (check and make sure you selected the correct sign), the test statistic, p-value, sample mean, and sample size.

    TI-89: Go in to the Stat/List Editor App. Select [F6] Tests. Select the first option Z-Test. Select Data if you have raw data in a list, select Stats if you have the summarized statistics given to you in the problem. If you have data, press [2nd] Var-Link, the go down to list1 in the main folder to select the list name. If you have statistics then enter the values. Leave Freq:1 alone, arrow over to the \(\neq\), <, > sign that is in the alternative hypothesis statement then press the [ENTER]key, arrow down to [Calculate] and press the [ENTER] key. The calculator returns the test statistic and the p-value.

    clipboard_e2e00e29f95abe7de3f5f9594417245e7.png


    What is the p-value?

    The p-value is the probability of observing an effect as least as extreme as in your sample data, assuming that the null hypothesis is true. The p-value is calculated based on the assumptions that the null hypothesis is true for the population and that the difference in the sample is caused entirely by random chance.

    Recall the example at the beginning of the chapter.

    Suppose a manufacturer of a new laptop battery claims the mean life of the battery is 900 days with a standard deviation of 40 days. You are the buyer of this battery and you think this claim is inflated. You would like to test your belief because without a good reason you cannot get out of your contract. You take a random sample of 35 batteries and find that the mean battery life is 890 days. Test the claim using the p-value method. Let \(\alpha\) = 0.05.

    Solution

    We had the following hypotheses:

    H0: μ = 900, since the manufacturer says the mean life of a battery is 900 days.

    H1: μ < 900, since you believe the mean life of the battery is less than 900 days.

    The test statistic was found to be: \(Z=\frac{\bar{x}-\mu_{0}}{\left(\frac{\sigma}{\sqrt{n}}\right)}=\frac{890-900}{\left(\frac{40}{\sqrt{35}}\right)}=-1.479\).

    The p-value is P(\(\overline{ x }\) < 890 | H0 is true) = P(\(\overline{ x }\)< 890 | μ = 900) = P(Z < –1.479).

    On the TI Calculator use normalcdf(-1E99,890,900,40/\(\sqrt{35}\)) \(\approx\) 0.0696. See Figure 8-15.

    clipboard_e4da98f35311c37ecda88f5e7fe48fe2e.png

    Figure 8-15

    Alternatively, in Excel use =NORM.DIST(890,900,40/SQRT(35),TRUE) \(\approx\) 0.0696.

    clipboard_e8cf70bc4aa8ffbbe69077034f968135b.png

    The TI calculators will easily find the p-value for you.

    clipboard_e53381c2d9a67d1ae7089a5ec2247d34b.png

    Now compare the p-value = 0.0696 to \(\alpha\) = 0.05. Make the decision to reject or not reject the null hypothesis by comparing the p-value with \(\alpha\). Reject H0 when the p-value ≤ α, and do not reject H0 when the p-value > \(\alpha\). The p-value for this example is larger than alpha 0.0696 > 0.05, therefore the decision is to not reject H0.

    Since we fail to reject the null, there is not enough evidence to indicate that the mean life of the battery is less than 900 days.


    8.3.2 T-Test

    When the population standard deviation is unknown, we will use the t-test.

    The t-test is a statistical test for the mean of a population. It will be used when σ is unknown. The population should be approximately normally distributed when n < 30.

    When using this model, the test statistic is \(t=\frac{\bar{x}-\mu_{0}}{\left(\frac{s}{\sqrt{n}}\right)}\) where µ0 is the test value from the H0. The degrees of freedom are df = n – 1.

    Z Versus T

    The z and t-tests are easy to mix up. Sometimes a standard deviation will be stated in the problem without specifying if it is a population’s standard deviation σ or the sample standard deviation s. If the standard deviation is in the same sentence that describes the sample or only raw data is given then this would be s. When you only have sample data, use the t-test.

    Figure 8-16 is a flow chart to remind you when to use z versus t.

    clipboard_e81d4ef166161821bd95dc4f6bbe41a1b.png

    Figure 8-16

    Use Figure 8-17 as a guide in setting up your hypotheses. The two-tailed test will always have a not equal ≠ sign in H1 and both tails shaded. The right-tailed test will always have the greater than > sign in H1 and the right tail shaded. The left-tailed test will always have a less than < sign in H1 and the left tail shaded.

    clipboard_ef6be25246ae148e1db8fb754cb98c10d.png

    Figure 8-17

    The label on a particular brand of cream of mushroom soup states that (on average) there is 870 mg of sodium per serving. A nutritionist would like to test if the average is actually more than the stated value. To test this, 13 servings of this soup were randomly selected and amount of sodium measured. The sample mean was found to be 882.4 mg and the sample standard deviation was 24.3 mg. Assume that the amount of sodium per serving is normally distributed. Test this claim using the traditional method of hypothesis testing. Use the \(\alpha\) = 0.05 level of significance.

    Solution

    Step 1: State the hypotheses and identify the claim: The statement “the average is more (>) than 870” must be in the alternative hypothesis. Therefore, the null and alternative hypotheses are:

    H0: µ = 870

    H1: µ > 870 (claim)

    This is a right-tailed test with the claim in the alternative hypothesis.

    Step 2: Compute the test statistic: We are using the t-test because we are performing a test about a population mean. We must use the t-test (instead of the z-test) because the population standard deviation σ is unknown. (Note: be sure that you know why we are using the t-test instead of the z-test in general.)

    The formula for the test statistic is \(t=\frac{\bar{x}-\mu_{0}}{\left(\frac{S}{\sqrt{n}}\right)}=\frac{882.4-870}{\left(\frac{24.3}{\sqrt{13}}\right)}=1.8399\).

    Note: If you were given raw data use 1-var Stats on your calculator to find the sample mean, sample size and sample standard deviation.

    Step 3: Compute the critical value(s): The critical value for a right-tailed test with a level of significance \(\alpha\) = 0.05 is found in a way similar to finding the critical values from confidence intervals.

    Since we are using the t-test, we must find the critical value t1–\(\alpha\) from a t-distribution with the degrees of freedom, df = n – 1 = 13 –1 = 12. Use the DISTR menu invT option. Note that if you have an older TI-84 or a TI-83 calculator you need to have the invT program installed or use Excel.

    Draw and label the t-distribution curve with the critical value as in Figure 8-18.

    clipboard_e2073659de08a6b4aeecacf48f025219e.png

    Figure 8-18

    The critical value is t1–\(\alpha\) = 1.782 and the rejection rule becomes: Reject H0 if the test statistic t ≥ t1–\(\alpha\) = 1.782.

    Step 4: State the decision. Decision: Since the test statistic t =1.8399 is in the critical region, we should Reject H0.

    Step 5: State the summary. Summary: At the 5% significance level, we have sufficient evidence to say that the average amount of sodium per serving of cream of mushroom soup exceeds the stated 870 mg amount.

    Example 8-7 Continued:

    Use the prior example, but this time use the p-value method. Again, let the significance level be \(\alpha\) = 0.05.

    Solution

    Step 1: The hypotheses remain the same. H0: µ = 870

    H1: µ > 870 (claim)

    Step 2: The test statistic remains the same, \(t=\frac{\bar{x}-\mu_{0}}{\left(\frac{S}{\sqrt{n}}\right)}=\frac{882.4-870}{\left(\frac{24.3}{\sqrt{13}}\right)}=1.8399\).

    Step 3: Compute the p-value.

    For a right-tailed test, the p-value is found by finding the area to the right of the test statistic t = 1.8339 under a tdistribution with 12 degrees of freedom. See Figure 8-19.

    clipboard_e31493abc8d7bd3d835479d9e187566db.png

    Figure 8-19

    Note that exact p-values for a t-test can only be found using a computer or calculator. For the TI calculators this is in the DISTR menu. Use tcdf(lower,upper,df).

    For this example, we would have p-value = tcdf(1.8399,∞,12) = 0.0453.

    The p-value is the probability of observing an effect as least as extreme as in your sample data, assuming that the null hypothesis is true. The p-value is calculated based on the assumptions that the null hypothesis is true for the population and that the difference in the sample is caused entirely by random chance.

    Step 4: State the decision. The rejection rule: reject the null hypothesis if the p-value ≤ \(\alpha\). Decision: Since the p-value = 0.0453 is less than \(\alpha\) = 0.05, we Reject H0. This agrees with the decision from the traditional method. (These two methods should always agree!)

    Step 5: State the summary. The summary remains the same as in the previous method. At the 5% significance level, we have sufficient evidence to say that the average amount of sodium per serving of cream of mushroom soup exceeds the stated 870 mg amount.

    We can use technology to get the test statistic and p-value.

    TI-84: If you have raw data, enter the data into a list before you go to the test menu. Press the [STAT] key, arrow over to the [TESTS] menu, arrow down to the [2:T-Test] option and press the [ENTER] key. Arrow over to the [Stats] menu and press the [ENTER] key. Then type in the hypothesized mean (µ0), sample or population standard deviation, sample mean, sample size, arrow over to the \(\neq\), <, > sign that is the same as the problem’s alternative hypothesis statement then press the [ENTER] key, arrow down to [Calculate] and press the [ENTER] key. The calculator returns the t-test statistic and p-value.

    clipboard_e1f7ce7702f1fd056f927e431cd9249a6.png

    Alternatively (If you have raw data in list one) Arrow over to the [Data] menu and press the [ENTER] key. Then type in the hypothesized mean (µ0), L1, leave Freq:1 alone, arrow over to the \(\neq\), <, > sign that is the same in the problem’s alternative hypothesis statement then press the [ENTER] key, arrow down to [Calculate] and press the [ENTER] key. The calculator returns the t-test statistic and the p-value.

    TI-89: Go to the [Apps] Stat/List Editor, then press [2nd] then F6 [Tests], then select 2: T-Test. Choose the input method, data is when you have entered data into a list previously or stats when you are given the mean and standard deviation already. Then type in the hypothesized mean (μ0), sample standard deviation, sample mean, sample size (or list name (list1), and Freq: 1), arrow over to the \(\neq\), <, > and select the sign that is the same as the problem’s alternative hypothesis statement then press the [ENTER] key to calculate. The calculator returns the t-test statistic and p-value.

    clipboard_ee6ee07b247a8dbe3c99babfd60690494.png

    The weight of the world’s smallest mammal is the bumblebee bat (also known as Kitti’s hog-nosed bat or Craseonycteris thonglongyai) is approximately normally distributed with a mean 1.9 grams. Such bats are roughly the size of a large bumblebee. A chiropterologist believes that the Kitti’s hog-nosed bats in a new geographical region under study has a different average weight than 1.9 grams. A sample of 10 bats weighed in grams in the new region are shown below. Use the confidence interval method to test the claim that mean weight for all bumblebee bats is not 1.9 g using a 10% level of significance.

    clipboard_eded04400d8044b884aaddc3055aeac28.png

    Solution

    Step 1: State the hypotheses and identify the claim. The key phrase is “mean weight not equal to 1.9 g.” In mathematical notation, this is μ ≠ 1.9. The not equal ≠ symbol is only allowed in the alternative hypothesis so the hypotheses would be:

    H0: μ = 1.9

    H1: μ ≠ 1.9

    Step 2: Compute the confidence interval. First, find the t critical value using df = n – 1 = 9 and 90% confidence. In Excel t\(\alpha\)/2 = T.INV(.1/2,9) = 1.833113.

    Then use technology to find the sample mean and sample standard deviation and substitute in your numbers to the formula.

    \(\begin{aligned}
    &\bar{x} \pm t_{\alpha / 2}\left(\frac{s}{\sqrt{n}}\right) \\
    &\Rightarrow 1.985 \pm 1.833113\left(\frac{0.235242}{\sqrt{10}}\right) \\
    &\Rightarrow 1.985 \pm 1.833113(0.07439) \\
    &\Rightarrow 1.985 \pm 0.136365 \\
    &\Rightarrow(1.8486,2.1214)
    \end{aligned}\)

    The answer can be given as an inequality 1.8486 < µ < 2.1214

    or in interval notation (1.8486, 2.1214).

    Step 3: Make the decision: The rejection rule is to reject H0 when the hypothesized value found in H0 is outside the bounds of the confidence interval. The null hypothesis was μ = 1.9 g. Since 1.9 is between the lower and upper boundary of the confidence interval 1.8486 < µ < 2.1214 then we would not reject H0.

    The sampling distribution, assuming the null hypothesis is true, will have a mean of μ = 1.9 and a standard error of \(\frac{0.2352}{\sqrt{10}}=0.07439\). When we calculated the confidence interval using the sample mean of 1.985 the confidence interval captured the hypothesized mean of 1.9. See Figure 8-20.

    clipboard_e1ff990721e3ff41b0f17bc336941ad97.png

    Figure 8-20

    Step 4: State the summary: At the 10% significance level, there is not enough evidence to support the claim that the population mean weight for bumblebee bats in the new geographical region is different from 1.9 g.

    This interval can also be computed using a TI calculator or Excel.

    TI-84: Enter the data in a list, choose Tests > TInterval. Select and highlight Data, change the list and confidence level to match the question. Choose Calculate.

    clipboard_e05f42f706148f07b9c5b947adde95723.png

    Excel: Select Data Analysis > Descriptive Statistics: Note, you will need to change the cell reference numbers to where you copy and paste your data, only check the label box if you selected the label in the input range, and change the confidence level to 1 – \(\alpha\).

    clipboard_ee0f9e73c4603bccdf7780454d5d6d5de.png

    Below is the Excel output. Excel only calculates the descriptive statistics with the margin of error.

    clipboard_efad58f58634f5aa4fb0915e33cd36ab3.png

    Use Excel to find each piece of the interval \(\bar{x} \pm t_{\alpha / 2}\left(\frac{s}{\sqrt{n}}\right)\).

    Excel \(t_{\alpha / 2}\) = T.INV(0.1/2,9) = 1.8311.

    \(\begin{aligned}
    &\bar{x} \pm t_{\alpha / 2}\left(\frac{s}{\sqrt{n}}\right) \\
    &\Rightarrow 1.985 \pm 1.8311\left(\frac{0.2352}{\sqrt{10}}\right) \\
    &\Rightarrow 1.985 \pm 1.8311(0.07439)
    \end{aligned}\)

    Can you find the mean and standard error \(\frac{s}{\sqrt{n}}=0.07439\) in the Excel output?

    \(\Rightarrow 1.985 \pm 0.136365\)

    Can you find the margin of error \(t_{\frac{\alpha}{2}}\left(\frac{s}{\sqrt{n}}\right)=0.136365\) in the Excel output?

    Subtract and add the margin of error from the sample mean to get each confidence interval boundary (1.8486, 2.1214).

    If we have raw data, Excel will do both the traditional and p-value method.

    Example 8-8 Continued:

    Use the prior example, but this time use the p-value method. Again, let the significance level be \(\alpha\) = 0.05.

    Solution

    Step 1: State the hypotheses. The hypotheses are: H0: μ = 1.9

    H1: μ ≠ 1.9

    Step 2: Compute the test statistic, \(t=\frac{\bar{x}-\mu_{0}}{\left(\frac{s}{\sqrt{n}}\right)}=\frac{1.985-1.9}{\left(\frac{.235242}{\sqrt{10}}\right)}=1.1426\)

    Verify using Excel. Excel does not have a one-sample t-test, but it does have a twosample t-test that can be used with a dummy column of zeros as the second sample to get the results for just one sample. Copy over the data into cell A1. In column B, next to the data, type in a dummy column of zeros, and label it Dummy. (We frequently use placeholders in statistics called dummy variables.)

    clipboard_e8fe4ea3b1ac9776d898cad2e7ebc32c2.png

    Select the Data Analysis tool and then select t-Test: Paired Two Sample for Means, then select OK.

    clipboard_e3e25b9a5546cfb3adc2524d7d021a559.png

    For the Variable 1 Range select the data in cells A1:A11, including the label. For the Variable 2 Range select the dummy column of zeros in cells B1:B11, including the label. Change the hypothesized mean to 1.9. Check the Labels box and change the alpha value to 0.10, then select OK.

    clipboard_e0cb7805c1a1e3d2f112ec1e586082c82.png

    Excel provides the following output:

    clipboard_edb0ff9a634588c2198429949099261bc.png

    Step 3: Compute the p-value. Since the alternative hypothesis has a ≠ symbol, use the Excel output next two-tailed p-value = 0.2826.

    Step 4: Make the decision. For the p-value method we would compare the two-tailed p-value = 0.2826 to \(\alpha\) = 0.10. The rule is to reject H0 if the p-value ≤ \(\alpha\). In this case the p-value > \(\alpha\), therefore we do not reject H0. Again, the same decision as the confidence interval method.

    For the critical value method, we would compare the test statistic t = 1.142625 with the critical values for a twotailed test \(t_{\frac{\alpha}{2}}\) = ±1.833113. Since the test statistic is between –1.8331 and 1.8331 we would not reject H0, which is the same decision using the p-value method or the confidence interval method.

    Step 5: State the summary. There is not enough evidence to support the claim that the population mean weight for all bumblebee bats is not equal to 1.9 g.

    One-Tailed Versus Two-Tailed Tests

    Most software packages do not ask which tailed test you are performing. Make sure you look at the sign in the alternative hypothesis to and determine which p-value to use. The difference is just what part of the picture you are looking at. In Excel, the critical value shown is for a one-tail test and does not specify left or right tail. The critical value in the output will always be positive, it is up to you to know if the critical value should be a negative or positive value. For example, Figures 8-21, 8-22, and 8-23 uses df = 9, \(\alpha\) = 0.10 to show all three tests comparing either the test statistic with the critical value or the p-value with \(\alpha\).

    Two-Tailed Test

    The test statistic can be negative or positive depending on what side of the distribution it falls; however, the p-value is a probability and will always be a positive number between 0 and 1. See Figure 8-21.

    clipboard_e5ee81ac959096119cce3bfbdab8735e2.png

    Figure 8-21

    Right-Tailed Test

    If we happened to do a right-tailed test with df = 9 and \(\alpha\) = 0.10, the critical value t1-\(\alpha\) = 1.383 will be in the right tail and usually the test statistic will be a positive number. See Figure 8-22.

    clipboard_e7fe1f5f4c7373d90184ab24f2ffd3be4.png

    Figure 8-22

    Left-Tailed Test

    If we happened to do a left-tailed test with df = 9 and \(\alpha\) = 0.10, the critical value t\(\alpha\) = –1.383 will be in the left tail and usually the test statistic will be a negative number. See Figure 8-23.

    clipboard_ee09b4c2bae7bf3f01077a238ffbefc0a.png

    Figure 8-23


    This page titled 8.3: Hypothesis Test for One Mean is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Rachel Webb via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.