Hypothesis Testing: One Sample Test (Part 1)

Hypothesis Testing: One Sample Test (Part 1)

Introduction to Hypothesis Testing

  • A hypothesis is defined as a claim about a population parameter. This parameter could be, for example, the population mean (μ\mu).

  • Null Hypothesis (H<em>0H<em>0): This is the statement being tested. It typically represents a situation of no effect or no difference, and always includes an equality sign (==, \le, or \ge). For example, H</em>0:μ=0H</em>0: \mu = 0.

  • Alternative Hypothesis (H1H_1): This is the statement that one wants to prove. It contradicts the null hypothesis and never includes an equality sign. It indicates a difference or an effect.

    • Two-tailed test: The alternative hypothesis states that the population parameter is not equal to the hypothesized value (H<em>1:μμ</em>0H<em>1: \mu \ne \mu</em>0). This means the rejection region is split into two tails of the distribution.

    • One-tailed test: The alternative hypothesis states that the population parameter is less than the hypothesized value (H1: \mu < \mu0) or greater than the hypothesized value (H1: \mu > \mu0). The rejection region is entirely in one tail of the distribution.

  • To make a decision on whether to reject or not reject the null hypothesis, three main approaches can be used, and they should all lead to the same conclusion:

    1. Critical Value Approach

    2. P-Value Approach

    3. Confidence Interval Approach

Critical Value Approach

This approach involves comparing the calculated test statistic with pre-determined critical values based on the significance level.

Steps for the Critical Value Approach:
  1. State the appropriate null and alternative hypotheses:

    • H<em>0:μ=μ</em>0H<em>0: \mu = \mu</em>0 (where μ0\mu_0 is the hypothesized population mean)

    • H<em>1:μμ</em>0H<em>1: \mu \ne \mu</em>0 (This represents a two-tail test, where we are interested if the mean is different from μ0\mu_0).

  2. Specify the desired level of significance (α\alpha) and the sample size (nn):

    • The significance level (α\alpha) is the probability of rejecting the null hypothesis when it is actually true (Type I error). A common choice is α=0.05\alpha = 0.05.

    • The sample size (nn) is determined by the data collected.

  3. Determine the appropriate technique:

    • If the population standard deviation (σ\sigma) is unknown (which is very common), a t-test is typically used.

    • If σ\sigma is known, a z-test would be used (though less frequent in practice).

  4. Determine the critical values:

    • For a t-test, the critical t (tct_c) values are found using the significance level (α\alpha) and the degrees of freedom (dfdf).

    • Degrees of freedom (dfdf): For a one-sample t-test, df=n1df = n - 1 (where nn is the sample size).

    • For a two-tailed test with α=0.05\alpha = 0.05, one would look for α/2=0.025\alpha/2 = 0.025 in each tail. The critical values would be ±tc\pm t_c.

    • How to find t-critical values (e.g., using Minitab):

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

      • Select the t-distribution and specify the degrees of freedom (n1n-1).

      • Choose Define Shaded Area By > Probability.

      • Select Both Tails and enter the significance level (e.g., 0.050.05 for α\alpha).

      • Minitab will display the critical values (tct_c) marking the boundaries of the rejection regions.

  5. Collect the data and compute the test statistic (tSTATt_{STAT}):

    • The formula for the t-test statistic for one sample is: t<em>STAT=Xˉμ</em>0s/nt<em>{STAT} = \frac{\bar{X} - \mu</em>0}{s/\sqrt{n}} where:

      • Xˉ\bar{X} is the sample mean

      • μ<em>0\mu<em>0 is the hypothesized population mean from H</em>0H</em>0

      • ss is the sample standard deviation

      • nn is the sample size

P-Value Approach

This approach compares the calculated p-value directly with the significance level.

Interpreting the P-Value Approach:
  • P-value: The probability of obtaining a test statistic equal to or more extreme than the observed sample value, assuming the null hypothesis (H0H_0) is true.

  • Decision Rule:

    • If p-value α\le \alpha, then reject H0H_0.

    • If p-value >α\gt \alpha, then do not reject H0H_0.

  • Finding p-value (e.g., using Minitab):

    • Go to Graph > Probability Distribution Plot > View Probability.

    • Choose the t-distribution and specify the degrees of freedom (n1n-1).

    • Select Define Shaded Area By > X Value.

    • Shade both tails beyond the absolute value of the calculated test statistic (tSTAT|t_{STAT}|).

    • The total shaded area represents the p-value.

