Statistical Analysis: Testing for Differences in Means and Proportions, Exams of Data Analysis & Statistical Methods

A lecture script from a statistics course (sta100) covering the topic of testing for differences in means and proportions. It explains how to conduct tests for population means using large and small sample statistics, as well as tests for differences in proportions. The lecture also includes an example problem on testing for a difference in mean completion times for two production methods.

Typology: Exams

Pre 2010

Uploaded on 08/09/2009

koofers-user-x4s
koofers-user-x4s ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
STA100 Lecture 21
1 | P a g e
Text Sections 9.4, 9.5
So far we have seen how to think rationally about conducting tests for the various aspects of a
population that we care about. Since most people like to have a quick summary of a large data set
(for example, what is the median selling price for a home in your neighborhood?) we like to be able to
obtain useful information from our sample regarding population parameters such as the mean and the
standard deviation.
At this point you should feel reasonably comfortable with our methodology for conducting a test (the 6
steps) and how to implement this methodology for several particular cases. In particular, you should
know how to
๏‚ท Conduct a test about the population mean ๐œ‡ when you have a large sample for reasonably
shaped populations and when you have a small sample in the special case of a normal
population. Remember that our class does not discuss small samples from non-nomral
populations. If your population has a good deal of skew you need to think carefully about how
to proceed.
Large sample statistic when testing ๐œ‡ :
๐‘ง= ๐‘ฅ โˆ’ ๐œ‡
๐œŽ ๐‘›
Small sample statistic when testing ๐œ‡ :
๐‘ก= ๐‘ฅ โˆ’ ๐œ‡
๐‘  ๐‘›
๏‚ท You know how to conduct a test about a population proportion.
Statistic when testing ๐‘ :
๐‘ง= ๐‘ โˆ’ ๐‘
๐‘ 1โˆ’๐‘
๐‘›
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Statistical Analysis: Testing for Differences in Means and Proportions and more Exams Data Analysis & Statistical Methods in PDF only on Docsity!

Text Sections 9.4, 9. So far we have seen how to think rationally about conducting tests for the various aspects of a population that we care about. Since most people like to have a quick summary of a large data set (for example, what is the median selling price for a home in your neighborhood?) we like to be able to obtain useful information from our sample regarding population parameters such as the mean and the standard deviation.

At this point you should feel reasonably comfortable with our methodology for conducting a test (the 6 steps) and how to implement this methodology for several particular cases. In particular, you should know how to ๏‚ท Conduct a test about the population mean ๐œ‡ when you have a large sample for reasonably shaped populations and when you have a small sample in the special case of a normal population. Remember that our class does not discuss small samples from non-nomral populations. If your population has a good deal of skew you need to think carefully about how to proceed.

Large sample statistic when testing ๐œ‡ : ๐‘ง = ๐‘ฅ โˆ’๐œŽ ๐œ‡ ๐‘›

Small sample statistic when testing ๐œ‡ : ๐‘ก = ๐‘ฅ โˆ’๐‘  ๐œ‡ ๐‘›

๏‚ท You know how to conduct a test about a population proportion.

Statistic when testing ๐‘ : ๐‘ง = ๐‘ โˆ’^ ๐‘ ๐‘ 1 โˆ’ ๐‘ ๐‘›

๏‚ท When you have a question about whether two populations have the same mean and you obtain independent samples you know how to use the statistic

Small sample statistic when testing ๐œ‡ 1 โˆ’ ๐œ‡ 2 : ๐‘ก = ๐‘ฅ^1 โˆ’ ๐‘ฅ^2 โˆ’^ ๐œ‡^1 โˆ’ ๐œ‡^2 ๐‘  12 ๐‘› 1 +^

๏‚ท If you have a question about whether two populations have the same mean and you obtain independent samples you can use the following statistic if your samples are both at least of size 30:

Large sample statistic when testing ๐œ‡ 1 โˆ’ ๐œ‡ 2 : ๐‘ง = ๐‘ฅ^1 โˆ’ ๐‘ฅ^2 โˆ’^ ๐œ‡^1 โˆ’ ๐œ‡^2 ๐œŽ 12 ๐‘› 1 +^

