Inferences for a Single Population Mean ( )



12 - CLASSIC STATISTICAL INFERENCE

(Hypothesis Testing and CI’s)

12.1 – Confidence Interval for a Single Population Mean ([pic])

We have already looked at confidence intervals as a method of making decisions about the population mean μ. The confidence interval details are summarized below.

(100 - [pic])% Confidence Interval for [pic] (e.g. [pic]confidence)

Recall the basic form of a confidence interval is as follows:

(estimate) + (table value) * SE(estimate)

For a single population mean a 100(1-[pic])% CI for [pic] is:

[pic]

where [pic] and [pic]= t-distribution quantile with [pic].

|Confidence Level |To find the t-statistic value ([pic])|

| |use the two-tail α at the top of the |

| |columns in the table. |

|95 % ([pic] | |

|90 % ([pic]) | |

|99 % ([pic]) | |

Before we look at hypothesis testing for a single population mean we will examine the five basic steps in a hypothesis test and introduce some important terminology and concepts.

12. 2 - Steps in a Hypothesis Test

1.

2.

3.

4.

5.

12. 3 - Hypothesis Testing for a Population Mean ([pic])

General Form of Hypotheses for a Population Mean:

|Null Hypothesis ([pic]) |Alternative Hypothesis ([pic]) |p-value area |

|[pic] |[pic] |Upper-tail |

|[pic] |[pic] |Lower-tail |

|[pic] |[pic] |Two-tailed |

| | |(perform test using CI for [pic]) |

[pic]hypothesized value for the mean assuming the null hypothesis is true.

Examples of Formulating Hypotheses:

1) Suppose in the past the north end of a particular lake had a Secchi depth of 8.0 meters. Due to recent development around the lake, researchers believe that there is decreased water clarity in that section of the lake. Set up the appropriate hypotheses for this situation.

2) In the community of Morgan Hill, CA there is concern about the perchlorate level found in well water. EPA guidelines suggest that a water supply should have a mean perchlorate level below 4 ppb (parts per billion). Environmental scientists wish to determine if mean perchlorate level in the Morgan Hill water supply is greater than the safe limit. Set up the appropriate hypotheses for this situation.

Test Statistic (in general)

In general the basic form of most test statistics is given by:

Test Statistic = [pic] (think “z-score”)

which measures the discrepancy between the estimate from our sample and the hypothesized value under the null hypothesis. Specifically it gives the number of standard errors above (if positive) or below (if negative) the hypothesized value our observed statistic value is.

Intuitively, if our sample-based estimate is “far away” from the hypothesized value assuming the null hypothesis is true, we will reject the null hypothesis in favor of the alternative or research hypothesis. Extreme test statistic values occur when our estimate is a large number of standard errors away from the hypothesized value under the null. The p-value is the probability, that by chance variation alone, we would get a test statistic as extreme or more extreme than the one observed assuming the null hypothesis is true. If this probability is “small” then we have evidence against the null hypothesis, in other words we have evidence to support our research hypothesis.

Test Statistic for Testing a Single Population Mean ([pic]) ~ (t-test)

[pic]~ t-distribution with df = n – 1.

Assumptions:

When making inferences about a single population mean we assume the following:

1. The sample constitutes a random sample from the population of interest.

2. The population distribution is normal. This assumption can be relaxed when our sample size in sufficiently “large”. How large the sample size needs to be is dependent upon how “non-normal” the population distribution is.

Type I and Type II Errors [pic]

Type I and II Errors Example:

Testing Wells for a Perchlorate in Morgan Hill & Gilroy, CA.

EPA guidelines suggest that drinking water should not have a perchlorate level exceeding 4 ppb (parts per billion). Perchlorate contamination in California water (ground, surface, and well) is becoming a widespread problem. The Olin Corp., a manufacturer of road flares in the Morgan Hill area from 1955 to 1996 was is the source of the perchlorate contamination in the this area.

Suppose you are resident of the Morgan Hill area which alternative do you want well testers to use and why? (Which has the more serious type I error, A or B?)

A B

[pic] or [pic]

Examples: Testing a Single Population Mean

Example 1: Secchi Disc Readings in Seneca Lake (New York)