Confidence Interval Approach

This approach uses the confidence interval calculated from the sample data to make a decision about the null hypothesis.

Interpreting the Confidence Interval Approach:
  • Decision Rule:

    • If the (1α)×100%(1 - \alpha) \times 100\% confidence interval does not contain the hypothesized population mean (μ<em>0\mu<em>0) from the null hypothesis (H</em>0H</em>0), then reject H0H_0 at the α\alpha level of significance.

    • If the (1α)×100%(1 - \alpha) \times 100\% confidence interval does contain μ<em>0\mu<em>0, then do not reject H</em>0H</em>0 at the α\alpha level of significance.

  • Confidence Interval Formula: For a t-distribution, the confidence interval for the mean is typically calculated as: Xˉ±t(n1,α/2)sn\bar{X} \pm t_{(n-1, \alpha/2)} \frac{s}{\sqrt{n}}.

Conclusion on Approaches

  • All three approaches—Critical Value, P-Value, and Confidence Interval—are mathematically equivalent and should always lead to the same conclusion regarding the rejection or non-rejection of the null hypothesis.

Two-Tail t Test Using Minitab

For performing a one-sample t-test in Minitab:

Minitab Navigation for One-Sample t-Test:
  1. Go to Stat > Basic Statistics > 1-Sample t…

  2. In the dialog box, select the appropriate option for your data (e.g., 'One or more samples, each in a column').

  3. Check 'Perform hypothesis test'.

  4. Enter the 'Hypothesized mean' (μ0\mu_0) corresponding to your null hypothesis.

  5. Click Options…:

    • Set the 'Confidence level' (e.g., 95.095.0 for α=0.05\alpha = 0.05).

    • Select the 'Alternative hypothesis' (e.g., 'Mean \ne hypothesized mean' for a two-tailed test).

Applying Each Approach with Minitab/Manual Calculation:
  • Test Statistic: The t-statistic formula is Xˉμ0s/n\frac{\bar{X} - \mu_0}{s/\sqrt{n}}. Use t in almost all cases; use z only if the population σ\sigma is explicitly given.

  • 1. Critical Value Approach:

    • Find tcriticalt_{critical} at α/2\alpha/2 with df=n1df = n - 1 (as described in L08, Slide 4/Page 4 of the transcript).

    • Reject H<em>0H<em>0 if |t{STAT}| > t_{critical}.

  • 2. P-Value Approach:

    • Using Minitab's 'Probability Distribution Plot', choose the t-distribution with df=n1df = n - 1.

    • Shade both tails beyond tSTAT|t_{STAT}|. The total shaded area will be the p-value.

    • Reject H0H_0 if p-value <α\lt \alpha.

  • 3. Confidence Interval Approach:

    • The confidence interval is calculated as Xˉ±tcriticalsn\bar{X} \pm t_{critical} \frac{s}{\sqrt{n}}.

    • Reject H<em>0H<em>0 if μ</em>0\mu</em>0 (the hypothesized mean) is outside this confidence interval.

Introduction to Hypothesis Testing

Imagine you are a detective examining a claim about a population (e.g., "the average height of students is 170 cm").

  • A hypothesis is this claim about a population parameter, like the population mean (μ\mu).

  • The Null Hypothesis (H<em>0H<em>0) is your default assumption or the "status quo." It's the statement you assume to be true until proven otherwise. It always includes an equality sign (==, \le$, or \ge). Think of it as "innocent until proven guilty." For example, H</em>0:μ=170H</em>0: \mu = 170 cm.

  • The Alternative Hypothesis (H1H_1) is what you want to prove. It contradicts the null hypothesis and never includes an equality sign. It suggests a difference or an effect exists.

    • Two-tailed test: You're looking for any difference (e.g., H1:μ170H_1: \mu \ne 170 cm). Your evidence could be in both extremes (tails) of the distribution, meaning the average height could be significantly lower or significantly higher than 170 cm.

    • One-tailed test: You're specifically looking for a difference in one direction (e.g., H1: \mu < 170 cm or H1: \mu > 170 cm). Your evidence would only be considered strong if it falls into one specific extreme (tail).

