Docsity

Understanding Population Parameters: Z-scores, Confidence Intervals & Hypothesis Testing -, Study notes of Data Analysis & Statistical Methods

Toggle sidebar
bg1
1
Chapter 6: Confidence Intervals and Hypothesis Testing
Using Z for the CI and test of the population mean
Learning goals for this chapter:
Understand what inference is and why it is needed.
Know that all inference techniques give us information about the population
parameter.
Explain what a confidence interval is and when it is needed.
Calculate a confidence interval for the population mean when the population
standard deviation is known.
Know the assumptions that must be met for doing inference for the population
mean.
Calculate the needed sample size if you have a pre-determined margin of error.
Know how to write hypotheses, calculate a test statistic and P-value, and write
conclusions in terms of the story.
Draw Normal curve pictures to match the hypothesis test.
Understand the logic of hypothesis testing and when a hypothesis test is needed.
Use the confidence interval to perform a two-sided hypothesis test.
Explain sampling variability and the difference between the population mean and
the sample mean.
Explain the difference between the population standard deviation and the sample
standard deviation.
Know which technique is most appropriate for a story: confidence interval,
hypothesis test, or simple summary statistics.
When we collect data from our sample, we can calculate sample statistics. However,
usually we are interested in what is true for the whole population, not just for the sample.
(Remember that a census is very hard and expensive to do well.) Why can’t we just
accept our sample mean or sample proportion as the official mean or proportion for the
population? Every time we estimate the statistics
ˆ
,xp
(sample mean and sample
proportion), we get a different answer due to sampling variability.
Two most common types of formal statistical inference:
Confidence Intervals: when we want to estimate a population parameter
Significance Tests: when we want to assess the evidence provided by the data in
favor of some claim about the population (yes/no question about the population)
Confidence Intervals allow us to estimate the population mean or population proportion.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Understanding Population Parameters: Z-scores, Confidence Intervals & Hypothesis Testing - and more Study notes Data Analysis & Statistical Methods in PDF only on Docsity!

Chapter 6: Confidence Intervals and Hypothesis Testing

Using Z for the CI and test of the population mean

Learning goals for this chapter:

Understand what inference is and why it is needed. Know that all inference techniques give us information about the population parameter. Explain what a confidence interval is and when it is needed. Calculate a confidence interval for the population mean when the population standard deviation is known. Know the assumptions that must be met for doing inference for the population mean. Calculate the needed sample size if you have a pre-determined margin of error. Know how to write hypotheses, calculate a test statistic and P-value, and write conclusions in terms of the story. Draw Normal curve pictures to match the hypothesis test. Understand the logic of hypothesis testing and when a hypothesis test is needed. Use the confidence interval to perform a two-sided hypothesis test. Explain sampling variability and the difference between the population mean and the sample mean. Explain the difference between the population standard deviation and the sample standard deviation. Know which technique is most appropriate for a story: confidence interval, hypothesis test, or simple summary statistics.

When we collect data from our sample, we can calculate sample statistics. However, usually we are interested in what is true for the whole population, not just for the sample. (Remember that a census is very hard and expensive to do well.) Why can’t we just accept our sample mean or sample proportion as the official mean or proportion for the population? Every time we estimate the statistics (^) x p ,ˆ (sample mean and sample

proportion), we get a different answer due to sampling variability.

Two most common types of formal statistical inference:

Confidence Intervals : when we want to estimate a population parameter

Significance Tests : when we want to assess the evidence provided by the data in favor of some claim about the population (yes/no question about the population)

Confidence Intervals allow us to estimate the population mean or population proportion.

The true mean or proportion for the population exists and is a fixed number, but we just don’t know what it is. Using our sample statistic, we can create a “net” to give us an estimate of where to expect the population parameter to be.

Confidence interval = net

Population parameter = invisible, stationary butterfly

We don’t know exactly where the butterfly is, but from our sample, we have a pretty good estimate of the location.

We don’t need to take a lot of random samples to recreate the sampling distribution with the population mean μ at its center. All we need is one Simple Random Sample of size n. Because of what we know about the sample mean distribution, we can use that one sample mean’s confidence interval to infer what the population mean really is.

If you increase the sample size ( n ) , you decrease the size of your “net” (or your margin of error).

If we just take a single sample, our single confidence interval “net” may or may not include the population parameter.

However if we take many samples of the same size and create a confidence interval from each sample statistic, over the long run 95% of our confidence intervals will contain the true population parameter (if we are using a 95% confidence level).

x x x

x n

Also remember that if X is normally distributed then x will be too, and if n is large, the sample mean will be approximately normally distributed even if X is not normally distributed (Central Limit Theorem).

What if your margin of error is too large? Here are ways to reduce it:

Increase the sample size (bigger n ) Use a lower level of confidence (smaller C ) Reduce x

Sample Size, n, for Desired Margin of Error, m: 2

z * x

n

m

Note that it is the sample size, n , that influences the margin of error. The population size has nothing to do with it.