In 1997 the mean Secchi depth recorded at the north end of Seneca Lake was 8.0 meters. In 1999 a depth study was conducted on the north end of the lake on similar dates as in the 1997 study yielding the data below:

9.0 9.0 10.5 8.0 9.2 7.0 8.3 6.0 7.1 4.7 7.8 6.0

7.9 6.5 8.3 7.4

Is there evidence to suggest the Secchi depth has decreased on the north end of the lake?

[pic][pic]

From the JMP output we see the following:

• Normality appears to be satisfied here.

• Notice the CI for the mean Secchi depth is (6.89 m, 8.44 m).

Hypothesis Test:

1) [pic]

2) Choose α ’

Test statistic

3) Compute test statistic

4) Find p-value (use t-Probability Calculator.JMP)

[pic]

5) Make decision and interpret

Performing the t-Test in JMP: Select Distribution from the Analyze menu and put the numeric response in the Y columns box. To perform a t-test in JMP, select Test Mean from the Secchi Depth pull-down menu and enter value for mean under the null hypothesis, 8.0 in this example.

[pic]

[pic]

Example 2: Testing Wells for a Perchlorate in Morgan Hill & Gilroy, CA

[pic] [pic]

Hypothesis Test:

1) [pic]

2) Choose α ’

Test statistic

3) Compute test statistic

4) Find p-value (use t-Probability Calculator.JMP)

[pic]

5) Make decision and interpret

Performing a t-Test in JMP:

To perform a t-test in JMP, select Test Mean from the Perchlorate pull-down menu and enter value for mean under the null hypothesis, 4.0 in this example.

[pic]

[pic]

Should we be using the mean as a measure of the typical perchlorate concentration found in these wells? Why or why not?

Consider the log base 10 of the perchlorate levels instead.

[pic]

Hypothesis Test in Log Scale:

[pic]

Confidence Interval in the Log Base 10 Scale

Making Inferences About a Population Proportion (p)

12. 4 - Confidence Interval for a Single Population Proportion (p)

We have already discussed the confidence interval as a means of make a decision about the value of the population proportion, p. The CI results are summarized below.

Confidence Interval for p

100(1 - [pic])% CI for p

[pic]

[pic]

Here [pic]sample proportion which is the number of “successes” in our sample divided by the sample size, [pic], and z = equals a standard normal table value that corresponds to our desired confidence level.

|Confidence Level | z |

|95 % ([pic] | 1.96 |

|90 % ([pic]) | 1.645 |

|99 % ([pic]) | 2.576 |

12.5 - Hypothesis Tests for the Population Proportion (p)

[pic]

Test Statistic

[pic]standard normal[pic]

When our sample size is small or we want an exact test we can use the binomial distribution to calculate the p-value, i.e. use the Binomial Exact Test.

Example: Hypertension During Finals Week

In the college-age population in this country (18 – 24 yr. olds), about 9.2% have hypertension (systolic BP > 140 mmHg and/or diastolic BP > 90 mmHg). Suppose a sample of n = 196 WSU students is taken during finals week and 29 have hypertension.

Do these data provide evidence that the percentage of students who are hypertensive during finals week is higher than 9.2%?

Hypothesis Test:

[pic]

2) Choose α ’

Test statistic

3) Compute test statistic

4) Find p-value (use Standard Normal Table)

5) Make decision and interpret

Binomial Exact Test Use n = 196 and p = .092 (hypothesized value under Ho)

[pic]

Exact p-value =

Find a 95% Confidence Interval for p:

12.5 - Comparing Two Population Means using Independently

Drawn Samples ([pic])

Example 1: Effect of Cadmium Oxide on Hemoglobin Levels in Dogs

An experiment was conducted to determine the examine the potential effect cadmium oxide might have on the hemoglobin levels of dogs. It is thought that cadmium oxide exposure would lead to decreased hemoglobin levels. 10 dogs were randomly assigned to the control group and 15 were randomly assigned to the cadmium oxide exposure group.

Research Question: Is there evidence to suggest the cadmium oxide exposure lowers the hemoglobin level found in dogs?

[pic]

