Module 8: One-Sample Hypothesis Testing (Part 1)

Exam and Course Logistics

  • Office Hours Opportunities:

    • Two Webex office hours this week.

    • After next Monday's class, two in-person office hours (likely Monday and Tuesday at 8PM8\text{PM} in the classroom) will be offered before Wednesday.

  • Mock Exam: A mock exam will be held next Monday during class.

    • An answer key and in-person availability will follow the mock exam.

  • Instructor's Availability/Efficiency:

    • The instructor will be available for questions, emphasizing efficient meetings (asking specific questions).

    • Instructor is moving further away but remains committed to supporting students.

  • Group Study: Highly recommended for efficiency; the instructor is more willing to meet with groups of 343-4 students (Webex or in-person) than individuals.

  • Cheat Sheet Template: A template document to aid in preparing cheat sheets will be made available on Wednesday.

  • Attendance Tracking: Students should check their AT, AC, and AP records. AT tracks absences (good numbers: 0,1,20, 1, 2). AC and AP track missed active learning items, costing 0.5%0.5\% from the 10%10\% activity grade per miss.

Choosing Between Z-test and T-test for Means

  • Key Condition: The decision to use a Z-test or T-test depends solely on whether the population standard deviation (σ\sigma) is known.

  • Z-test Usage: Use a Z-test only if the question explicitly states that the population standard deviation (σ\sigma) is known (e.g., "the population standard deviation is equal to σ=such and such\sigma = \text{such and such} ").

  • T-test Usage: If the population standard deviation (σ\sigma) is not mentioned or unknown, assume a T-test is required.

  • Clarification on Sample Size (nge30n ge 30):

    • The rule that for nge30n ge 30 one can use a Z-test (due to T and Z distributions overlapping for large sample sizes) is not the primary condition for choosing between Z and T in this class.

    • The only decisive factor is knowledge of the population standard deviation.

  • Applicability: This rule applies currently to confidence intervals for means and will be extended/modified for proportions (covered in Lecture 99).

Lecture 8: One-Sample Hypothesis Testing (Part 1)

  • This is the concluding lecture for the statistical portion of the course.

  • After Lecture 1010, the course will transition to more algebraic topics.

Understanding Hypothesis Testing

  • Definition: A hypothesis is a statement about population parameters (e.g., population mean, μ\mu).

  • Example (Cafeteria Rating):

    • Parameter: The average rating (μ\mu) for the campus cafeteria.

    • Population: All individuals who have used the cafeteria service (not just students, but also staff, visitors, etc.).

    • Practicality: It's impossible to collect data from the entire population, so sampling is necessary.

Setting Up Hypotheses

  • Two complementary statements are used:

    • Null Hypothesis (H0H_0): Always includes the equality sign.

      • E.g., H<em>0:μ=some valueH<em>0: \mu = \text{some value} (hypothesized population mean, μ</em>0\mu</em>0).

    • Alternative Hypothesis (H1H_1): States the opposite of the null hypothesis.

      • E.g., H1:μsome valueH_1: \mu \ne \text{some value}.

  • Complementary Nature: Together, H<em>0H<em>0 and H</em>1H</em>1 cover all possibilities (100%100\%).

Types of Hypothesis Tests

  • Two-Sided (Two-tailed) Test:

    • Used when we want to test if a parameter is different from a specific value.

    • Form: H<em>0:μ=μ</em>0H<em>0: \mu = \mu</em>0 vs. H<em>1:μμ</em>0H<em>1: \mu \ne \mu</em>0.

    • Focus of today's lecture.

  • One-Sided (One-tailed) Test:

    • Used when we are interested if a parameter is less than or greater than a specific value.

    • Form: H<em>0:μμ</em>0H<em>0: \mu \le \mu</em>0 vs. H1: \mu > \mu0 (or H<em>0:μgeμ</em>0H<em>0: \mu ge \mu</em>0 vs. H1: \mu < \mu0).

    • Will be discussed on Wednesday.

Three Approaches to One-Sample Hypothesis Testing

When testing a hypothesis, there are three equivalent approaches to draw conclusions:

Approach 1: Critical Value Approach