So, whatโ€™s left to do? Your book tells you how to conduct tests concerning a populationโ€™s standard deviation, and how to compare standard deviations from two populations. In this introductory class we arenโ€™t going to worry about that. You may want to compare proportions from two populations. For example, you might want to test whether men and women have high blood pressure at the same rates. In this case you would want to test whether ๐‘๐‘š๐‘’๐‘› = ๐‘๐‘ค๐‘œ๐‘š๐‘’๐‘› for example. You also might want to test for a difference in population means when your data come from samples which are not independent (for instance, to see whether an SAT preparation course adds value you could round up 40 highschoolers, give them the SAT, give them the course, then give them the SAT again. Weโ€™ll treat both of these topics below. Remember the 6 steps: ๏‚ท State clearly what your variables are ๏‚ท Compute a test statistic ๏‚ท State the null and alternative hypotheses ๏‚ท Find the ๐‘-value ๏‚ท Decide upon a level of significance, ๐›ผ ๏‚ท Form a conclusion

Looking at the picture it certainly seems like high bottom concentration values correspond to high top concentration values, and the same for low values. These data clearly come in pairs. A clever way to treat this case is by taking that fact seriously. Instead of seeing 12 data points, see 6 differences. Bottom Water Top Water Differences 0.430 0.415 0. 0.266 0.238 0. 0.567 0.390 0. 0.531 0.410 0. 0.707 0.605 0. 0.716 0.609 0.

If you want to test whether there is a difference on average between the bottom concentrations and the top concentrations, test whether the average difference is equal to zero. We know how to do this when the population of differences is normal, and that is what we will assume here.

๏‚ท State clearly what your variables are ๏‚ท Compute a test statistic ๏‚ท State the null and alternative hypotheses ๏‚ท Find the ๐‘-value ๏‚ท Decide upon a level of significance, ๐›ผ ๏‚ท Form a conclusion

  1. State clearly what your variables are We will let ๐œ‡๐‘๐‘œ๐‘ก๐‘ก๐‘œ๐‘š represent the average zinc concentration on the bottom and similarly let ๐œ‡๐‘ก๐‘œ๐‘ represent the average zinc concentration on the top.
  2. State the null and alternative hypotheses ๐ป 0 : ๐œ‡๐‘๐‘œ๐‘ก๐‘ก๐‘œ๐‘š โˆ’ ๐œ‡๐‘ก๐‘œ๐‘ = 0 ๐ป 1 : ๐œ‡๐‘๐‘œ๐‘ก๐‘ก๐‘œ๐‘š โ‰  ๐œ‡๐‘ก๐‘œ๐‘ = 0
  3. Decide upon a level of significance Take ๐›ผ = 0.
  1. Compute a test statistic Since we have a small sample and we are testing means we hope to use the student t. Weโ€™ll assume that the population of differences is normally distributed (software can always help you to test this) and compute: ๐‘ก = ๐‘ฅ โˆ’๐‘  ๐œ‡ ๐‘›

= ๐‘ฅ๐‘๐‘œ๐‘ก๐‘ก๐‘œ๐‘š^ โˆ’ ๐‘ฅ๐‘ก๐‘œ๐‘^ ๐‘ ๐‘‘โˆ’^ ๐œ‡๐‘๐‘œ๐‘ก๐‘ก๐‘œ๐‘š^ โˆ’ ๐œ‡๐‘ก๐‘œ๐‘

= ๐‘ฅ๐‘‘ ๐‘ ^ ๐‘‘โˆ’^ ๐œ‡๐‘‘

Here we are saying that the โ€œdifference of the averages ๐‘ฅ๐‘๐‘œ๐‘ก๐‘ก๐‘œ๐‘š โˆ’ ๐‘ฅ๐‘ก๐‘œ๐‘ works out to the same number as the average of the differences ๐‘ฅ๐‘‘. The same holds true for the population means. We will take ๐‘ ๐‘‘ to be the standard deviation of the differences and the sample size ๐‘› to be the number of differences, 6. Remember how to compute a standard deviation for a set of numbers. Weโ€™ll use the โ€œcomputing formula: ๐‘ซ๐’Š๐’‡๐’‡๐’†๐’“๐’†๐’๐’„๐’†๐’” ๐‘ซ๐’Š๐’‡๐’‡๐’†๐’“๐’†๐’๐’„๐’†๐’”๐Ÿ 0.015 0. 0.028 0. 0.177 0. 0.121 0. 0.102 0. 0.107 0. 0.55 0.

So that

๐‘ฅ๐‘‘ = 0.55 6 = 0.

๐‘‘๐‘–^2 โˆ’ 1 ๐‘› ๐‘‘๐‘– ๐‘‘๐‘–

๐‘› โˆ’ 1 =^

6 โˆ’ 1 =^

And then

๐‘ก = ๐‘ฅ โˆ’๐‘  ๐œ‡ ๐‘›

= 0.0916666670.060688275^ โˆ’^0

Differences between Population Proportions It seems very natural to look at different populations and determine whether, for instance, high blood pressure is as common in men as it is in women. We already know how to handle tests in general. All we ever really need in a given situation is the proper statistic- everything else stays the same.

So, hereโ€™s the statistic. If we were to repeatedly form samples of women of size ๐‘›๐‘ค๐‘œ๐‘š๐‘’๐‘› , find out how many of them have high blood pressure, ๐‘Ÿ๐‘ค๐‘œ๐‘š๐‘’๐‘› and divide to get

๐‘๐‘ค๐‘œ๐‘š๐‘’๐‘› = (^) ๐‘›๐‘Ÿ๐‘ค๐‘œ๐‘š๐‘’๐‘› ๐‘ค๐‘œ๐‘š๐‘’๐‘›

And do the same for men

๐‘๐‘š๐‘’๐‘› = (^) ๐‘›๐‘Ÿ๐‘š๐‘’๐‘›๐‘š๐‘’๐‘›

And then considered the sampling distribution of the differences in the sample proportions (itโ€™s a mouthful, but make sure you know what we are talking about) we would get roughly a normal distribution from the statistic

๐‘ง = (^) ๐‘๐‘๐‘ค๐‘œ๐‘š๐‘’๐‘›^ โˆ’ ๐‘๐‘š๐‘’๐‘›^ โˆ’^ ๐‘๐‘ค๐‘œ๐‘š๐‘’๐‘›^ โˆ’ ๐‘๐‘š๐‘’๐‘› ๐‘ค๐‘œ๐‘š๐‘’๐‘› 1 โˆ’ ๐‘๐‘ค๐‘œ๐‘š๐‘’๐‘› ๐‘›๐‘ค๐‘œ๐‘š๐‘’๐‘› +^

as long as our sample sizes were decently large. Hereโ€™s an example to make this a bit more concrete.

An experiment was conducted to test the effect of a new drug on a viral infection. The infection was induced in 100 mice after which the mice were randomly split into two groups of 50. The first group (called the treatment group) received the drug. The second group (called the control group) received no treatment for the infection. After a 30 day period, the proportions of survivors, ๐‘๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก and ๐‘๐‘๐‘œ๐‘›๐‘ก๐‘Ÿ๐‘œ๐‘™ , in the two groups were found to be ๐‘๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก = 0.60 and ๐‘๐‘๐‘œ๐‘›๐‘ก๐‘Ÿ๐‘œ๐‘™ = 0.36. Test at the ๐›ผ = 0.05 level of significance whether the proportion of survivors was higher in the treatment group.

Note: Try this yourself before looking at the solution.

Six Steps:

  1. We will call the proportion of survivors in the hypothetical population of mice given the drug ๐‘๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก and in the hypothetical population of mice not given the drug ๐‘๐‘๐‘œ๐‘›๐‘ก๐‘Ÿ๐‘œ๐‘™. Note that we donโ€™t have access to all the mice in the world so we donโ€™t know what these numbers are. We just know them for our small sample.
  2. ๐ป 0 : ๐‘๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก โˆ’ ๐‘๐‘๐‘œ๐‘›๐‘ก๐‘Ÿ๐‘œ๐‘™ = 0 , ๐ป 1 : ๐‘๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก โˆ’ ๐‘๐‘๐‘œ๐‘›๐‘ก๐‘Ÿ๐‘œ๐‘™ > 0 (Do you see why this is a one tailed test?)
  3. ๐›ผ = 0.

๐‘ง = (^) ๐‘๐‘๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก^ โˆ’ ๐‘๐‘๐‘œ๐‘›๐‘ก๐‘Ÿ๐‘œ๐‘™^ โˆ’^ ๐‘๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก^ โˆ’ ๐‘๐‘๐‘œ๐‘›๐‘ก๐‘Ÿ๐‘œ๐‘™ ๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก ๐‘› 1 โˆ’ ๐‘๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก ๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก +^

Note that your textbook (pooled estimate, page 464) makes a valid point here. If we are trying to see whether the data are consistent with ๐‘๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก = ๐‘๐‘๐‘œ๐‘›๐‘ก๐‘Ÿ๐‘œ๐‘™ = ๐‘ then we should construct our statistic as if this is true. Whatโ€™s the best way to estimate ๐‘? We would do this by taking the number of surviving mice and dividing by the number of mice participating. That is, estimate this common value as

๐‘ = (^) ๐‘›๐‘Ÿ^1 +^ ๐‘Ÿ^2 1 +^ ๐‘› 2

And then use

๐‘ง = ๐‘๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก^ โˆ’ ๐‘๐‘๐‘œ๐‘›๐‘ก๐‘Ÿ๐‘œ๐‘™^ โˆ’^ ๐‘๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก^ โˆ’ ๐‘๐‘๐‘œ๐‘›๐‘ก๐‘Ÿ๐‘œ๐‘™ ๐‘ 1 โˆ’ ๐‘ ๐‘›๐‘ก๐‘Ÿ๐‘’๐‘Ž๐‘ก๐‘š๐‘’๐‘›๐‘ก +^

๐‘ง = 0.6^ โˆ’^ 0.36^ โˆ’^0