To answer the question of interest we need tools for comparing the population mean hemoglobin level for dogs not exposed to cadmium oxide vs. that for dogs that have had cadmium oxide exposure, i.e. how does [pic] compare to [pic]?

Basic Idea:

Case 1 ~ Equal Populations Variances/Standard Deviations ([pic]=[pic]( common variance to both populations)

Assumptions:

For this case we make the following assumptions

1. The samples from the two populations were drawn independently.

2. The population variances/standard deviations are equal.

3. The populations are both normally distributed. This assumption can be relaxed

when the samples from both populations are “large”.

100(1 - [pic])% Confidence Interval for ([pic])

[pic]

where

[pic]

[pic] is called the “pooled estimate of the common variance [pic]”. The degrees of freedom for the t-distribution is [pic]. The t-quantiles are same as those for the single population mean case described above.

CI Example: Cadmium Exposure and Hemoglobin Levels

[pic]

Hypothesis Testing with Independent Samples ([pic]) (Section 7.2)

The general null hypothesis says that the two population means are equal, or equivalently there difference is zero. The alternative or research hypothesis can be any one of the three usual choices (upper-tail, lower-tail, or two-tailed). For the two-tailed case we can perform the test by using a confidence interval for the difference in the population means discussed above.

[pic]

Test Statistic

[pic]

where the [pic] is as defined in the confidence interval section above.

Testing Example: Cadmium Exposure and Hemoglobin Levels

Conducting the Test in JMP

Case 2 ~ Unequal Populations Variances/Standard Deviations ([pic])

Assumptions:

For this case we make the following assumptions

1. The samples from the two populations were drawn independently.

2. The population variances/standard deviations are NOT equal.

(This can be formally tested or use rule o’thumb)

3. The populations are both normally distributed. This assumption can be relaxed

when the samples from both populations are “large”.

100(1 - [pic])% Confidence Interval for ([pic])

[pic]

where

[pic]

The t-quantiles are the same as those we have seen previously.

Hypothesis Testing

Test Statistic

[pic]t-distribution with df = (using formula above)

where the [pic] is as defined above.

Example: Mean Cell Radii of Malignant vs. Benign Breast Tumors

In your previous work with these data you noticed that the radii of malignant breast tumor cells were generally larger than the radii of benign breast tumor cells. Assuming the researchers initially hypothesized that cancerous breast tumor cells have larger mean radii than non-cancerous cells, conduct a test to see if this is supported by these data.

[pic]

The cell radii of the malignant tumors certainly appear to be larger than the cell radii of the benign tumors. The summary statistics support this with sample means/medians of rough 17 and 12 units respectively. The 95% CI’s for the mean cell radius for the two tumor groups do not overlap, which further supports a significant difference in the cell radii exists.

Can we assume the population variances are equal?

Formally Testing the Equality of Population Variances

In JMP

[pic]

Because we conclude that the population variances are unequal we should use the non-pooled version to the two-sample t-test. No one does this by hand, so we will use JMP.

[pic]

12.6 - Comparing Two Population Means Using

Dependent Samples or Matched Pairs

When using dependent samples each observation from population 1 has a one-to-one correspondence with an observation from population 2. One of the most common cases where this arises is when we measure the response on the same subjects before and after treatment. This is commonly called a “pre-test/post-test” situation. However, sometimes we have pairs of subjects in the two populations meaningfully matched on some pre-specified criteria. For example, we might match individuals who are the same race, gender, socio-economic status, height, weight, etc... to control for the influence these characteristics might have on the response of interest. When this is done we say that we are “controlling for the effects of race, gender, etc...”. By using matched-pairs of subjects we are in effect removing the effect of potential confounding factors, thus giving us a clearer picture of the difference between the two populations being studied.

DATA FORMAT

|Matched Pair |[pic] |[pic] |[pic] |

|1 |[pic] |[pic] |[pic] |

|2 |[pic] |[pic] |[pic] |

|3 |[pic] |[pic] |[pic] |

|... |... |... |... |

|n |[pic] |[pic] |[pic] |

The hypotheses are

[pic]

Test Statistic for a Paired t-test

[pic]t-distribution with df = n - 1

Note: [pic]the hypothesized value for the mean paired difference under the null.

Assumptions:

1. The samples are random and meaningfully paired, i.e. are dependent.

2. Paired differences from two populations must be normally distributed.

100(1-[pic])% CI for [pic]

[pic] where [pic] comes from the appropriate quantile of t-distribution df = n – 1.

This interval has a 100(1-[pic])% chance of covering the true mean paired difference.

Example: Effect of Captopril on Blood Pressure

In order to estimate the effect of the drug Captopril on blood pressure (both systolic and diastolic) the drug is administered to a random sample n = 15 subjects. Each subjects blood pressure was recorded before taking the drug and then 30 minutes after taking the drug. The data are shown below.

[pic]

Research Questions:

• Is there evidence to suggest that Captopril results in a mean systolic blood pressure decrease of at least 10 mmHg* on average in patients 30 minutes after taking it? (* It is decided that a mean change of less than 10 mmHg is of no physiological importance.)

• Is there evidence to suggest that Captopril results in a mean diastolic blood pressure decrease of at least 5 mmHg* on average in patients 30 minutes after taking it? (* It is decided that a mean change of less than 5 mmHg is of no physiological importance.)

For each blood pressure we need to consider paired differences of the form

[pic]

For paired differences defined this way, positive values correspond to a reduction in their blood pressure ½ hour after taking Captopril. To answer the research questions above we need to conduct the following hypothesis tests:

[pic] and [pic]

Below are the relevant statistical summaries of the paired differences for both blood pressure measurements.

[pic]

The t-statistics for both tests are given below:

Systolic BP Diastolic BP

We can use the t-Probability Calculator in JMP to find the associated p-values or better yet use JMP to conduct the entire t-test.

Systolic Blood Pressure Diastolic Blood Pressure

[pic]

Both tests result in rejection of the null hypotheses. This we have sufficient evidence to suggest that taking Captopril will result in mean decrease in systolic blood pressure exceeding 10 mmHg (p = _______) and a mean decrease in diastolic blood pressure exceeding 5 mmHg (p = _______). Furthermore we estimate that the mean change in systolic blood pressure will be somewhere between _______ mmHg and ______ mmHg, and that the mean change in diastolic blood pressure could be as large as ______ mmHg.

95% CI’s for the Mean Change in Systolic and Diastolic Blood Pressures

[pic]

12.7 - Comparing Two Population Proportions [pic]

Using Independent Samples

As we have seen previously,

100(1 - [pic])% Confidence Interval for ([pic])

[pic] ( (provided [pic]are “large”)

where,

[pic]

and

|Confidence Level | z |

|95 % ([pic] | 1.96 |

|90 % ([pic]) | 1.645 |

|99 % ([pic]) | 2.576 |

Hypothesis Testing

[pic]

Test Statistic

[pic]standard normal distribution provided [pic] are “large” (see above)

Where,

[pic]

Example 1: Snail Predation (Banded vs. Unbanded)

An important enemy of the snail (Cepaea nemoralis) is the song thrush. These birds select snails from snail colonies and take them to nearby rocks. There the birds break open the snails, eat the soft parts, and leave the shells. In a study of natural selection, the proportion of unbanded shells in the rocks were compared to the proportion of unbanded snails in the nearby colony. The background in the bog was fairly uniform. It was felt that, because of their ability to blend into the background, the unbanded snails would be better protected from predators than the banded members of the colony. This would result in the proportion of unbanded snails in the rocks being smaller than that of unbanded snails in the colony.

In a sample of n = 863 broken shells around rocks, 377 were unbanded, which is a sample percentage of 43.7%. Of n = 560 individuals collected in the bog, 296 were unbanded, which is a sample percentage of 52.9%.

Conduct an appropriate test to compare the proportions and construct a 95% confidence interval for the difference in these two population proportions.

Hypothesis Test:

1)

2)

3)

