Presentation is loading. Please wait.

Presentation is loading. Please wait.

Simulation-Based Approach for Comparing Two Means

Similar presentations


Presentation on theme: "Simulation-Based Approach for Comparing Two Means"— Presentation transcript:

1 Simulation-Based Approach for Comparing Two Means
Section 7.2 Simulation-Based Approach for Comparing Two Means

2 Comparison to Proportions
We will be comparing means, much the same way we compared two proportions using randomization techniques in Fathom. The difference here is that instead of two categorical variables, we will have a categorical variable and a quantitative variable.

3 Are women hotter than men?
Research Question: Is the mean (or average) body temperature of females larger than the mean body temperature for males? Female 96.4° 97.4° 97.6° 97.8° 97.9° 98.0° 98.0° 98.2° 98.3° 98.4° 98.6° 98.6° 98.8° 99.0° 99.1° 99.2° 99.3° 99.4° 99.9° ° Male 97.1° 97.1° 97.2° 97.4° 97.5° 97.6° 97.7° 97.8° 97.9° 98.0° 98.0° 98.1° 98.2° 98.3° 98.4° 98.6° 98.6° 98.9° 99.0° 99.5°

4 Histograms

5 Means The sample mean for the female temperatures is 98.535° F.
The sample mean for the male temperature is ° F. In our samples, the mean temperature for females is 0.49° F higher than that for males.

6 Question If in the population from which our sample was drawn, the male and female mean body temperatures were the same, is it possible that a difference as great or greater than we saw in our samples (>0.49° F) could occur by chance? Is it unlikely? Let’s assume there is no difference and scramble.

7 Scrambled Body Temperatures
Female: 98.3° 98.3° 99.0° 99.1° 97.6° 97.1° 97.7° 98.8° 98.0° 98.0° 97.9° 97.4° 98.0° 99.2° 98.6° 98.1° 98.6° 97.4° 96.4° 99.3° Male: 97.8° 99.5° 99.9° 97.8° 97.6° 97.5° 99.4° 97.9° 98.6° 97.2° 98.4° 98.9° ° 98.4° 98.2° 98.2° 99.0° 97.1° 98.6° 98.0° Mean difference (females – males): –0.09° F.

8 More Scrambled Body Temperatures
Female: 97.9° ° 97.7° 96.4° 98.3° 97.6° 98.0° 97.6° 98.4° 98.0° 97.1° 98.2° 98.0° 99.5° 98.6° 97.5° 97.8° 99.9° 98.6° 97.8° Male: 98.8° 98.4° 97.2° 98.2° 99.0° 97.4° 97.4° 99.1° 98.6° 97.1° 99.3° 98.6° 99.4° 99.2° 98.1° 97.9° 99.0° 98.3° 98.9° 98.0° Mean difference (females – males): –0.21° F.

9 Even More Scrambled Body Temps
Female: 99.0° 98.9° 97.6° 98.4° 99.4° 97.6° 97.9° 98.3° 97.1° 99.9° 98.2° 99.2° 96.4° 97.2° 98.3° 98.6° 98.6° ° 99.3° 97.5° Male: 98.0° 97.8° 98.6° 98.6° 99.5° 98.8° 98.1° 98.0° 97.4° 98.0° 97.1° 97.4° 97.9° 97.7° 98.2° 98.4° 98.0° 97.8° 99.1° 99.0° Mean difference (females – males): 0.24° F.

10 1000 Scramblings The results of the mean differences of 1000 scramblings. 32/1000 or 3.2% of the time we got a mean difference as large or larger than our original difference of 0.49° F. Is it unlikely?

11 Conclusion If we assume there is no difference between the mean temperatures of females and males, the likelihood of getting a sample mean difference as large or larger than we did (>0.49° F) is so small (0.032), we conclude that our assumption is probably wrong. Hence, we conclude that females are hotter than males! In this example what is The null hypothesis? The alternative hypothesis? The p-value? Our conclusion?

12 Scrambling in Fathom is done just as it was in the last chapter
Scrambling in Fathom is done just as it was in the last chapter. We scramble the explanatory variable.

13 Summary of Randomization Method
Compute the measure. (In this case it is the difference in means.) Scramble the explanatory variable, recompute the measure, and repeat this process many times. (This process models a true null hypothesis. If there is no difference in temperatures between males and females, we can mix them up.) Reject the null if the original sample measure is in the tail of the null distribution (small p-value) and conclude the alternative hypothesis.

14 Let’s try it. Let’s do the body temperature example together in Fathom. After that, we will work on Exploration 7.2: Snooze or Lose.

15 Section 7.3: Comparing two means with traditional methods
Just as we’ve seen with one proportion, and two proportions, there are simulation-based methods to conduct tests of significance and traditional ones. Traditional methods use some distribution to model our null distribution. With the proportions, this is a normal distribution. With means, this is a t-distribution.

16 Names for this traditional test
Independent samples t-test Two sample t-test Fathom just has it as Comparing Means.

17 T-distributions t-distributions have a similar bell-shape to that of normal distributions. For small sample sizes, the t-distributions we will use to model our null hypotheses are shorter and wider than normal distributions with the same mean and standard deviation. As the sample size increases, the curve comes closer and closer to a normal curve.

18

