Inferences Based on a Single Sample: Tests of Hypothesis
Inferences Based on a Single Sample: Tests of Hypothesis
- Inferential statistics involves using sample statistics to make decisions or predictions about population parameters.
Statistical vs. Non-statistical Examples
- Statistical Example:
- A soft-drink company claims its cans contain 12 ounces of soda on average.
- A government agency tests this claim by sampling 100 cans.
- Non-statistical Example:
- A person indicted for a crime is tried in court.
- Based on evidence, the judge decides if the person is guilty or not guilty.
- The person is presumed not guilty.
Hypotheses
- Null Hypothesis (H0): The hypothesis to be tested (hypothesis of no difference).
- In the court example: The person is not guilty.
- In the soda example: μ=12
- Alternative Hypothesis (H1): A statement of what we believe is true if the sample data cause us to reject the null hypothesis.
- In the court example: The person is guilty.
- In the soda example: \mu < 12
Rejection and Non-rejection Regions
- Rejection Region: Enough evidence to reject the null hypothesis.
- Non-rejection Region: Not enough evidence to reject the null hypothesis.
- Critical Point: The boundary between the rejection and non-rejection regions.
- Level of Evidence: Used to determine whether to reject or not reject the null hypothesis.
Types of Errors
- Type I Error: Rejecting a true null hypothesis.
- α = P(H0 is rejected | H0 is true)
- α is the significance level of the test, set by the researcher in advance.
- Type II Error: Failing to reject a false null hypothesis.
- β = P(H0 is not rejected | H0 is false)
- 1 - β is the power of the test.
Type I & II Error Relationship
- Type I and Type II errors cannot occur simultaneously.
- Type I error can only occur if H0 is true.
- Type II error can only occur if H0 is false.
- If Type I error probability (α) increases, then Type II error probability (β) decreases.
Errors in Hypothesis Testing
| Decision | H0 is True | H0 is False |
|---|
| Do not reject H0 | Correct Decision (1 - α) | Type II error (β) |
| Reject H0 | Type I error (α) | Correct Decision (1 - β) |
One-tailed and Two-tailed Tests
- Two-tailed Test: Rejection region in both tails of the distribution.
- One-tailed Test: Rejection region in one tail of the distribution (left or right).
Summary Table for Hypothesis Tests
| Feature | Two-tailed Test | Left-tailed Test | Right-tailed Test |
|---|
| Sign in the null hypothesis | = | = or ≥ | = or ≤ |
| Sign in the alternative hypothesis | ≠ | < | > |
| Rejection region | In both tails | In the left tail | In the right tail |
- State the null and alternative hypotheses.
- Select the appropriate distribution.
- Determine the rejection and non-rejection regions.
- Calculate the test statistic:
- Test statistic=Standard deviation of the point estimator(Estimated or true)Point estimate–Parameter value at H0
- Make a decision (reject or fail to reject the null hypothesis).
Example 1: Hypothesis Test About a Population Mean (σ known)
- A soft-drink company claims its cans contain 12 ounces of soda on average.
- A government agency samples 100 cans and finds a mean of 11.8 ounces.
- Assume a normal population with a known standard deviation of 1 ounce.
- Significance level α = 10%.
- Test whether the mean amount of soda per can is less than 12 ounces.
Critical Value Approach
- H0: μ=12
- H1: \mu < 12
- Test statistic: z=nσxˉ−μ=100111.8−12=−2
- Since z = -2, we reject H0 and accept H1.
Probability Value Approach (P-value Approach)
- P-value: The smallest significance level at which the null hypothesis is rejected.
- Reject H0 if p-value < α; do not reject H0 if p-value ≥ α.
- In this case, p-value = 0.0228.
Conditions for Using the t-distribution
- Used when the population standard deviation (σ) is unknown, and we use the sample standard deviation (S) as an estimator.
- The population is approximately normally distributed.
- The population standard deviation is unknown.
Example 2: Hypothesis Test About a Population Mean (σ unknown)
- Psychologists claim that the mean age at which children start walking is 12.5 months.
- Carol samples 16 children and finds a mean of 12.6 months.
- Sample standard deviation = 0.4 months.
- Significance level α = 10%.
- Test if the mean age at which all children start walking is different from 12.5 months.
Hypothesis Test
- H0: μ=12.5
- H1: μ=12.5
- Test statistic: t=nsxˉ−μ=160.412.6−12.5=1
- Degrees of freedom: df = n - 1 = 15.
- Since the p-value > α, we fail to reject H0.
Conditions for Using the Binomial Distribution
- Used to test hypotheses about a population proportion.
- The n trials must satisfy the assumptions underlying the binomial distribution.
- A sample is considered large if:
- np≥5
- nq≥5
Example 3: Hypothesis Test About a Population Proportion (Large Sample)
- A machine should not produce more than 5% defective chips.
- A sample of 400 chips contains 28 defective chips.
- Significance level α = 10%.
- Test whether the machine needs an adjustment.
Hypothesis Test
- H0: p = 0.05
- H1: p > 0.05
- Test statistic: z=np</em>0(1−p0)p^−p<em>0
- The value of the test statistics ≈ 1.84
- p-value = 0.0329
- Since p-value < α, we reject H0 and accept H1.
Using Excel to Test Hypotheses
- Z-Test:
Z.TEST returns the p-value for a right-tail test or P(Z ≥ z). - T-Test:
T.DIST returns the p-value for a left-tail test or P(T ≤ t).T.DIST.RT returns the p-value for a right-tail test or P(T ≥ t).T.DIST.2T returns the p-value for a two-tail test, using the absolute value of the test statistics.
Relation Between Tests of Hypothesis and Confidence Intervals
- Connection between two-tailed tests and confidence intervals.
- Consider the (1-α)100% confidence interval for µ.
- H0: μ=μ0
- H1: μ=μ0
- Rejection region and non-rejection region.
Example
- Using a 95% CI based on the t-distribution, decide whether to reject H0:
- a) H0: μ=320, H1: μ=320, α = 0.05
- b) H0: μ=310, H1: μ=310, α = 0.05
- c) H0: μ=310, H1: μ=310, α = 0.02