Presentation is loading. Please wait.

Presentation is loading. Please wait.

Comparing two means: Module 7 continued module 7.

Similar presentations


Presentation on theme: "Comparing two means: Module 7 continued module 7."— Presentation transcript:

1 Comparing two means: Module 7 continued module 7

2 Second type of question:
When the question is to compare two datasets —are the means different? It all depends on their spreads! (ain’t it the truth!) Start with assuming that there is no difference between the two other than due to chance (You could also specify differences; e.g., there is really a difference of between the means) module 7

3 Two sets of data: Imagine a huge number of pairs (one from set A, the other from set B) The distribution of these differences also follows the central limit theorem. Hooray! So the same idea applies, but the stnd error of the mean (which for one sample is sigma/square root of N) for two paired samples is: module 7

4 Z score for differences:
2 1 ) ( - = s m x z And if you are testing whether the means are different from zero, then mu1 minus mu2 drops out, so it becomes: 2 1 ) ( - = s x z module 7

5 Stnd error of differences:
Remember that the stnd error of one sample is sigma/sq root of N Stnd error of two samples = Square root(s12/N1 + s22/N2) This is the denominator in the z statistic for differences. (Remember square root of the sum of the squares from the uncertainty module?) module 7

6 Data summary: 14.8 11.1 Ft Smith 2005 77 2006 114 year N_Fort Smith
module 7

7 Example null hypothesis:
Null hypothesis is that there is no difference between the PM2.5 at Ft Smith in 2005 and 2006 Need to provide data showing that there IS a difference between the two means, and then could reject the null H The means are not that diff: in 2005 and in 2006 module 7

8 One tail or two? Our null hypothesis is that the means are not different in 2006 and 2005 If we reject the null H then we don’t know if it changed up or down— one tailed test just says “different” or “not different” If we hypothesize that one mean is higher than the other, that is a two-tailed test module 7

9 Data summary: 14.8 11.1 Ft Smith 2005 77 2006 114 year N_Fort Smith
module 7

10 Common sense: plot first
0.00 5.00 10.00 15.00 20.00 25.00 30.00 35.00 40.00 Ft Smith 2006 Ft Smith 2005 module 7

11 Looking at the data again:
REMEMBER (or just now know) that the stdev is the square root of the variance module 7

12 Z-test: sample test for differences in means:
module 7

13 Data analysis in excel:
module 7

14 Surprise! module 7

15 Reject the null hypothesis and say means ARE different:
Check it out with confidence intervals They don’t overlap! But remember we did not say “higher” or “lower” which would have been a two-tailed test module 7

16 T-tests: Use the t (or “student’s t) statistic
Used for smaller sample sizes Uses degrees of freedom (df) which is one less than the sample size As sample size increases, the t distribution becomes the normal distribution module 7

17 If variances are different:
Use Tools, Data Analysis, t-test assuming unequal variances Compare Marble City and Tahlequah module 7

18 Cannot reject H: means are the same:
module 7

19 Other cases: When you don’t know the variance of your underlying “real” population, it is estimated using the t distribution instead of the normal (z) distribution See exercises module 7


Download ppt "Comparing two means: Module 7 continued module 7."

Similar presentations


Ads by Google