This method compares a calculated test statistic to critical values that define rejection regions.

  1. State the Null (H<em>0H<em>0) and Alternative (H</em>1H</em>1) Hypotheses:

    • Example: For cafeteria ratings,

      • H0:μ=55H_0: \mu = 55 (The average rating is 5555)

      • H1:μ55H_1: \mu \ne 55 (The average rating is not 5555)

    • This is a two-tailed test because of the "\ne" in H<em>1H<em>1. The hypothesized value is μ</em>0=55\mu</em>0 = 55.

  2. Specify the Desired Level of Significance (α\alpha) and Sample Size (nn):

    • Significance Level (α\alpha): The probability of rejecting a true null hypothesis. By default, α=0.05\alpha = 0.05 (5%5\%), but it can be changed. Recall α=1Confidence Level\alpha = 1 - \text{Confidence Level}.

    • Sample Size (nn): Determines the degrees of freedom. For the example, a convenience sample of n=6n = 6 students was used.

  3. Determine the Appropriate Test Statistic (Z or T):

    • Based on whether the population standard deviation (σ\sigma) is known.

    • Example: Since σ\sigma is unknown for the cafeteria rating, a T-test is used.

  4. Determine the Critical Value(s):

    • Degrees of Freedom (dfdf): For a one-sample T-test, df=n1df = n - 1. For n=6n = 6, df=5df = 5.

    • Using Minitab to find critical values (Slide 4):

      • Navigate to Graph > Probability Distribution Plot > View Probability > OK.

      • Select T Distribution and enter Degrees of freedom: 5.

      • Go to Shaded Area, select Probability, choose Both Tails.

      • Enter Probability = 0.05 (α\alpha).

      • The output shows the critical values. For df=5df = 5 and α=0.05\alpha = 0.05 (both tails), the critical values are ±2.571\pm 2.571. These values define the rejection regions (the tails) and the non-rejection region (the middle area).

  5. Calculate the Test Statistic (T-stat):

    • Formula: t<em>extstat=xˉμ</em>0s/nt<em>{ ext{stat}} = \frac{\bar{x} - \mu</em>0}{s / \sqrt{n}} (where xˉ\bar{x} is sample mean, μ0\mu_0 is hypothesized population mean, ss is sample standard deviation, nn is sample size).

    • Example Calculations:

      • First, get sample descriptive statistics using Minitab (Stat > Basic Statistics > Display Descriptive Statistics).

      • Sample mean (xˉ\bar{x}) of 66 collected ratings: 4646.

      • Sample standard deviation (ss) of 66 collected ratings: 30.830.8.

      • n=6n = 6.

      • textstat=465530.8/6=930.8/2.449912.570.716t_{ ext{stat}} = \frac{46 - 55}{30.8 / \sqrt{6}} = \frac{-9}{30.8 / 2.449} \approx \frac{-9}{12.57} \approx -0.716.

  6. Make a Decision and Draw a Conclusion:

    • Compare the calculated textstatt_{ ext{stat}} to the critical values (±2.571\pm 2.571).

    • If t<em>extstatt<em>{ ext{stat}} falls into a rejection region (i.e., less than 2.571-2.571 or greater than +2.571+2.571), reject H</em>0H</em>0.

    • If t<em>extstatt<em>{ ext{stat}} falls into the non-rejection region (between the critical values), do not reject H</em>0H</em>0.

    • Example: The calculated textstat=0.716t_{ ext{stat}} = -0.716 falls between 2.571-2.571 and +2.571+2.571. It is in the non-rejection region.

    • Conclusion: Do not reject H0H_0 at the 5%5\% significance level. (This implies the sample mean of 4646 is not statistically different from the hypothesized mean of 5555).

Approach 2: P-Value Approach

This method compares the probability of observing the test statistic (or more extreme) to the significance level.

  1. Steps 1-3: Same as the Critical Value Approach.

  2. Calculate the P-value:

    • Use the calculated textstatt_{ ext{stat}} (e.g., 0.716-0.716).

    • Using Minitab to find P-value:

      • Navigate to Graph > Probability Distribution Plot > View Probability > OK.

      • Select T Distribution and enter Degrees of freedom: 5.

      • Go to Shaded Area, select X value, choose Left Tail.

      • Enter X value = -0.716.

      • The output gives the probability for the left tail. For 0.716-0.716, the left tail probability is approximately 0.2530.253.

      • For a two-tailed test, double this probability: P-value = 2×0.253=0.5062 \times 0.253 = 0.506.

  3. Make a Decision and Draw a Conclusion:

    • Rule:

      • If P-value α\le \alpha: Reject H0H_0.

      • If P-value > \alpha: Do Not Reject H0H_0.

    • Example: P-value (0.5060.506) is greater than α\alpha (0.050.05).

    • Conclusion: Do not reject H0H_0 at the 5%5\% significance level.

    • Consistency: This conclusion is consistent with the critical value approach.

  • Interpretation of P-value (brief): The P-value is the probability of observing a test statistic as extreme as, or more extreme than, the one calculated, assuming the null hypothesis is true. (This definition will be revisited for deeper understanding later).

Approach 3: Confidence Interval Approach