4)

5)

Construct and interpret a 95% CI for ([pic]

Fisher’s Exact Test for Comparing Two Proportions (in JMP)

Enter these data as you would for setting up a 2 X 2 contingency table.

[pic]

In JMP, select Analyze > Fit Y by X and place Group in the X box and Shell Type in the Y. The output from JMP is obtained.

[pic] [pic]

The results of Fisher's Exact Test are always included in the JMP output

whenever we are working with a 2 X 2contingency table.

[pic]

The three p-values given are for testing the following:

(1) Left,  p-value = .0004 is for testing if the proportion of unbanded snails in the bog colony is greater than proportion of unbanded snails amongst those dead on the rocks. This is clearly supports the researchers natural selection theory that unbanded snails are less likely to end up dead on the rocks.

(2) Right, p-value = .9997 is for testing if the proportion of unbanded snails amongst those dead on the rocks is greater than the proportion of unbanded snails found in the bog colony.  This is the opposite of the research hypothesis is clearly not supported by these data.

(3) 2-Tail, p-value = .0008 is for testing if the proportion of unbanded snails found in the two populations, those living in the bog and those dead on rocks, is different. We have very strong evidence against the equality of these two proportions (p = .0008).

Example 2: Low Birth Weight and Smoking

These data come from a study looking at the effects of smoking during pregnancy on birth weight. Amongst the 381 non-smokers in the study, 13 had babies with low birth weight, while amongst the 299 mothers who smoked during pregnancy, 28 had babies with low birth weight. Is there evidence to suggest that the proportion of babies born with low birth weight is greater for mothers who smoked during pregnancy?

| | | | |

| | | | |

| |Normal Birth | | |

|Smoking |Weight |Low Birth |Row |

|Status | |Weight |Totals |

| | | | |

|Non-smoker |368 |13 |381 |

| |96.59% |3.41% | |

| | | | |

|Smoker |271 |28 |299 |

| |90.64% |9.36% | |

| | | | |

|Column |639 |41 |680 |

|Totals | | | |

Hypothesis Test:

1)

