#set document(title: "8.3 Hypothesis Test for One Mean", author: "Rachel Webb") #set page(width: 8.5in, height: auto, margin: 1in) #import "@preview/cetz:0.5.2" #set text(font: ("STIX Two Text", "Libertinus Serif", "New Computer Modern"), size: 10.5pt, lang: "en") #show math.equation: set text(font: ("STIX Two Math", "New Computer Modern Math")) #set par(justify: true, leading: 0.62em, spacing: 0.9em) #set enum(spacing: 1.1em) // room between list items so tall inline fractions don't collide #set list(spacing: 1.1em) #set table(stroke: 0.5pt + rgb("#c7ccd3")) #let BLUE = rgb("#183B6F") // brand navy — section bars + example/solution labels (white on navy 11.09:1) #let ORANGE = rgb("#A94509") // brand primary-700 — AA-safe deep orange for TEXT (5.93:1 on white; raw brand #F37021 is 2.94:1 and must never carry text) #let RED = rgb("#DC2626") // brand error-600 #let GREEN = rgb("#059669") // brand success-600 (decoration only; small green text uses green-text #007942) #show heading.where(level: 1): it => block(width: 100%, above: 0pt, below: 16pt, fill: gradient.linear(BLUE, rgb("#2C5AA0")), inset: (x: 14pt, y: 12pt), radius: 3pt, text(fill: white, weight: "bold", size: 19pt, it.body)) #show heading.where(level: 2): it => block(width: 100%, above: 18pt, below: 10pt, fill: BLUE, inset: (x: 10pt, y: 6pt), radius: 2pt, text(fill: white, weight: "bold", size: 12pt, it.body)) #show heading.where(level: 3): it => text(fill: ORANGE, weight: "bold", size: 12.5pt, it.body) #show heading.where(level: 4): it => text(fill: BLUE, weight: "bold", size: 10.5pt, it.body) #let examplebox(label, title, body) = block(width: 100%, breakable: true, fill: rgb("#EFF1F5"), stroke: 0.5pt + rgb("#CFDDF0"), radius: 4pt, inset: 10pt, above: 12pt, below: 12pt)[ #block(below: 6pt)[#box(fill: BLUE, inset: (x: 6pt, y: 2pt), radius: 2pt, text(fill: white, weight: "bold", size: 8.5pt, label)) #h(0.4em) #strong[#title]] #body] // rail = decorative left rule (raw brand token); labelcolor = AA-safe label text shade #let notebox(label, rail, labelcolor, tint, body) = block(width: 100%, breakable: true, fill: tint, stroke: (left: 3pt + rail), inset: (left: 10pt, rest: 8pt), radius: (right: 4pt), above: 11pt, below: 11pt)[ #text(fill: labelcolor, weight: "bold", size: 7.5pt, tracking: 0.5pt)[#upper(label)] #linebreak() #body] #let solutionbox(body) = block(above: 4pt, below: 8pt)[ #text(fill: BLUE, weight: "bold", size: 8.5pt)[Solution] #linebreak() #body] #let figph(msg) = block(width: 100%, height: 60pt, fill: rgb("#f6f7f9"), stroke: (paint: rgb("#c7ccd3"), dash: "dashed"), radius: 4pt, inset: 10pt)[ #align(center + horizon, text(fill: rgb("#889"), style: "italic", size: 9pt, msg))] // Standardize inlined figure sizes: measure the natural CeTZ canvas, then scale to a // consistent envelope (aspect-aware; see build_typst.py FIG_* constants). Unlike the // print preamble, dimensions are FLOORED: in an editor a user can trim a figure to a // degenerate 1-D shape (a bare line), and w/h or tw/w would then divide by zero. #let _STD_W = 3.5 #let _WIDE_W = 5.6 #let _MAX_H = 3.4 #let _ASPECT_WIDE = 2.2 #let _UPSCALE_MAX = 1.15 #let stdfig(body) = context { let m = measure(body) let w = calc.max(m.width / 1in, 0.01) let h = calc.max(m.height / 1in, 0.01) let tw = if w / h > _ASPECT_WIDE { _WIDE_W } else { _STD_W } let s = calc.min(tw / w, _MAX_H / h, _UPSCALE_MAX) align(center, box(scale(x: s * 100%, y: s * 100%, reflow: true, body))) } #show figure: set block(breakable: false) #set figure(gap: 8pt) #show figure.caption: set text(size: 8.5pt, fill: rgb("#555")) == 8.3#h(0.6em)Hypothesis Test for One Mean 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: + Identify the claim and formulate the hypotheses. + Compute the test statistic. + Compute the critical value(s) and state the rejection rule (the rule by which you will reject the null hypothesis (H#sub[0]). + Make the decision to reject or not reject the null hypothesis by comparing the test statistic to the critical value(s). Reject H#sub[0] when the test statistic is in the critical tail(s). + 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 #math.equation(block: false, alt: "α")[$α$], 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 #math.equation(block: false, alt: "open parenthesis z sub α , z sub 1 – α , z sub α / 2 close parenthesis")[$( z_(α) , z_(1 – α) , z_(α / 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: + Identify the claim and formulate the hypotheses. + Compute the test statistic. + Compute the p-value. + Make the decision to reject or not reject the null hypothesis by comparing the p-value with #math.equation(block: false, alt: "α")[$α$]. Reject H0 when the p-value ≤ #math.equation(block: false, alt: "α")[$α$]. + 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 (#math.equation(block: false, alt: "α")[$α$]) to determine whether to reject H#sub[0]. We reject the null hypothesis if the p-value is smaller than the significance level, #math.equation(block: false, alt: "α")[$α$], which is usually 0.05. Otherwise, we fail to reject H#sub[0]. - 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. === #strong[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: + Identify the claim and formulate the hypotheses. + Compute confidence interval. + Make the decision to reject or not reject the null hypothesis by comparing the p-value with #math.equation(block: false, alt: "α")[$α$]. Reject H#sub[0] when the hypothesized value found in H#sub[0] is outside the bounds of the confidence interval. We only will be doing a two-tailed version of this. + 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. #figure(figph[Flow chart for writing test summaries. When the claim is in H0, reject H0? yes leads to there is enough evidence to reject the claim that…, and no leads to there is not enough evidence to reject the claim that…. When the claim is in H1, reject H0? yes leads to there is enough evidence to support the claim that…, and no leads to there is not enough evidence to support the claim that….], alt: "Flow chart for writing test summaries. When the claim is in H0, reject H0? yes leads to there is enough evidence to reject the claim that…, and no leads to there is not enough evidence to reject the claim that…. When the claim is in H1, reject H0? yes leads to there is enough evidence to support the claim that…, and no leads to there is not enough evidence to support the claim that….", caption: none) 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 #strong[z-test]. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ 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 #emph[test statistic]is #math.equation(block: false, alt: "Z equals the fraction x bar minus μ sub 0 over open parenthesis the fraction σ over the square root of n close parenthesis")[$Z = frac(overline(x) − μ_(0), ( frac(σ, sqrt(n)) ))$] where µ#sub[0] is the test value from the H#sub[0]. ] #examplebox("Example 1")[][ 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 #math.equation(block: false, alt: "x bar")[$limits(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 #strong[traditional method]of hypothesis testing. Use a 5% level of significance. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Recover the M&M critical value] Opens inverse-normal mode with the left-tail area 0.05 already entered - the invNorm(0.05,0,1) step of the traditional method. Compare the -1.645 it returns with the test statistic z = -0.7425: the statistic is nowhere near the tail, so the decision is do not reject H0. Retype the area as 0.01 to see how much more evidence a 1% test would demand. - Left-tailed critical value: invNorm(0.05, 0, 1) = -1.645 ] #solutionbox[ By letting #math.equation(block: false, alt: "α")[$α$] = 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. #strong[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. #strong[Find the Critical Value:] The critical value for a left-tailed test with a level of significance #math.equation(block: false, alt: "α")[$α$] = 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 #math.equation(block: false, alt: "z sub α")[$z_(α)$] 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). #figure(figph[Normal curve with the left tail below −1.645 shaded green, labeled area in lower tail = α = 0.05 and area in upper tail = 1 − α = 0.95, next to a TI calculator screen showing invNorm(.05,0,1) = −1.644853626.], alt: "Normal curve with the left tail below −1.645 shaded green, labeled area in lower tail = α = 0.05 and area in upper tail = 1 − α = 0.95, next to a TI calculator screen showing invNorm(.05,0,1) = −1.644853626.", caption: none) Figure 8-13 First draw your curve and shade the appropriate tail with the area #math.equation(block: false, alt: "α")[$α$] = 0.05. Usually the technology you are using only asks for the area in the left tail, which in this case is #math.equation(block: false, alt: "α")[$α$] = 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. #strong[Find the Test Statistic:] The formula for the test statistic is the z-score that we used back in the Central Limit Theorem section #math.equation(block: false, alt: "z equals the fraction x bar minus μ sub 0 over open parenthesis the fraction σ over the square root of n close parenthesis equals the fraction 0.8472 minus 0.8535 over open parenthesis the fraction 0.06 over the square root of 50 close parenthesis equals minus 0.7425")[$z = frac(overline(x) − μ_(0), ( frac(σ, sqrt(n)) )) = frac(0.8472 − 0.8535, ( frac(0.06, sqrt(50)) )) = − 0.7425$]. 4. #strong[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 H#sub[0] ii. Fail to reject H#sub[0] #figure(figph[Normal curve with the green shaded Reject H0 Region in the left tail below the critical value z sub a = −1.645; the test statistic z = −0.7425 is marked by a vertical line to its right, inside the Do not reject H0 Region.], alt: "Normal curve with the green shaded Reject H0 Region in the left tail below the critical value z sub a = −1.645; the test statistic z = −0.7425 is marked by a vertical line to its right, inside the Do not reject H0 Region.", caption: none) Figure 8-14 To make the decision whether to “Do not reject H#sub[0]” or “Reject H#sub[0]” using the traditional method, we must compare the test statistic z = –0.7425 with the critical value z#sub[α] = –1.645. When the test statistic is in the shaded tail, called the rejection area, then we would reject H#sub[0], if not then we fail to reject H#sub[0]. Since the test statistic z ≈ –0.7425 is in the unshaded region, the decision is: Do not reject H#sub[0]. 5. #strong[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. #strong[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 (µ#sub[0]), standard deviation, sample mean, sample size, arrow over to the #math.equation(block: false, alt: "not equal to")[$≠$], \<, \> sign that is in the alternative hypothesis statement then press the \[ENTER\] key, arrow down to \[Calculate\] and press the \[ENTER\] key. #emph[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 (µ#sub[0]), type in your list name (TI-84 L#sub[1] is above the 1 key). #figure(figph[TI-84 Z-Test input screen with Stats selected: μ0 = .8535, σ = .06, x̄ = .8472, n = 50, alternative hypothesis μ \< μ0 highlighted, with Calculate and Draw options below.], alt: "TI-84 Z-Test input screen with Stats selected: μ0 = .8535, σ = .06, x̄ = .8472, n = 50, alternative hypothesis μ < μ0 highlighted, with Calculate and Draw options below.", caption: none) 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 (µ#sub[0]), standard deviation, sample mean, sample size, arrow over to the #math.equation(block: false, alt: "not equal to")[$≠$], \<, \> sign that is in the alternative hypothesis statement then press the \[ENTER\] key, arrow down to \[Calculate\] and press the \[ENTER\] key. #emph[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 (µ#sub[0]), type in your list name (TI-84 L#sub[1] is above the 1 key). #figure(figph[TI-84 Z-Test results screen: μ \< .8535, z = −.7424621202, p = .2289036235, x̄ = .8472, n = 50.], alt: "TI-84 Z-Test results screen: μ < .8535, z = −.7424621202, p = .2289036235, x̄ = .8472, n = 50.", caption: none) 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. #strong[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 #math.equation(block: false, alt: "not equal to")[$≠$], \<, \> 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. #figure(figph[Four TI-89 screens for a z-test: the Tests menu with 1:Z-Test highlighted, a Choose Input Method dialog with Stats selected, the Z Test input dialog with μ0 = .8535, σ = .06, x̄ = .8472, n = 50 and alternate hypothesis choices μ ≠ μ0, μ \< μ0, μ \> μ0, and the results screen showing μ \< μ0, z = −.742462, P Value = .228904, x̄ = .8472, n = 50, σ = .06.], alt: "Four TI-89 screens for a z-test: the Tests menu with 1:Z-Test highlighted, a Choose Input Method dialog with Stats selected, the Z Test input dialog with μ0 = .8535, σ = .06, x̄ = .8472, n = 50 and alternate hypothesis choices μ ≠ μ0, μ < μ0, μ > μ0, and the results screen showing μ < μ0, z = −.742462, P Value = .228904, x̄ = .8472, n = 50, σ = .06.", caption: none) #strong[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. #examplebox("Example 2")[][ 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 #math.equation(block: false, alt: "α")[$α$] = 0.05. #solutionbox[ We had the following hypotheses: H#sub[0]: μ = 900, since the manufacturer says the mean life of a battery is 900 days. H#sub[1]: μ \< 900, since you believe the mean life of the battery is less than 900 days. The test statistic was found to be: #math.equation(block: false, alt: "Z equals the fraction x bar minus μ sub 0 over open parenthesis the fraction σ over the square root of n close parenthesis equals the fraction 890 minus 900 over open parenthesis the fraction 40 over the square root of 35 close parenthesis equals minus 1.479")[$Z = frac(overline(x) − μ_(0), ( frac(σ, sqrt(n)) )) = frac(890 − 900, ( frac(40, sqrt(35)) )) = − 1.479$]. The p-value is P(#math.equation(block: false, alt: "x bar")[$limits(x)^(―)$] \< 890 | H#sub[0] is true) = P(#math.equation(block: false, alt: "x bar")[$limits(x)^(―)$]\< 890 | μ = 900) = P(Z \< –1.479). On the TI Calculator use normalcdf(-1E99,890,900,40/#math.equation(block: false, alt: "the square root of 35")[$sqrt(35)$]) #math.equation(block: false, alt: "approximately equals")[$≈$] 0.0696. See Figure 8-15. #figure(figph[Standard normal curve over a z-axis from −3 to 3 with the left tail below z = −1.479 shaded with green cross-hatching and labeled with area .0696.], alt: "Standard normal curve over a z-axis from −3 to 3 with the left tail below z = −1.479 shaded with green cross-hatching and labeled with area .0696.", caption: none) Figure 8-15 Alternatively, in Excel use =NORM.DIST(890,900,40/SQRT(35),TRUE) #math.equation(block: false, alt: "approximately equals")[$≈$] 0.0696. #figure(figph[TI-84 Z-Test input screen with Stats selected: μ0 = 900, σ = 40, x̄ = 890, n = 35, alternative hypothesis μ \< μ0 highlighted, with Calculate and Draw options below.], alt: "TI-84 Z-Test input screen with Stats selected: μ0 = 900, σ = 40, x̄ = 890, n = 35, alternative hypothesis μ < μ0 highlighted, with Calculate and Draw options below.", caption: none) The TI calculators will easily find the p-value for you. #figure(figph[TI-84 Z-Test results screen: μ \< 900, z = −1.479019946, p = .0695675253, x̄ = 890, n = 35.], alt: "TI-84 Z-Test results screen: μ < 900, z = −1.479019946, p = .0695675253, x̄ = 890, n = 35.", caption: none) Now compare the p-value = 0.0696 to #math.equation(block: false, alt: "α")[$α$] = 0.05. Make the decision to reject or not reject the null hypothesis by comparing the p-value with #math.equation(block: false, alt: "α")[$α$]. Reject H#sub[0] when the p-value ≤ α, and do not reject H0 when the p-value \> #math.equation(block: false, alt: "α")[$α$]. The p-value for this example is larger than alpha 0.0696 \> 0.05, therefore the decision is to not reject H#sub[0]. 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#strong[t-test]. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ 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 #emph[test statistic] is #math.equation(block: false, alt: "t equals the fraction x bar minus μ sub 0 over open parenthesis the fraction s over the square root of n close parenthesis")[$t = frac(overline(x) − μ_(0), ( frac(s, sqrt(n)) ))$] where µ#sub[0] is the test value from the H#sub[0]. The degrees of freedom are #emph[df] = #emph[n] – 1. ] #strong[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. #figure(figph[Flow chart asking is σ known? Yes leads to use the z sub α/2 values and σ in the formula; no leads to use the t sub α/2 values and s in the formula. A footnote reads: if n \< 30, the variable must be normally distributed.], alt: "Flow chart asking is σ known? Yes leads to use the z sub α/2 values and σ in the formula; no leads to use the t sub α/2 values and s in the formula. A footnote reads: if n < 30, the variable must be normally distributed.", caption: none) 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 H#sub[1] and both tails shaded. The right-tailed test will always have the greater than \> sign in H#sub[1] and the right tail shaded. The left-tailed test will always have a less than \< sign in H#sub[1] and the left tail shaded. #figure(figph[Hypothesis testing table with three columns: two-tailed test (H0: μ = μ0, H1: μ ≠ μ0, normal curve with both tails shaded), right-tailed test (H1: μ \> μ0, right tail shaded), and left-tailed test (H1: μ \< μ0, left tail shaded). Below, phrases when the claim is in the null hypothesis: = (is equal to, is exactly the same as, has not changed from), ≤ (is less than or equal to, is at most, is not more than, within), ≥ (is greater than or equal to, is at least, is not less than); and when the claim is in the alternative hypothesis: ≠ (is not, is not equal to, is different from, has changed from), \> (more than, greater than, above, higher than, longer than, bigger than, increased), \< (less than, below, lower than, shorter than, smaller than, decreased, reduced).], alt: "Hypothesis testing table with three columns: two-tailed test (H0: μ = μ0, H1: μ ≠ μ0, normal curve with both tails shaded), right-tailed test (H1: μ > μ0, right tail shaded), and left-tailed test (H1: μ < μ0, left tail shaded). Below, phrases when the claim is in the null hypothesis: = (is equal to, is exactly the same as, has not changed from), ≤ (is less than or equal to, is at most, is not more than, within), ≥ (is greater than or equal to, is at least, is not less than); and when the claim is in the alternative hypothesis: ≠ (is not, is not equal to, is different from, has changed from), > (more than, greater than, above, higher than, longer than, bigger than, increased), < (less than, below, lower than, shorter than, smaller than, decreased, reduced).", caption: none) Figure 8-17 #examplebox("Example 3")[][ 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 #math.equation(block: false, alt: "α")[$α$] = 0.05 level of significance. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Both halves of the soup t-test in one panel] The first link is the invT critical value: the t distribution with df = n - 1 = 12 and left-tail area 0.95. The second is the p-value, the right tail beyond the test statistic t = 1.8399 on that same curve. Because 0.0453 is below the 5% significance level, reject H0 - the same verdict the critical-value method gives. Change the area to 0.99 to watch the decision flip at a 1% test. - Critical value invT(0.95, df 12) = 1.782 - p-value tcdf(1.8399, infinity, 12) = 0.0453 ] ==== Solution #strong[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: H#sub[0]: µ = 870 H#sub[1]: µ \> 870 (claim) This is a right-tailed test with the claim in the alternative hypothesis. #strong[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 #emph[test statistic] is #math.equation(block: false, alt: "t equals the fraction x bar minus μ sub 0 over open parenthesis the fraction S over the square root of n close parenthesis equals the fraction 882.4 minus 870 over open parenthesis the fraction 24.3 over the square root of 13 close parenthesis equals 1.8399")[$t = frac(overline(x) − μ_(0), ( frac(S, sqrt(n)) )) = frac(882.4 − 870, ( frac(24.3, sqrt(13)) )) = 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. #strong[Step 3:] Compute the critical value(s): The critical value for a right-tailed test with a level of significance #math.equation(block: false, alt: "α")[$α$] = 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 t#sub[1–#math.equation(block: false, alt: "α")[$α$]] from a t-distribution with the degrees of freedom,#emph[df] = #emph[n] – 1 = 13 –1 = 12. Use the DISTR menu #strong[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. #figure(figph[t-distribution curve with the right tail above t sub 1−α = 1.782 shaded green, labeled area = 1 − α = 0.95 and α = 0.05 = area in upper tail, next to a TI calculator screen showing invT(.95,12) = 1.782287494.], alt: "t-distribution curve with the right tail above t sub 1−α = 1.782 shaded green, labeled area = 1 − α = 0.95 and α = 0.05 = area in upper tail, next to a TI calculator screen showing invT(.95,12) = 1.782287494.", caption: none) Figure 8-18 The critical value is t#sub[1–#math.equation(block: false, alt: "α")[$α$]] = 1.782 and the rejection rule becomes: Reject H#sub[0] if the test statistic t ≥ t#sub[1–#math.equation(block: false, alt: "α")[$α$]] = 1.782. #strong[Step 4:] State the decision. Decision: Since the test statistic t =1.8399 is in the critical region, we should Reject H#sub[0]. #strong[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. #strong[Example 8-7 Continued:] Use the prior example, but this time use the #strong[p-value method]. Again, let the significance level be #math.equation(block: false, alt: "α")[$α$] = 0.05. ==== Solution #strong[Step 1]: The hypotheses remain the same. H#sub[0]: µ = 870 H#sub[1]: µ \> 870 (claim) #strong[Step 2:] The test statistic remains the same, #math.equation(block: false, alt: "t equals the fraction x bar minus μ sub 0 over open parenthesis the fraction S over the square root of n close parenthesis equals the fraction 882.4 minus 870 over open parenthesis the fraction 24.3 over the square root of 13 close parenthesis equals 1.8399")[$t = frac(overline(x) − μ_(0), ( frac(S, sqrt(n)) )) = frac(882.4 − 870, ( frac(24.3, sqrt(13)) )) = 1.8399$]. #strong[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 t-distribution with 12 degrees of freedom. See Figure 8-19. #figure(figph[t-distribution curve with the right tail above t = 1.8399 shaded green and labeled area = p-value = 0.0453, next to a TI calculator screen showing tcdf(1.8399,1E99,12) = .0453186864.], alt: "t-distribution curve with the right tail above t = 1.8399 shaded green and labeled area = p-value = 0.0453, next to a TI calculator screen showing tcdf(1.8399,1E99,12) = .0453186864.", caption: none) 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,#emph[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. #strong[Step 4:] State the decision. The rejection rule: reject the null hypothesis if the p-value ≤ #math.equation(block: false, alt: "α")[$α$]. Decision: Since the p-value = 0.0453 is less than #math.equation(block: false, alt: "α")[$α$] = 0.05, we Reject H#sub[0]. This agrees with the decision from the traditional method. (These two methods should always agree!) #strong[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. #strong[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 (µ#sub[0]), sample or population standard deviation, sample mean, sample size, arrow over to the #math.equation(block: false, alt: "not equal to")[$≠$], \<, \> 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. #figure(figph[Three TI-84 screens for a t-test: the TESTS menu with 2:T-Test highlighted, the T-Test input screen with Stats selected showing μ0 = 870, x̄ = 882.4, Sx = 24.3, n = 13 and alternative μ \> μ0 highlighted, and the results screen showing μ \> 870, t = 1.839869787, p = .0453210338, x̄ = 882.4, Sx = 24.3, n = 13.], alt: "Three TI-84 screens for a t-test: the TESTS menu with 2:T-Test highlighted, the T-Test input screen with Stats selected showing μ0 = 870, x̄ = 882.4, Sx = 24.3, n = 13 and alternative μ > μ0 highlighted, and the results screen showing μ > 870, t = 1.839869787, p = .0453210338, x̄ = 882.4, Sx = 24.3, n = 13.", caption: none) #emph[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 (µ#sub[0]), L#sub[1], leave Freq:1 alone, arrow over to the #math.equation(block: false, alt: "not equal to")[$≠$], \<, \> 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. #strong[TI-89:] Go to the \[Apps\] Stat/List Editor, then press \[2#super[nd]\] 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 (μ#sub[0]), sample standard deviation, sample mean, sample size (or list name (list1), and Freq: 1), arrow over to the #math.equation(block: false, alt: "not equal to")[$≠$], \<, \> 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. #figure(figph[Three TI-89 screens for a t-test: the Tests menu with 2:T-Test highlighted, the T Test input dialog showing μ0 = 870, x̄ = 882.4, Sx = 24.3, n = 13 and alternate hypothesis μ \> μ0 selected, and the results screen showing μ \> μ0, t = 1.83987, P Value = .045321, df = 12, x̄ = 882.4, Sx = 24.3, n = 13.], alt: "Three TI-89 screens for a t-test: the Tests menu with 2:T-Test highlighted, the T Test input dialog showing μ0 = 870, x̄ = 882.4, Sx = 24.3, n = 13 and alternate hypothesis μ > μ0 selected, and the results screen showing μ > μ0, t = 1.83987, P Value = .045321, df = 12, x̄ = 882.4, Sx = 24.3, n = 13.", caption: none) ] #examplebox("Example 4")[][ The weight of the world’s smallest mammal is the bumblebee bat (also known as Kitti’s hog-nosed bat or #emph[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. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[The bat interval and its p-value from the same curve] The first link returns the t critical value the 90% interval needs (df = 9, left-tail area 0.95), the 1.833113 that produces 1.985 +/- 1.833113(0.235242/sqrt(10)) = (1.8486, 2.1214). The second opens the right tail past the test statistic t = 1.142625; the alternative is two-tailed, so double the 0.1413 on screen to get the book's p-value 0.2826. Both routes leave 1.9 inside, so do not reject H0. - t critical value for the 90% interval: T.INV(0.95, 9) = 1.833113 - One tail P(T \> 1.142625) = 0.1413 - double it for the p-value 0.2826 ] #figure(figph[Data table with one row labeled Weight containing ten values: 1.9, 2.24, 2.13, 2, 1.54, 1.96, 1.79, 2.18, 1.81, 2.3.], alt: "Data table with one row labeled Weight containing ten values: 1.9, 2.24, 2.13, 2, 1.54, 1.96, 1.79, 2.18, 1.81, 2.3.", caption: none) ==== Solution #strong[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: H#sub[0]: μ = 1.9 H#sub[1]: μ ≠ 1.9 #strong[Step 2:] Compute the confidence interval. First, find the t critical value using #emph[df] = #emph[n] – 1 = 9 and 90% confidence. In Excel t#sub[#math.equation(block: false, alt: "α")[$α$]]#sub[/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} #linebreak() &\\bar{x} \\pm t\_{\\alpha / 2}\\left(\\frac{s}{\\sqrt{n}}\\right) \\\\ #linebreak() &\\Rightarrow 1.985 \\pm 1.833113\\left(\\frac{0.235242}{\\sqrt{10}}\\right) \\\\ #linebreak() &\\Rightarrow 1.985 \\pm 1.833113(0.07439) \\\\ #linebreak() &\\Rightarrow 1.985 \\pm 0.136365 \\\\ #linebreak() &\\Rightarrow(1.8486,2.1214) #linebreak() \\end{aligned}\\) The answer can be given as an inequality 1.8486 \< µ \< 2.1214 or in interval notation (1.8486, 2.1214). #strong[Step 3:] Make the decision: The rejection rule is to reject H0 when the hypothesized value found in H#sub[0] 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 H#sub[0]. \# Why the interval method and the test always agree - simulate the bat study \# 10,000 times with H0 TRUE (mu = 1.9, s ~ 0.235242, n = 10). set.seed(9) mu0 \<- 1.9; sigma \<- 0.235242; n \<- 10 inside \<- replicate(10000, { x \<- rnorm(n, mu0, sigma) ci \<- mean(x) + c(-1, 1) \* qt(0.95, n - 1) \* sd(x) / sqrt(n) \# 90% t-interval mu0 \> ci\[1\] && mu0 \< ci\[2\] }) mean(inside) \# ~0.90 of the intervals capture 1.9 -\> fail to reject mean(!inside) \# ~0.10 miss it -\> exactly the alpha = 0.10 rejection rate The sampling distribution, assuming the null hypothesis is true, will have a mean of μ = 1.9 and a standard error of #math.equation(block: false, alt: "the fraction 0.2352 over the square root of 10 equals 0.07439")[$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. #figure(figph[Normal curve centered at μ = 1.9, marked by a blue vertical line, over an x-axis from 1.65 to 2.15. A thick red bar along the axis spans the confidence interval from LL = 1.8486 to UL = 2.1214, and a gray line marks the sample mean x̄ = 1.985 inside the interval.], alt: "Normal curve centered at μ = 1.9, marked by a blue vertical line, over an x-axis from 1.65 to 2.15. A thick red bar along the axis spans the confidence interval from LL = 1.8486 to UL = 2.1214, and a gray line marks the sample mean x̄ = 1.985 inside the interval.", caption: none) Figure 8-20 #strong[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. #strong[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. #figure(figph[Four TI-84 screens for a t-interval: list L1 holding the data with entry L1(10) = 2.3, the TESTS menu with 8:TInterval highlighted, the TInterval input screen with Data selected, List: L1, Freq: 1, C-Level: .9, and the results screen showing the interval (1.8486, 2.1214) with x̄ = 1.985, Sx = .235242192, n = 10.], alt: "Four TI-84 screens for a t-interval: list L1 holding the data with entry L1(10) = 2.3, the TESTS menu with 8:TInterval highlighted, the TInterval input screen with Data selected, List: L1, Freq: 1, C-Level: .9, and the results screen showing the interval (1.8486, 2.1214) with x̄ = 1.985, Sx = .235242192, n = 10.", caption: none) #strong[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 – #math.equation(block: false, alt: "α")[$α$]. #figure(figph[Excel Descriptive Statistics dialog box with Input Range \$C\$1:\$C\$11, Grouped By Columns, Labels in first row checked, Output Range \$E\$1, Summary statistics checked, and Confidence Level for Mean set to 90%.], alt: "Excel Descriptive Statistics dialog box with Input Range $C$1:$C$11, Grouped By Columns, Labels in first row checked, Output Range $E$1, Summary statistics checked, and Confidence Level for Mean set to 90%.", caption: none) Below is the Excel output. Excel only calculates the descriptive statistics with the margin of error. #figure(figph[Excel descriptive statistics output for Weight: mean 1.985, standard error 0.07439, median 1.98, mode \#N/A, standard deviation 0.235242, sample variance 0.055339, kurtosis −0.23332, skewness −0.46112, range 0.76, minimum 1.54, maximum 2.3, sum 19.85, count 10, and Confidence Level(90.0%) 0.136365.], alt: "Excel descriptive statistics output for Weight: mean 1.985, standard error 0.07439, median 1.98, mode #N/A, standard deviation 0.235242, sample variance 0.055339, kurtosis −0.23332, skewness −0.46112, range 0.76, minimum 1.54, maximum 2.3, sum 19.85, count 10, and Confidence Level(90.0%) 0.136365.", caption: none) Use Excel to find each piece of the interval #math.equation(block: false, alt: "x bar ± t sub α / 2 open parenthesis the fraction s over the square root of n close parenthesis")[$overline(x) ± t_(α / 2) ( frac(s, sqrt(n)) )$]. Excel #math.equation(block: false, alt: "t sub α / 2")[$t_(α / 2)$] = T.INV(0.1/2,9) = 1.8311. \\(\\begin{aligned} #linebreak() &\\bar{x} \\pm t\_{\\alpha / 2}\\left(\\frac{s}{\\sqrt{n}}\\right) \\\\ #linebreak() &\\Rightarrow 1.985 \\pm 1.8311\\left(\\frac{0.2352}{\\sqrt{10}}\\right) \\\\ #linebreak() &\\Rightarrow 1.985 \\pm 1.8311(0.07439) #linebreak() \\end{aligned}\\) Can you find the mean and standard error #math.equation(block: false, alt: "the fraction s over the square root of n equals 0.07439")[$frac(s, sqrt(n)) = 0.07439$] in the Excel output? #math.equation(block: true, alt: "⇒ 1.985 ± 0.136365")[$⇒ 1.985 ± 0.136365$] Can you find the margin of error #math.equation(block: false, alt: "t sub the fraction α over 2 open parenthesis the fraction s over the square root of n close parenthesis equals 0.136365")[$t_(frac(α, 2)) ( frac(s, sqrt(n)) ) = 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. #strong[Example 8-8 Continued:] Use the prior example, but this time use the #strong[p-value method]. Again, let the significance level be #math.equation(block: false, alt: "α")[$α$] = 0.05. ==== Solution #strong[Step 1:] State the hypotheses. The hypotheses are: H#sub[0]: μ = 1.9 H#sub[1]: μ ≠ 1.9 #strong[Step 2:] Compute the test statistic, #math.equation(block: false, alt: "t equals the fraction x bar minus μ sub 0 over open parenthesis the fraction s over the square root of n close parenthesis equals the fraction 1.985 minus 1.9 over open parenthesis the fraction .235242 over the square root of 10 close parenthesis equals 1.1426")[$t = frac(overline(x) − μ_(0), ( frac(s, sqrt(n)) )) = frac(1.985 − 1.9, ( frac(".235242", sqrt(10)) )) = 1.1426$] Verify using Excel. Excel does not have a one-sample t-test, but it does have a two-sample 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.) #figure(figph[Excel worksheet with column A labeled Weight containing 1.9, 2.24, 2.13, 2, 1.54, 1.96, 1.79, 2.18, 1.81, 2.3 in rows 2 through 11, and column B labeled Dummy containing a zero beside each value.], alt: "Excel worksheet with column A labeled Weight containing 1.9, 2.24, 2.13, 2, 1.54, 1.96, 1.79, 2.18, 1.81, 2.3 in rows 2 through 11, and column B labeled Dummy containing a zero beside each value.", caption: none) Select the Data Analysis tool and then select t-Test: Paired Two Sample for Means, then select OK. #figure(figph[Excel Data Analysis dialog listing Analysis Tools including Histogram, Moving Average, Regression, and Sampling, with t-Test: Paired Two Sample for Means highlighted above the two-sample t-test and z-test options.], alt: "Excel Data Analysis dialog listing Analysis Tools including Histogram, Moving Average, Regression, and Sampling, with t-Test: Paired Two Sample for Means highlighted above the two-sample t-test and z-test options.", caption: none) 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. #figure(figph[Excel t-Test: Paired Two Sample for Means dialog with Variable 1 Range \$A\$1:\$A\$11, Variable 2 Range \$B\$1:\$B\$11, Hypothesized Mean Difference 1.9, Labels checked, Alpha 0.10, and New Worksheet Ply selected for output.], alt: "Excel t-Test: Paired Two Sample for Means dialog with Variable 1 Range $A$1:$A$11, Variable 2 Range $B$1:$B$11, Hypothesized Mean Difference 1.9, Labels checked, Alpha 0.10, and New Worksheet Ply selected for output.", caption: none) Excel provides the following output: #figure(figph[Excel t-Test: Paired Two Sample for Means output for Weight and Dummy columns with a What it Means note beside each row: mean 1.985 (sample mean), variance 0.055339, observations 10 (sample size), Pearson correlation \#DIV/0! (ignore this), hypothesized mean difference 1.9, df 9, t Stat 1.142625 (test statistic), P(T\<=t) one-tail 0.14134 (one-tail p-value), t Critical one-tail 1.383029, P(T\<=t) two-tail 0.282679 (two-tail p-value), t Critical two-tail 1.833113.], alt: "Excel t-Test: Paired Two Sample for Means output for Weight and Dummy columns with a What it Means note beside each row: mean 1.985 (sample mean), variance 0.055339, observations 10 (sample size), Pearson correlation #DIV/0! (ignore this), hypothesized mean difference 1.9, df 9, t Stat 1.142625 (test statistic), P(T<=t) one-tail 0.14134 (one-tail p-value), t Critical one-tail 1.383029, P(T<=t) two-tail 0.282679 (two-tail p-value), t Critical two-tail 1.833113.", caption: none) #strong[Step 3:] Compute the p-value. Since the alternative hypothesis has a ≠ symbol, use the Excel output next two-tailed p-value = 0.2826. #strong[Step 4:] Make the decision. For the p-value method we would compare the two-tailed p-value = 0.2826 to #math.equation(block: false, alt: "α")[$α$] = 0.10. The rule is to reject H#sub[0] if the p-value ≤ #math.equation(block: false, alt: "α")[$α$]. In this case the p-value \> #math.equation(block: false, alt: "α")[$α$], therefore we do not reject H#sub[0]. 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 two-tailed test #math.equation(block: false, alt: "t sub the fraction α over 2")[$t_(frac(α, 2))$] = ±1.833113. Since the test statistic is between –1.8331 and 1.8331 we would not reject H#sub[0], which is the same decision using the p-value method or the confidence interval method. #strong[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. ] #strong[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 #emph[df] = 9, #math.equation(block: false, alt: "α")[$α$] = 0.10 to show all three tests comparing either the test statistic with the critical value or the p-value with #math.equation(block: false, alt: "α")[$α$]. #strong[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. #figure(figph[t-distribution curve for a two-tailed test labeled total p-value area = 0.28268 and α = 0.10. Blue cross-hatched areas beyond the test statistics TS = −1.143 and TS = 1.143 each represent p-value/2 = 0.14134, and green areas beyond the critical values CV = −1.833 and CV = 1.833 each represent α/2 = 0.05.], alt: "t-distribution curve for a two-tailed test labeled total p-value area = 0.28268 and α = 0.10. Blue cross-hatched areas beyond the test statistics TS = −1.143 and TS = 1.143 each represent p-value/2 = 0.14134, and green areas beyond the critical values CV = −1.833 and CV = 1.833 each represent α/2 = 0.05.", caption: none) Figure 8-21 #strong[Right-Tailed Test] If we happened to do a right-tailed test with #emph[df] = 9 and #math.equation(block: false, alt: "α")[$α$] = 0.10, the critical value t#sub[1-#math.equation(block: false, alt: "α")[$α$]] = 1.383 will be in the right tail and usually the test statistic will be a positive number. See Figure 8-22. #figure(figph[t-distribution curve for a right-tailed test: the blue cross-hatched right-tail area beyond the test statistic TS = 1.143 is the p-value = 0.14134, and the green area beyond the critical value CV = 1.383 is α = 0.10.], alt: "t-distribution curve for a right-tailed test: the blue cross-hatched right-tail area beyond the test statistic TS = 1.143 is the p-value = 0.14134, and the green area beyond the critical value CV = 1.383 is α = 0.10.", caption: none) Figure 8-22 #strong[Left-Tailed Test] If we happened to do a left-tailed test with #emph[df] = 9 and #math.equation(block: false, alt: "α")[$α$] = 0.10, the critical value t#sub[#math.equation(block: false, alt: "α")[$α$]] = –1.383 will be in the left tail and usually the test statistic will be a negative number. See Figure 8-23. #figure(figph[t-distribution curve for a left-tailed test: the blue cross-hatched left-tail area beyond the test statistic TS = −1.143 is the p-value = 0.14134, and the green area beyond the critical value labeled CV = −1.833 is α = 0.10.], alt: "t-distribution curve for a left-tailed test: the blue cross-hatched left-tail area beyond the test statistic TS = −1.143 is the p-value = 0.14134, and the green area beyond the critical value labeled CV = −1.833 is α = 0.10.", caption: none) Figure 8-23