0% found this document useful (0 votes)
0 views17 pages

Hypothesis Testing and Confidence Intervals_student

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 17

Problems on Inferential

Statistics
Standard Error/Sampling
Error/Marginal Error
• Sampling error is the difference between a parameter and a
corresponding statistic. Since in most cases you don’t know the real
population parameter, you can use inferential statistics to estimate these
parameters in a way that takes sampling error into account.
• Standard error(SE)=std dev/sqr root of n
• Sampling Error = Z* SE
• Marginal Error = Critical Value of Z * SE
• CI=x bar +- ME (Marginal Error)
• Lower Bound = X bar – ME
• Upper Bound = X bar + ME
Z Critical Values
• Z score formula
• Z=1.96 ---95%---------CI
• Z=2.58----99%---------CI
• Z=3.29 ----99.9%------CI
Hypothesis Testing
A company claims that the average time spent by users on their
website is 8 minutes. A random sample of 50 users shows an average
time of 7.5 minutes with a standard deviation of 1.2 minutes. At a 5%
significance level, perform a hypothesis test to determine if the
company's claim is valid. Clearly state the null and alternative
hypotheses, test statistic, critical value, and conclusion.
Hypothesis Testing
• Given Data:
• Sample size (n) = 50
• Sample mean (xˉ) = 7.5 minutes
• Population standard deviation (σ) = 1.2 minutes
• Claimed population mean (μo) = 8 minutes
• Significance level (α) = 0.05
• Step 1: Define Hypotheses
• Null Hypothesis (Ho​): The average time spent by users is 8 minutes. H0:μ=8
• Alternative Hypothesis (H1​): The average time spent is different from 8
minutes (two-tailed test). H1:μ≠8
Hypothesis Testing
Step 2: Compute the Test Statistic
• Since the population standard deviation is given, we use the Z-test:
Hypothesis Testing
Step 3: Determine the Critical Value
• For a two-tailed test at α=0.05, the critical values from the standard normal
table are:
• Z critical=±1.96
Step 4: Decision Rule
• If ∣Z∣>1.96, reject Ho
• If ∣Z∣≤1.96, fail to reject Ho.

• Step 5: Conclusion
• Since ∣Z∣=2.945is greater than 1.96, we reject the null hypothesis.
Thus, there is significant evidence to conclude that the average time spent by
users is different from 8 minutes.
Confidence Interval
A researcher wants to estimate the average weight of apples grown in a
particular orchard. A sample of 40 apples has an average weight of 150
grams with a standard deviation of 20 grams. Construct a 95% confidence
interval for the true mean weight of apples in the orchard. Interpret the
result in the context of the problem.
Confidence Interval
• Given Data:
• Sample size (n) = 40
• Sample mean (xˉ) = 150 grams
• Sample standard deviation (s) = 20 grams
• Confidence level = 95%
Step 1: Find the Critical Value
• Since the sample size is n≥30, we use the Z-distribution.
For a 95% confidence level, the critical value from the Z-table is:
• Zcritical=1.96
Confidence Interval
• Step 2: Compute the Margin of Error (ME)
Confidence Interval
• Step 3: Compute the Confidence Interval
• Lower Bound=xˉ−ME=150−6.2=143.8
• Upper Bound=xˉ+ME=150+6.2=156.2
• Step 4: Interpretation
• We are 95% confident that the true mean weight of apples in the orchard lies
between 143.8 grams and 156.2 grams.
Confidence intervals and hypothesis tests complement
each other:
• If the claimed mean falls outside the confidence interval,
the test usually rejects Ho​.
• If it falls inside, we usually fail to reject Ho​.
Practice Questions
1. A professor claims that the average exam score of students in a class is 75.
A random sample of 50 students is selected, and their average score is
found to be 72 with a standard deviation of 8.

• Tasks:
 Construct a 99% confidence interval for the true mean exam score.
 Perform a hypothesis test at a 1% significance level to test if the
professor’s claim is correct.
• N=50
• Sample mean (x bar) =72
• Std deviation = 8
• Confidence Level =99%
• Marginal Error = 2.58 (CI) * 8 (std)/ sqrt n (sqrt 50)
• ME =2.91
• Lower Bound = 72 – 2.91
• Upper Bond = 72 +2.91
Perform a hypothesis test at a 1% significance level to test if the
professor’s claim is correct.
Hypothesis Testing
Step 2: Compute the Test Statistic
• Since the population standard deviation is given, we use the Z-test:
• Z = 72 – 75 (sample mean – population mean)/ (8/sqrt(50) )
• Z = -3 / 1.131
Step 4: Decision Rule
• If ∣Z∣> CI (1.96 or 2.58), reject Ho
• If ∣Z∣≤ CI (1.96 or 2.58) fail to reject Ho.

• |z| 2.65 > 2.58 therefore we reject H0

You might also like