2)

3)

4)

5)

Construct and interpret a 95% CI for ([pic]

Fisher’s Exact Test Results from JMP (smoker = 1 ( smoker & smoker = 0 ( non-smoker)

[pic]

Conclusion:

We can also estimate the RR and OR for low birth weight associated with smoking during pregnancy using confidence intervals as shown on pages 69-70 of your notes.

-----------------------

For the sample paired differences ([pic]) find the sample mean [pic] and standard deviation ([pic].

Conclusion:

Rule of Thumb[?]#3PQRVWXYl‹ŒŸ ¡¢£¤¥ÙßöêáÙÑɽ´á´«ŸŽŸzgŽŸ[MIEIhl*+hp¬jhmDÅU[pic]mHnHu[pic]hõk

hÿV5?CJ$aJ$$jhÃ{

hÿV5?CJ EHöÿU[pic]aJ &jBA D[pic]hÃ{

hÿV5?CJ U[pic]V[pic]aJ jhÃ{

hÿV5 for Checking Variance Equality

If the larger sample variance is more than twice the smaller sample variance do not assume the variances are equal.

We actually can hypothesize any size difference for the mean of the paired differences that we want. For example if wanted to show a certain diet resulted in at least a 10 lb. decrease in weight then we could test if the paired differences: d = Initial weight – After diet weight had mean greater than 10 ([pic])

Syspre – initial systolic blood pressure

Syspost – systolic blood pressure 30 minutes after taking the drug

Diapre – initial diastolic blood pressure

Diapost – diastolic blood pressure 30 minutes after taking the drug

[pic] if [pic]

[pic]

Conclusion:

[pic] or equivalently [pic]

Test Statistic

[pic] which has an F-distribution with numerator df = [pic]and denominator df = [pic] if [pic] and are reversed if [pic].

If F is large then one variance is several times larger than the other and we should reject the null in favor of the alternative. There is separate F-table for each level of significance. If our test statistic value exceeds the value in the table for appropriate level of significance and degrees of freedom we reject the null hypothesis. BETTER TO JUST USE JMP!!!

“Large” sample sizes

Both samples should be larger than 25 and both samples should have more than 5 “successes” and more than 5 “failures”

Truth

| | | |

|Decision |[pic] true |[pic] true |

| | | |

|Reject [pic] | | |

|Fail to Reject [pic]| | |

Test results from JMP

[pic]

[pic]

Conclusion:

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download