To decide whether your evidence is strong enough to reject H0H_0, you can use three interconnected "lenses" or "filters." They are all different ways to look at the same evidence, and they will always lead to the same conclusion:

  1. Critical Value Approach: Setting clear boundaries.

  2. P-Value Approach: Assessing how surprising your data is.

  3. Confidence Interval Approach: Defining a range of plausible values.

Critical Value Approach

This approach is like drawing "rejection lines" on your statistical map before you even look at your specific data's location. If your calculated data point (test statistic) falls outside these lines, you reject H0H_0.

Steps for the Critical Value Approach (How to Filter and Identify):
  1. State your hypotheses (H<em>0H<em>0 and H</em>1H</em>1):

    • H<em>0:μ=μ</em>0H<em>0: \mu = \mu</em>0 (e.g., "the average is 170 cm")

    • H<em>1:μμ</em>0H<em>1: \mu \ne \mu</em>0 (e.g., "the average is NOT 170 cm" - this tells you it's a two-tail test, so you'll look for rejection in both directions).

  2. Specify your level of significance (α\alpha) and sample size (nn):

    • α\alpha (e.g., 0.050.05 or 5%5\%): This is your "tolerance for error" or how rare an event must be to be considered significant. It's the probability of mistakenly rejecting H0H_0 when it's actually true (Type I error).

    • nn: How many observations you have.

  3. Determine the appropriate technique:

    • Rule: If the population standard deviation (σ\sigma) is unknown (which is almost always the case in real life, as we rarely know everything about a population), use a t-test.

    • If σ\sigma were known, you'd use a z-test. (Focus on t-test for most scenarios).

  4. Determine the critical values (tct_c): These are the "rejection lines." They depend on α\alpha and your degrees of freedom (dfdf).

    • Degrees of freedom (dfdf): For a one-sample t-test, df=n1df = n - 1. Think of this as the number of independent pieces of information available to estimate population variability.

    • For a two-tailed test with α=0.05\alpha = 0.05, you're splitting the rejection regions into two tails, so you look for 0.0250.025 in each tail. You'll find a positive t<em>ct<em>c and a negative t</em>c-t</em>c.

    • Visualization: Imagine a bell curve. These critical values (±t<em>c\pm t<em>c) mark the points beyond which we consider observations too extreme to have occurred by chance if H</em>0H</em>0 were true.

  5. Collect data and compute the test statistic (tSTATt_{STAT}):

    • The formula for your observed data's position on the t-distribution is: t<em>STAT=Xˉμ</em>0s/nt<em>{STAT} = \frac{\bar{X} - \mu</em>0}{s/\sqrt{n}} where:

      • Xˉ\bar{X} is your sample average.

      • μ<em>0\mu<em>0 is the average you hypothesized in H</em>0H</em>0.

      • ss is your sample standard deviation.

      • n\sqrt{n} is the square root of your sample size.

    • Intuition: This formula tells you how many standard errors your sample mean (Xˉ\bar{X}) is away from the hypothesized population mean (μ0\mu_0).

Decision Rule for Critical Value Approach (How to Filter and Identify):

  • Reject H<em>0H<em>0 if your absolute test statistic (t</em>STAT|t</em>{STAT}|) is greater than the critical value (t<em>ct<em>c). In other words, if your data falls beyond the rejection line in either tail, it's too extreme to support H</em>0H</em>0. |t{STAT}| > tc.

  • Do not reject H<em>0H<em>0 if t</em>STATt<em>c|t</em>{STAT}| \le t<em>c. Your data is not extreme enough; it falls within the "acceptance region" where H</em>0H</em>0 is plausible.

P-Value Approach

This approach directly quantifies how surprising your observed data is, assuming H0H0 is true. It's a continuous measure of evidence against H</em>0H</em>0.

Interpreting the P-Value Approach (How to Filter and Identify):
  • P-value: This is the probability of observing sample data as extreme as, or more extreme than, what you actually got, if the null hypothesis (H0H0) were true. A small p-value means your data would be very unlikely if H</em>0H</em>0 were true, suggesting H0H_0 is probably false.

    • Visualization: Imagine your test statistic (tSTATt_{STAT}) on the bell curve. The p-value is the total area in the tails beyond your test statistic (or its absolute value for a two-tailed test). It's the cumulative probability of observing something at least that extreme.

  • Decision Rule (How to Filter and Identify):

    • If p-value α\le \alpha, then reject H<em>0H<em>0. This means your observed data is so surprising (unlikely) under H</em>0H</em>0 that you decide H0H_0 must be wrong.

    • If p-value >α\gt \alpha, then do not reject H<em>0H<em>0. Your observed data is not surprising enough to convincingly reject H</em>0H</em>0.