19 Inference Earlier in this chapter, we tested to see if females have higher body temperatures, on average, than males. We found the mean temperature for females in our sample was ° F and for males it was ° F. Hence females, on average are 0.49° F warmer than males in our sample. We used the randomize method and found a p-value of Hence, we concluded ….

20 Traditional Test We will use a t-distribution instead of a scrambled distribution to determine our p-value.

21 Two-Sample t-test The center, shape, and spread of our predicted scrambled distribution (the t-distribution) is about the same as the scrambled distribution. Using the traditional test, we get a p-value of The advantage of using the traditional test over the randomization method is that it can be done quickly and easily using software.

22 A Little more Vocabulary
The t-distribution that we used to predict our scrambled distribution is known as a sampling distribution. The standard deviation of a sampling distribution is known as the standard error. Our original difference in means of 0.49° F is about 2 standard errors away from the mean.

23 Conditions (Old and New)
Quantitative response variable for two groups (the two groups are the two categories of the explanatory variable). Independent random samples. If your sample size is small (say less than 20) the sample data for each group cannot be strongly skewed or contain outliers. If your sample size is large then you need not be too concerned as to the shape of your sample distributions.

24 Temperature Example Run the test in Fathom along with finding the statistics and graph. (The data set is body-temps.ftm) Also find a confidence interval for the difference in the two means. Use the entire data set (temp_heart_rate_all.ftm) to run a test and find a confidence interval. Compare results.

25 Homework: Exercises in Chap 5
#19 and also do a traditional test. #30 use Fathom not SPSS so use data set with the .ftm extension.

26 Power Remember that power is the probability of concluding the alternative hypothesis when it is really true. We already know: as sample size increases, power increases. as significance level increases, power increases.

27 More Power In chapter 4 we saw that as population correlation moves farther from zero, power increases. Corresponding to this, as the difference in the population means gets farther away from zero, the easier it will be to show that the alternative hypothesis is true, thus the power increases.

28 Still More Power We now have standard deviation
If the means are the same distance apart, but the standard deviations are quite different. Which would be easier to conclude the alternative?

29 Even More Power As standard deviations increases, power decreases

30 Summarizing Power As sample size increases, power increases.
As the difference in means moves farther from zero (or the means move farther apart), power increases. As significance level increases, power increases. As the standard deviations increase, power decreases.

31 Power Calculator Show an example with the power calculator to answer these questions: As standard deviation increases, will I need larger or smaller sample sizes to maintain 80% power? As difference between means increases, will I need larger or smaller sample sizes to maintain 80% power?

32 Section 5.4: Paired Data Tests
In the last two sections, we looked at comparing two means taken from independent samples. Measures from one sample had no relationship (or were independent from) to any measures from the other sample. Suppose we wanted to see if people lose weight on a new diet. We have pre-weights and post-weights. Are any measures from one of these samples related to a measure from the other?

33 Paired vs. Unpaired Data (1)
Unpaired data: How much warmer are females than males, on average? Independent samples (No reason to match up a specific female temperature with a specific male temperature.) Paired data: How much faster do people’s hearts beat before and after doing 30 jumping jacks? Dependent samples (We will look at the differences in peoples heart rates before and after exercising.)

34 Paired vs. Unpaired Data (2)
For unpaired data: Use the two sample t-test. We cannot use a paired samples test. It would make no sense to pair data arbitrarily. When we are able to pair up data, we take quite a bit of variability out of the picture. Think of pre-weight and post-weight. The variability in people’s initial weights is removed.

35 Many Names for the same thing
All of these mean the same: Paired Data Dependent Samples Matched Pairs

36 Practice Use the Health Dynamics Data from 1985 to investigate whether students gain weight during the semester they take Health Dy. Look at sample statistics and graph Show how to compute new data Run test Compare this result to doing a two sample t-test.

37 More Practice Answer these questions:
On average, does the flexibility of students change during the semester they take Health Dynamics? On average, does the body fat percentage of students change during the semester they take Health Dynamics? You should have descriptive stats, graph, hypotheses, p-value, conclusion.

38 Results Null: There is no change in students’ flexibility, on average, during the semester they take health dynamics. Alternative: There is a change in students’ flexibility, on average, during the semester they take health dynamics.

39

40 Conclusion With a p-value of 0.002, we can conclude that students’ flexibility changes, on average, during the semester they take health dynamics. Since post flexibility in our sample was a larger number than pre flexibility, we can conclude that students’ flexibility increases on average during the semester they take health dynamics. A 95% confidence interval for this difference is to

41 More Results Null: There is no change in students’ body fat percentage, on average, during the semester they take health dynamics. Alternative: There is a change in students’ body fat percentage, on average, during the semester they take health dynamics.

42

43 Conclusion With a p-value of <0.0001, we can conclude that students’ body fat changes, on average, during the semester they take health dynamics. Since post body fat in our sample was a smaller number than pre body fat, we can conclude that students’ body fat percentage decreases on average during the semester they take health dynamics. A 95% confidence interval for this difference is to

44 Homework Do exercises 21, 22, 23, 26, 28, 34, and 36 from chapter 5.
For question 34, use the fathom (CholesterolLevel.ftm) worksheet and not SPSS.


Download ppt "Simulation-Based Approach for Comparing Two Means"

Similar presentations


Ads by Google