This method determines if the hypothesized population parameter falls within the calculated confidence interval.

  1. Steps 1-3: Same as the Critical Value Approach.

  2. Construct the Confidence Interval (CI):

    • Formula (for T-distribution CI for means): xˉ±t<em>extcritical×sn\bar{x} \pm t<em>{ ext{critical}} \times \frac{s}{\sqrt{n}} (where t</em>extcriticalt</em>{ ext{critical}} corresponds to the desired confidence level and dfdf).

    • Example Calculations:

      • xˉ=46\bar{x} = 46

      • textcritical=2.571t_{ ext{critical}} = 2.571 (for 95%95\% confidence and df=5df = 5, from Step 4 of Critical Value Approach).

      • s=30.8s = 30.8

      • n=6n = 6

      • CI=46±2.571×30.86CI = 46 \pm 2.571 \times \frac{30.8}{\sqrt{6}}

      • CI=46±2.571×12.57CI = 46 \pm 2.571 \times 12.57

      • CI=46±32.32CI = 46 \pm 32.32

      • Confidence Interval: [13.68,78.32][13.68, 78.32] (lower bound approx. 13.713.7, upper bound approx. 78.378.3).

  3. Make a Decision and Draw a Conclusion:

    • Rule:

      • If the hypothesized population mean (μ<em>0\mu<em>0) falls within the confidence interval: Do Not Reject H</em>0H</em>0.

      • If the hypothesized population mean (μ<em>0\mu<em>0) falls outside the confidence interval: Reject H</em>0H</em>0.

    • Example: The hypothesized population mean (μ0=55\mu_0 = 55) is within the calculated 95%95\% confidence interval [13.68,78.32][13.68, 78.32].

    • Conclusion: Do not reject H0H_0 at the 5%5\% significance level.

    • Consistency: This conclusion is consistent with both the critical value and P-value approaches.

Using Minitab for All-in-One Hypothesis Testing

  • Minitab can perform all these calculations simultaneously, providing the T-stat, P-value, and confidence interval directly.

  • Steps:

    1. Go to Stat > Basic Statistics > 1-Sample t...

    2. Select Summarized data (or One or more samples, each in a column if you have raw data).

    3. Enter the Sample size (n), Sample mean (X bar), and Standard deviation (S).

    4. Check Perform hypothesis test and enter the Hypothesized mean (Mu) (μ0\mu_0).

    5. Click Options:

      • Set the Confidence level (e.g., 95%95\% for α=5%\alpha=5\%).

      • Set the Alternative hypothesis to Mean not equal to hypothesized mean for a two-sided test.

    6. Click OK.

  • Output: Minitab will display the T-value (textstatt_{ ext{stat}}), P-value, and the confidence interval.

  • Missing Information: Minitab's 1-Sample t function does not directly provide the critical values. These must be obtained separately using Graph > Probability Distribution Plot.

  • Educational Value: Understanding the manual steps behind each approach is crucial before relying solely on software outputs.

Practice Example: Exam Average (One-Sample T-test)

  • Scenario: Instructor believes the class average for the first exam is 8585.

  • Hypotheses:

    • H0:μ=85H_0: \mu = 85

    • H1:μ85H_1: \mu \ne 85

  • Sample Data: A sample of n=10n = 10 students yields a sample mean xˉ=83.4\bar{x} = 83.4 and a sample standard deviation s=5.7s = 5.7.

  • Significance Level: α=7%\alpha = 7\% (or 93%93\% confidence level).

  • Test Type: T-test (since population standard deviation is unknown).

  • Minitab Application (Stat > Basic Statistics > 1-Sample t... with summarized data):

    • Sample size: 10

    • Sample mean: 83.4

    • Standard deviation: 5.7

    • Hypothesized mean: 85

    • Options: Confidence level: 93.0, Alternative hypothesis: Mean not equal to hypothesized mean.

  • Minitab Results:

    • T-Value (textstatt_{ ext{stat}}): 0.89-0.89

    • P-Value: 0.3950.395

    • Confidence Interval (93%93\% CI): [79.80,86.99][79.80, 86.99] (rounded)

  • Conclusions from Each Approach:

    1. P-value Approach: P-value (0.3950.395) > \alpha (0.070.07).

      • Decision: Do not reject H0H_0 at the 7%7\% level.

    2. Confidence Interval Approach: The hypothesized mean (μ0=85\mu_0 = 85) falls within the 93%93\% CI [79.80,86.99][79.80, 86.99].

      • Decision: Do not reject H0H_0 at the 7%7\% level.

    3. Critical Value Approach:

      • Degrees of Freedom: df=n1=101=9df = n - 1 = 10 - 1 = 9.

      • Finding Critical Values (Minitab: Graph > Probability Distribution Plot): For df=9df=9 and α=0.07\alpha = 0.07 (both tails), the critical values are ±2.073\approx \pm 2.073.

      • Comparison: The calculated textstat=0.89t_{ ext{stat}} = -0.89 falls between 2.073-2.073 and +2.073+2.073 (non-rejection region).

      • Decision: Do not reject H0H_0 at the 7%7\% level.

  • Overall Conclusion: All three approaches consistently lead to the conclusion to not reject the null hypothesis that the class average is 8585.