0% found this document useful (0 votes)
14 views7 pages

lab5

Hypothesis testing is a statistical method used to evaluate claims about a population based on sample data, involving the null hypothesis (H₀) and the alternative hypothesis (H₁). It includes concepts like significance level, p-value, and confidence intervals, and utilizes tests such as Z-tests and T-tests depending on sample size and known population variance. The lab provided practical experience with these tests, emphasizing their importance in making data-driven decisions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views7 pages

lab5

Hypothesis testing is a statistical method used to evaluate claims about a population based on sample data, involving the null hypothesis (H₀) and the alternative hypothesis (H₁). It includes concepts like significance level, p-value, and confidence intervals, and utilizes tests such as Z-tests and T-tests depending on sample size and known population variance. The lab provided practical experience with these tests, emphasizing their importance in making data-driven decisions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Understanding Hypothesis Testing

Hypothesis testing is a core concept in statistics used to analyze whether a claim about a
population holds true based on sample data. It involves testing two opposing statements:
the null hypothesis (H₀) and the alternative hypothesis (H₁).

1. Null Hypothesis (H₀)

The null hypothesis assumes there is no significant effect, difference, or relationship in


the given scenario. It represents the status quo or baseline claim. The goal of hypothesis
testing is often to reject this hypothesis when there is sufficient evidence.

Example:
Suppose a company launches a new teaching method and claims it improves students'
math scores. The null hypothesis would state: "The new teaching method does not
improve students' math scores."

Mathematical Representation:
- For population means: H₀: μ₁ = μ₂ (no difference between the mean scores of students
taught with the new method and the traditional method).

2. Alternative Hypothesis (H₁)

The alternative hypothesis suggests there is a significant effect or difference. It represents


what the researcher hopes to prove.

Example:
Continuing the teaching method study, the alternative hypothesis would state: "The new
teaching method improves students' math scores."

Mathematical Representation:
- One-sided test: H₁: μ₁ > μ₂ (new method results in higher scores).
- Two-sided test: H₁: μ₁ ≠ μ₂ (new method results in scores that are either higher or
lower than the traditional method).

Key Concepts in Hypothesis Testing

1. Significance Level (α):


The level of significance, often set at 0.05 (5%), represents the probability of rejecting
the null hypothesis when it is actually true.
2. P-Value:
The p-value quantifies how likely the observed data is under the assumption that H₀ is
true. A p-value smaller than α leads to rejecting H₀.

3. Confidence Interval (CI):


A confidence interval provides a range of plausible values for a population parameter.
For example, a 95% CI suggests there’s a 95% chance the true value lies within this
range.

Types of Hypothesis Tests: Z-Test vs. T-Test

Z-Test (When Population Standard Deviation is Known):

The Z-test is used when the population standard deviation (σ) is known and the sample
size is large (n > 30).

Steps:
1. Set Hypotheses:
- H₀: μ₁ = μ₀ (no difference).
- H₁: μ₁ ≠ μ₀ (difference exists).

2. Find the Z-Critical Value:


- For a two-tailed test with α = 0.05, critical values are ±1.96.

3. Calculate the Z-Statistic:


Formula:
z = (x̄ - μ₀) / (σ / √n)
Where:
- x̄ : Sample mean
- μ₀: Hypothesized population mean
- σ: Population standard deviation
- n: Sample size

4. Decision Rule:
- Reject H₀ if the z-statistic falls outside the critical range.

Example:
A school claims the average test score of its students is 75. You collect a sample and test
whether the true mean differs from 75.
T-Test (When Population Standard Deviation is Unknown):

The T-test is applied when the sample size is small (n ≤ 30) and σ is unknown. Instead,
the sample standard deviation (s) is used.

Steps:
1. Set Hypotheses:
- H₀: μ₁ = μ₀
- H₁: μ₁ ≠ μ₀

2. Find the T-Critical Value:


- Use the t-distribution table based on degrees of freedom (df = n-1) and α.

3. Calculate the T-Statistic:


Formula:
t = (x̄ - μ₀) / (s / √n)
Where:
- s: Sample standard deviation

4. Decision Rule:
- Compare the t-statistic with the critical values.

Example:
A restaurant claims their average delivery time is 30 minutes. You take a small sample of
delivery times and test whether the mean is significantly different.

Why It Matters

Hypothesis testing ensures that decisions are based on evidence rather than random
variability. Whether testing a new drug, comparing teaching strategies, or evaluating
production processes, it provides a systematic way to validate claims.
Example: One-Tailed Z-Test

Problem: A manufacturer claims that the average lifetime of a light bulb is 1000 hours.
A sample of 36 bulbs is tested, and the sample mean lifetime is found to be 980 hours
with a population standard deviation of 80 hours. We want to test if the average lifetime
of the bulbs is less than 1000 hours at a significance level of α = 0.05.

Source Code:
Source Code

Source code
Discussion

In this lab, we got hands-on with hypothesis testing using Z-tests and T-tests to make
sense of sample data. We ran both one-tailed and two-tailed tests, which let us check for
specific effects or general differences. For big samples where we knew the population
variance, we used Z-tests to calculate Z-scores and p-values, helping us figure out if we
should reject the null hypothesis. For smaller samples or when we didn’t know the
population variance, T-tests came to the rescue, providing T-scores and p-values. These
tests helped us see if the sample mean was significantly different from the population
mean, whether in a specific direction or not. This lab emphasized how crucial hypothesis
testing is for making decisions based on data and illustrated when to use Z-tests versus T-
tests.

Conclusion

This lab gave us practical experience with Z-tests and T-tests, essential for hypothesis
testing. By crunching Z-scores, T-scores, and p-values, we learned to gauge the
significance of our data. Running both one-tailed and two-tailed tests showed us the
importance of considering the direction of effects in our analyses. The hands-on approach
strengthened our grasp of statistical concepts and their real-world applications. These
skills are key for conducting solid research and making informed decisions based on
stats. All in all, this lab provided a strong foundation in hypothesis testing, gearing us up
for more advanced data analysis in various fields.

You might also like