Understanding Hypothesis Testing and t-Tests with an Example, Study notes of Statistics

An explanation of hypothesis testing and t-tests using an example. The example involves testing whether the mean weight of all blocks is equal to a specified value under the null hypothesis, and calculating the p-value and confidence interval using a one-sample t test. The document also discusses the difference between the normal distribution and t-distribution and how to find areas under the t-distribution using table c or minitab.

Typology: Study notes

Pre 2010

Uploaded on 09/17/2009

koofers-user-4sp
koofers-user-4sp 🇺🇸

9 documents

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Christopher Holloman, The Ohio
State University, Summer 2006
Statistics 528
Data Analysis I
Lecture #8
July 18, 2006
Christopher Holloman, The Ohio
State University, Summer 2006
Overview of Today’s Lecture
IPS Sections 6.2, 7.1
Tests of Significance
Inference for the Mean of a Population
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Understanding Hypothesis Testing and t-Tests with an Example and more Study notes Statistics in PDF only on Docsity!

Christopher Holloman, The Ohio State University, Summer 2006

Statistics 528

Data Analysis I

Lecture

July 18, 2006

Christopher Holloman, The Ohio State University, Summer 2006

Overview of Today’s Lecture

 IPS Sections 6.2, 7.

 Tests of Significance

 Inference for the Mean of a Population

3

Intro. to Hypothesis Tests

Two of the most common types of statistical inference:

  1. Confidence intervals

Goal is to estimate (and communicate uncertainty in our estimate of) a population parameter.

  1. Tests of Significance

Goal is to assess the evidence provided by the data about some claim concerning the population.

Christopher Holloman, The Ohio State University, Summer 2006

Basic Idea of Tests of Significance

Example: Each day Tom and Heather

decide who pays for lunch based on a toss

of Tom’s favorite quarter.

Heads - Tom pays

Tails - Heather pays

 Tom claims that heads and tails are

equally likely outcomes for this quarter.

 Heather thinks she pays more often.

Christopher Holloman, The Ohio State University, Summer 2006

Moral of the story: an outcome that

would rarely happen if a claim were

true is good evidence that the claim

is in fact not true.

This is the idea behind Hypothesis

Testing.

Christopher Holloman, The Ohio State University, Summer 2006

 A hypothesis is a statement about the parameters in a population; we will be making statements about μ in Section 6.2.

 A hypothesis test (or significance test) is a formal procedure for comparing observed data with a hypothesis whose truth we want to assess.

 The results of a test are expressed in terms of a probability that measures how well the data and hypothesis agree.

Christopher Holloman, The Ohio State University, Summer 2006

Performing a Hypothesis Test

  1. State Hypotheses State your research question as two hypotheses - the null and the alternative hypotheses. These hypotheses are written in terms of the population parameters.

The null hypothesis (H 0 ) is the statement being tested. This is assumed “true” and compared to the data to see if there is evidence against it. A null hypothesis that we will see often is that the mean μ is equal to some standard value. Usually, null hypotheses give a statement of “no difference” or “no effect.”

Christopher Holloman, The Ohio State University, Summer 2006

Suppose we want to test the null

hypothesis that μ is some specified value, say μ 0. Then

H 0 : μ = μ 0

Note: We will always express H 0

using an equality sign.

Christopher Holloman, The Ohio State University, Summer 2006

 The hypotheses are:

H 0 : μ = 16

Ha: μ < 16

 Is this a one-sided test or a two-sided

test?

This is a one sided test. The reporter

thought the bars were smaller than 16 oz.

Christopher Holloman, The Ohio State University, Summer 2006

2) Calculate P-value

We ask: “Does the sample give evidence

against the null hypothesis?”

P-value: The probability that the sample

mean would take a value as extreme or

more extreme than the one we actually

observed assuming H 0 is true.

Christopher Holloman, The Ohio State University, Summer 2006

In the strawberry bar example, this means:

“Is the sample average much less than we would expect to see if μ really is 16?”

 We need to find the probability that we get a sample of 20 bars whose mean is 15.6 or less given that μ = 16.

Question: Why 15.6 or less? This is more extreme evidence against our null hypothesis and in support of the alterative hypothesis.

Christopher Holloman, The Ohio State University, Summer 2006

 What is the distribution of , the

average weight of the bars sampled, if

the null hypothesis is true?

N (16,0.7/√20)

 What area under the Normal (16,0.7/√20)

curve corresponds to the p-value?

The area to the left of 15.6.

x

Christopher Holloman, The Ohio State University, Summer 2006

P-values in terms of the test statistic:

where z is the observed value of the test statistic and the probabilities are found using the standard normal distribution given in Table A.

H (^) a P - v a l u e A r e a u n d e r c u r v e

μμμμ < μμμμ (^) 0 P ( Z ≤≤≤≤ z )

μμμμ >^ μμμμ (^) 0 P ( Z^ ≥≥≥≥ z )

μμμμ ≠≠≠≠ μμμμ (^) 0 2 P ( Z (^) ≥≥≥≥ | z | )

Left of z

Right of z

Tails

Christopher Holloman, The Ohio State University, Summer 2006

 A p-value is exact if the population

