Hypothesis Testing • Start with a question: Does the amount of credit card debt differ between households in rural areas compared to households in urban areas? Population 1 All Rural Households Population 2 All Urban Households Null Hypothesis: H : Alternate Hypothesis: H A : 1 ≠ 2
Hypothesis Testing. Start with a question: Does the amount of credit card debt differ between households in rural areas compared to households in urban areas ?. Population 1 All Rural Households m 1. Population 2 All Urban Households m 2. Null Hypothesis:H 0 : m 1 = m 2 - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Hypothesis Testing
• Start with a question:Does the amount of credit card debt differ between households in rural areas compared to households in urban areas?
Population 1All Rural Households
Population 2All Urban Households
Null Hypothesis: H :
Alternate Hypothesis: HA : 1≠2
Collect Data to Test Hypothesis
Population 1All Rural Households
Population 2All Urban Households
Are the sample means consistent with H0?
Take Random Sample(n1)
1x
Take Random Sample(n2)
2x
Summary Data
Summary Rural Summary Urban
Difference in means = $735
How likely is it to get a difference of $735 or greater if Ho is true? This probability is called the p-value.
If small then reject Ho.
3412
6299
1
1
s
x
2467
7034
2
2
s
x
P-Value
The probability of observing a difference between sample means as or more extreme as that observed if the null hypothesis is true.
When this probability is small we declare that the two population means are significantly different.
P< 0.05 is conventional cutoff
Note: P-value and significance level are the same
Computing P-Value for Testing Differences Between 2 Means
test statistic:
21
21
11nn
s
xxt
p
Sp is pooled standard deviation, a weighted average of SD for each group
Under Ho t follows a t-distribution with n1+ n2 -2 degrees of freedom (DF)
Point estimator for
Variability in point estimate
Observations
21
21
11nn
s
xxt
p
• If Ho is true then t-values should center around 0
• A large difference between sample means will lead to a large t-value
• A small standard error will lead to a large t-value
• results from large sample sizes (n1 and n2)
• results from small variation in the population
Assumptions for T-Test
1. Each of 2 populations follow a normal distribution
2. Data sampled independently from each population
– Example of lack of independenceMeasure visual acuity in left and right eye
3. The population variances are the same for each population.
The t-test is “robust” to violation of assumptions 1 and 3.
Robust – the assumptions do not need to hold exactly
*Running Matched Pair T-test using PROC TTEST;PROC TTEST; VAR oatcorndif;RUN;
No class variable so performing one sample t-test. Tests if mean is 0.
Match Pair Data- Your TurnFemale killdeer lay four eggs each spring. A scientist claims that the egg that hatches first yields a larger bird than the one that hatches last. To test his claim, he weighs the oldest and youngest of eight families with the following results:
Family Oldest Youngest
1 2.92 2.90
2 3.58 3.68
3 3.39 3.33
4 3.29 3.06
5 3.44 3.30
6 3.13 2.99
7 3.22 3.26
8 3.80 3.51
Test the researcher’s hypothesis using the data above? What is the null and alternative hypothesis? What is the p-value for the test?
Issues with hypothesis testing
• Significance does not imply causality– Need a proper prospective experiment
• Significance does not imply practical importance– Trivial but significant differences
• Run lots of tests, will find significant difference by chance– With α = 0.05, expect 1 in 20 results to be sig. by chance
Issues with hypothesis testing
• Large p-values because sample size is small– Effect could exist but we may not have a large enough
sample size
• Outliers may cause problems
Issues With Hypothesis Testing
What is the population of inference?
Example: A statistics class of n=15 women and n=5 men yield the following exam scores:
Women: mean = 90% SD = 10%Men: mean = 85% SD = 11%
Test the hypothesis that women did better on the exam then men.