Be careful!!!! You can only use the formula x z * x

n

under certain circumstances:

Data must be an SRS from the population.

Do not use if the sampling is anything more complicated than an SRS.

Data must be collected correctly (no bias). The margin of error covers only random sampling errors. Undercoverage and nonresponse are not covered.

Outliers can have a big effect on the confidence interval. (This makes sense because we use the mean and standard deviation to get a CI.)

You must know the standard deviation of the population, (^) x.

Example: A questionnaire of drinking habits was given to a random sample of fraternity members, and each student was asked to report the # of beers he had drunk in the past month. The sample of 30 students resulted in an average of 22 beers with a population standard deviation of 9 beers.

a) Give a 90% confidence interval for the mean number of beers drunk by fraternity members in the past month.

b) Is it true that 90% of the fraternity members each month drink the number of beers that lie in the interval you found in part (a)? Explain your answer.

No, this is the confidence interval for the population mean, not for individual population members. If we take many 30-frat member samples and make a confidence interval from each sample, 90% of these confidence intervals will contain the true population mean # of beers drunk in a month by fraternity members.

c) What is the margin of error for the 90% confidence interval?

d) How many students should you sample if you want a margin of error of 1 for a 90% confidence interval?

Compare P -value to a significance level,.

If the P -value , we can reject H 0****.

If you can reject H 0 , your results are significant.

If you do not reject H 0 , your results are not significant.

The 4 steps common to all tests of significance:

  1. State the null hypothesis H 0 and the alternative hypothesis Ha.
  2. Calculate the value of the test statistic ( z -score in Chapter 6).
  3. Draw a picture of what Ha looks like, and find the P -value (use the normal table in Chapter 6).
  4. State your conclusion about the data in a sentence, using the P -value and/or comparing the P -value to a significance level for your evidence.

Z -Test for a Population Mean

To test the hypothesis H 0 : = 0 based on an SRS of size n from a population with unknown mean and known standard deviation ,

compute the test statistic:^0 /

x z n

the P -values for a test of H 0 against:

Ha: > 0 is P( Z z)

Ha: < 0 is P( Z z )

Ha: 0 is 2* P( Z | z| )

These P -values are exact if the population is Normally distributed, and are approximately correct for large n in other cases.

Examples:

  1. Last year the government made a claim that the average income of the American people was $33,950. However, a sample of 50 people taken recently showed an average income of $34,076 with a population standard deviation of $. Conduct a significance test to see if the true population mean is more than the government’s claim. Use α = 0..
  2. Suppose that the cellulose content of alfalfa hay in the population has a standard deviation of 8 mg. A sample of 15 cuttings has a mean cellulose content of 145 mg. A previous study claimed that the mean cellulose content was 140 mg. Perform a hypothesis test to determine if the mean cellulose content is different from 140 mg if α = 0.05.

Using confidence intervals to do hypothesis tests

You can use a CI to do a HT only if 2 conditions are met:

Your alternative hypothesis has a ≠ (is two-sided). Your confidence level and your significance level add to 100% (e.g., an α of 0.

  • a confidence level of 95% = 100%).

You check to see if your null hypothesis could be true at the same time your confidence interval is true.

Annual Drinking Water Quality Report, 2004, Town of Brookston, IN

“I’m pleased to report that our drinking water is safe and meets federal and state requirements.” Test Results (MCL is the maximum contaminant level, the highest level of a contaminant that is allowed in drinking water.)

Contaminant Violation Y/N Level Detected Unit measurement

MCL

Beta/photon emitters

N 2.1 3.2 mrem/yr 4

Alpha emitters N 0 1.6 pCi/l 15 Barium N 0.216 ppm 2 Copper N 0.039 to 0.453 ppm 1. Fluoride N 0.01 ppm 4 Sodium N 0.0 ppm N/A

One of these violation reports should actually be a “yes” instead of a “no.” Which one is it and why? What hypotheses go along with these confidence intervals?

Note: When I called the town of Brookston office to ask them about this, the water manager called the state EPA office to get more information. What they told him was that, yes, technically I was correct, but that they don’t use the confidence intervals that are reported. Apparently these are the FEDERAL EPA rules. They only use the mean. I tried to get sample size or other information, but I wasn’t able to learn anything more.

P -values can be more informative than a reject/do not reject H 0 based on. As P -value gets smaller the evidence for rejecting H 0 gets stronger.

Just because we use = 0.05 a lot doesn’t mean that’s the level you have to use—it’s just the most common. There’s nothing particularly special about that level.

In a large sample, even tiny deviations from the null hypothesis can be important.

If we fail to reject H 0 , it may be because H 0 is true or because our sample size is insufficient to detect the alternative.

Plot your data and look at P -value both to determine your conclusions. Could outliers be part of the problem?

A confidence interval actually estimates the size of an effect rather than simply asking if it is too large to reasonably occur by chance alone.

You must have a well-designed experiment in order for statistical inference to work. Randomization is important.