distribution is normal.

 If the population is not normal, the

p-value approximates the true

probability for large n because of

the Central Limit Theorem.

Christopher Holloman, The Ohio State University, Summer 2006

  1. State Your Conclusions

 The final step is to decide if there is a strong amount of evidence to reject H 0 in favor of Ha. This is accomplished using the P-value.

 In our example, we got a P-value =0.0052. What does this tell us?

If H 0 is true (i.e., true mean weight is 16 oz), then the chance of getting a sample whose mean weight is 15.6 oz or less is 0.52%

Christopher Holloman, The Ohio State University, Summer 2006

Does it give evidence against H 0?

Yes, it is very unlikely that we

would observe a sample mean as

low as we did if H 0 is true.

Conclusion: We reject the null

hypothesis.

Christopher Holloman, The Ohio State University, Summer 2006

 If we use an α level of 0.01 and the p-value is smaller than α, we can say that there is a less than one in one-hundred chance that we would observe data as extreme or more extreme than what we saw if the null hypothesis is true.

 If the P-value ≤ α we say the data are statistically significant at level αααα.

Note: When we do not reject H 0 , we are not claiming H 0 is true. We are just concluding there is not sufficient evidence to reject it.

Christopher Holloman, The Ohio State University, Summer 2006

Example: Ameritech

Suppose last year Ameritech’s repair service took an average of 3. days to fix customer complaints. One of the managers is assigned to check if this year’s data show a different average time to fix problems. He collects a random sample of 30 customer complaints and finds that the average time taken to fix them is 2.1 days. Assume that the standard deviation of the time taken to fix the complaints is 2.5 days. Is this good evidence that the average time taken to fix the complaints is not 3.1 days?

Christopher Holloman, The Ohio State University, Summer 2006

 State the hypotheses:

H 0 :μ=3.

Ha:μ≠ 3.

 Calculate the test statistic:

  1. 19

30

  1. 5

0 2.^13.^1 =−

n

x z σ

μ

Christopher Holloman, The Ohio State University, Summer 2006

 Calculate P-value: Since this is a two-sided test, we find the area to the left of -2.19 and then double it to get the p-value.

P-value = 2 x 0.0143 = 0.

 What is your conclusion at the 0.05 level? Since the p-value is less than 0.05, the test is significant at the 0.05 level. We reject the null.

 What is your conclusion at the 0.01 level? The p- value is larger than 0.01, so the test is not significant at this level. We would not reject the null at this level.

Christopher Holloman, The Ohio State University, Summer 2006

 Calculate the P-value: The P-value is the

area under the normal curve to the right

of 1.

P-value = 0.

 Since the p-value is larger than 0.05, we

do not have evidence at the 5% level that

the PCB level exceeds the limit. We do

not reject the null hypothesis.

Christopher Holloman, The Ohio State University, Summer 2006

Tests from Confidence Intervals

 We have covered two types of statistical inference procedures for the population mean μ:

Confidence Interval (CI) and Tests of Significance

 Question: Is there any relationship between hypothesis tests and confidence intervals? Answer: Yes, a level α two-sided test rejects a hypothesis H 0 :μ = μ 0 exactly when the value μ 0 falls outside a level (1-α) CI for μ.

Christopher Holloman, The Ohio State University, Summer 2006

Example: Concrete Block

Bud’s Home Center sells concrete blocks. Bud wants to estimate the average weight of all blocks in stock. A sample of 64 blocks has a mean weight of 65.5 lbs. Assume that the weights of blocks vary with standard deviation 4.6 lbs.

Christopher Holloman, The Ohio State University, Summer 2006

 Construct a 95% CI for the mean weight

of all blocks.

 (64.373, 66.627) is a 95% CI for μ.

n

x z

Christopher Holloman, The Ohio State University, Summer 2006

 What would the hypotheses be?

H 0 :μ = 88,

Ha:μ ≠ 88,

 What do you conclude?

Since 88,720 falls in the 99% confidence

interval (88,707 miles, 88,733 miles), we

do not reject the null hypothesis when

testing at the 1% level.

Christopher Holloman, The Ohio State University, Summer 2006

More on stating your conclusions:

 When working with hypothesis tests there

are many ways to state your conclusion.

 The following four statements convey the

same conclusion

  1. The test is significant.
  2. Reject the null hypothesis.
  3. The data show strong evidence against H 0.
  4. The p-value is smaller than α.

Christopher Holloman, The Ohio State University, Summer 2006

 These four statements also convey the

same conclusion:

  1. The test is not significant.
  2. Do not reject the null hypotheses.
  3. The data do not show evidence against H 0.
  4. The p-value is larger than α.

 Usually 1,2, or 3 are given as the

conclusion, and 4 is given as the

explanation of the conclusion.

40

Confidence Intervals and Hypothesis Tests in Minitab

  1. Use Minitab to get descriptive statistics and then use formulas.
  2. Use Minitab directly to compute confidence intervals and perform tests: Stat  Basic Statistics  1-Sample Z

Note: This function is for computing confidence intervals and hypothesis tests of μ, the population mean, assuming the population standard deviation is known. (Section 6.1 and Section 6.2)