Confidence Interval Approach

This approach builds a "net" or a range of plausible values for the true population mean, based on your sample data. You then check if the value hypothesized in H0H_0 falls within this net.

Interpreting the Confidence Interval Approach (How to Filter and Identify):
  • Confidence Interval (CI): This is a range calculated from your sample data that is likely to contain the true (unknown) population mean (μ\mu) with a certain level of confidence (e.g., 95%95\%).

    • Formula: For a t-distribution, it's typically: Xˉ±t(n1,α/2)sn\bar{X} \pm t_{(n-1, \alpha/2)} \frac{s}{\sqrt{n}}.

    • Intuition: "Based on my sample, I am 95%95\% confident that the true average is somewhere between X and Y."

  • Decision Rule (How to Filter and Identify):

    • If the (1α)×100%(1 - \alpha) \times 100\% confidence interval does not contain the hypothesized population mean (μ<em>0\mu<em>0) from H</em>0H</em>0 (i.e., μ<em>0\mu<em>0 falls outside your net), then reject H</em>0H</em>0.

    • If the (1α)×100%(1 - \alpha) \times 100\% confidence interval does contain μ<em>0\mu<em>0 (i.e., μ</em>0\mu</em>0 is caught in your net), then do not reject H0H_0.

Conclusion on Approaches: The Unified Perspective
  • Always leading to the same conclusion: It's crucial to understand that all three approaches—Critical Value, P-Value, and Confidence Interval—are mathematically equivalent. They're just different ways of visualizing and interpreting the same statistical evidence. If you reject H0H_0 using one, you will reject it using the others. Think of them as three windows looking out at the same landscape.

Two-Tail t Test Using Minitab: Your Tool for Application

Minitab simplifies the calculations, allowing you to focus on the interpretation. Here's how to apply these concepts using Minitab for a one-sample t-test:

Minitab Navigation for One-Sample t-Test:
  1. Go to Stat > Basic Statistics > 1-Sample t…

  2. Select 'One or more samples, each in a column' (if your data is raw) and specify your data column.

  3. Check 'Perform hypothesis test'.

  4. Enter the 'Hypothesized mean' (μ<em>0\mu<em>0) – this is the value from your H</em>0H</em>0 (e.g., 170170 for the height example).

  5. Click Options…:

    • Set the 'Confidence level' (e.g., 95.095.0 for α=0.05\alpha = 0.05).

    • Select the 'Alternative hypothesis' (e.g., 'Mean \ne hypothesized mean' for a two-tailed test, 'Mean < hypothesized mean' for a left-tailed test, etc.). This ensures Minitab calculates the correct p-value and critical values for your specific H1H_1.

Applying Each Approach with Minitab/Manual Calculation:
  • Test Statistic (tSTATt_{STAT}): Minitab will calculate this for you. Remember the rule: use tt in almost all cases unless the population standard deviation (σ\sigma) is explicitly given.

  • 1. Critical Value Approach (How to identify):

    • From Minitab (if available graphically) or manually: Find tcriticalt_{critical} at α/2\alpha/2 (for a two-tail test) with df=n1df = n - 1 Using Minitab's 'Probability Distribution Plot', you can visualize where these boundary lines fall for your chosen α\alpha.

    • Decision: Reject H<em>0H<em>0 if |t{STAT}| > t_{critical} (if your calculated statistic is more extreme than the boundary lines).

  • 2. P-Value Approach (How to identify):

    • Minitab will directly provide the p-value in its output.

    • Decision: Reject H<em>0H<em>0 if p-value <α\lt \alpha (if your data is surprisingly unlikely to have occurred under H</em>0H</em>0).

  • 3. Confidence Interval Approach (How to identify):

    • Minitab will provide the confidence interval in its output.

    • Decision: Reject H<em>0H<em>0 if μ</em>0\mu</em>0 (your hypothesized mean) is outside this confidence interval (if your hypothesized value is not a plausible value for the true population mean based on your data).