Page 1 | 5 Problem: Consider the following scenario. Our class has 50 students, 25 students are junior level and the other 25 students are senior level. Now I have 20 movie tickets from a friend, and I want to give out these 20 tickets to 20 random students in the class. It turns out that 19 senior students receive the tickets and 1 junior receives the remaining ticket. Then the students in the class make a claim that I favor the senior group. Or using the statistics language, they say that the probability of senior getting the ticket is bigger than 50% (p > 0.5). If this is a random process, then junior and senior students should have equal chance 50% (p = 0.5) of getting the tickets. Goal: In this chapter, we will present the standard methods for testing such claims that senior students are more likely to get the tickets (p > 0.5) than junior students in this class. Definitions Hypothesis: a claim about a population parameter. Example: The average GPA of high school students is higher than a 3.0 ( 3.0 ). Hypothesis test (test of significance): a procedure for testing a claim about a population parameter. We use a sample data to do the testing because it is impossible to gain access to the entire population. Two types of statistical hypotheses: • Null Hypothesis ( 0 H ): Statement that the value of a population parameter (such as proportion, mean, or standard deviation) is equal to some claimed value. Statement of no change or no effect or no difference and is assumed true until evidence indicates otherwise. • Alternative hypothesis: ( 1 H ): Statement that the parameter has a value that somehow differs from the null hypothesis. Statement that we are trying to find evidence to support. Statement that some change has occurred differing from original circumstances. Type of Hypothesis Tests: Two-Tailed, Left-Tailed, Right-Tailed We conduct the hypothesis test by assuming that the proportion, mean, or standard deviation is equal to some specified value, and therefore the null hypothesis always involves equality. Section 9.1: Basic Principle of Hypothesis Testing Chapter 9: Hypothesis Testing
21
Embed
Chapter 9: Hypothesis Testing · Hypothesis: a claim about a population parameter. Example: The average GPA of high school students is higher than a 3.0 ( 3.0). Hypothesis test (test
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
P a g e 1 | 5
Problem: Consider the following scenario. Our class has 50 students, 25 students are junior
level and the other 25 students are senior level. Now I have 20 movie tickets from a friend,
and I want to give out these 20 tickets to 20 random students in the class. It turns out that
19 senior students receive the tickets and 1 junior receives the remaining ticket. Then the
students in the class make a claim that I favor the senior group. Or using the statistics
language, they say that the probability of senior getting the ticket is bigger than 50% (p >
0.5). If this is a random process, then junior and senior students should have equal chance
50% (p = 0.5) of getting the tickets.
Goal: In this chapter, we will present the standard methods for testing such claims that
senior students are more likely to get the tickets (p > 0.5) than junior students in this class.
Definitions
Hypothesis: a claim about a population parameter.
Example: The average GPA of high school students is higher than a 3.0 ( 3.0 ).
Hypothesis test (test of significance): a procedure for testing a claim about a population
parameter. We use a sample data to do the testing because it is impossible to gain access to
the entire population.
Two types of statistical hypotheses:
• Null Hypothesis ( 0H ): Statement that the value of a population parameter (such as
proportion, mean, or standard deviation) is equal to some claimed value. Statement
of no change or no effect or no difference and is assumed true until evidence
indicates otherwise.
• Alternative hypothesis: ( 1H ): Statement that the parameter has a value that
somehow differs from the null hypothesis. Statement that we are trying to find
evidence to support. Statement that some change has occurred differing from
original circumstances.
Type of Hypothesis Tests: Two-Tailed, Left-Tailed, Right-Tailed
We conduct the hypothesis test by assuming that the proportion, mean, or standard
deviation is equal to some specified value, and therefore the null hypothesis always
involves equality.
Section 9.1: Basic Principle of Hypothesis Testing
Chapter 9: Hypothesis Testing
P a g e 2 | 5
• Two-tailed test:
0H : parameter = some value
1H : parameter some value
• Left-tailed test:
0H : parameter = some value
1H : parameter < some value
• Right-tailed test:
0H : parameter = some value
1H : parameter > some value
We never support/accept Null Hypothesis 0H because we can’t gain access to the entire
population, and we can’t know the true population parameter 100%. We instead use the
phrase “fail to reject the null hypothesis” to mean that we don’t have enough strong
evidence to warrant rejection of the null hypothesis. It is like the court system. We never
say a defendant “innocent”, but we instead say the defendant is “not guilty”.
Example: Suppose we want to determine whether a coin is fair and balanced. A null
hypothesis might be that half the flips would result in Heads and half of the other flips
would result in Tails. Then the alternative might be that the number of Heads and Tails
would be very different. We can express these hypotheses symbolically as follow:
• Null Hypothesis 0 : 0.5H p =
• Alternative Hypothesis 1 : 0.5H p
Example: A pharmaceutical company is producing Advil pills of 250 mg dose. However, the
manufacture is worried that the machine that making the pills has come out of calibration
and is making less dose than it should be.
Null Hypothesis: 0 : 250H =
Alternative Hypothesis: 1 : 250H
So, the original claim (null hypothesis) is saying that if you buy an Advil bottle of 250mg
dose, you expect every pill has the amount of 250mg exactly. However, we are trying to
support the other claim (alternative hypothesis) that the mean dosage of the pill is less
than 250mg.
P a g e 3 | 5
Errors in Hypothesis Tests
At the end of hypothesis testing procedures, we either rejecting or failing to reject the null
hypothesis, and sometimes we do have errors:
• Type I error (alpha): rejecting null hypothesis when it is true.
• Type II error (beta): fail to reject the null hypothesis when it is false.
Note that alpha (level of significance) is the same concept that we used in Chapter 7 for
constructing confidence intervals. It is the probability of a type I error – the probability of
rejecting the null hypothesis when it is true. It is chosen by the researcher before the
sample data is collected.
Example: According to the Centers for Disease Control, 15.2% of American adults
experience migraine headaches. Stress is a major contributor to the frequency and
intensity of headaches. A massage therapist feels that she has a technique that can reduce
the frequency and intensity of migraine headaches.
a) Determine the null and alternative hypotheses that would be used to test the
effectiveness of the massage therapist’s techniques.
0
1
: p 0.152
: p 0.152
H
H
=
b) Suppose that a sample of 500 American adults who participate in the massage
therapist’s program results in a data that indicate that the null hypothesis should be
rejected. Provide a statement that supports the massage therapist’s program:
There is sufficient evidence to conclude that the therapist’s technique reduces
the frequency and intensity of migraine headaches in American adults below
15.2%.
c) Suppose, in fact, the percentage of patients in the program who experience migraine
headaches is 15.3%. Was a Type I or Type II error committed?
Type I error, because the null hypothesis was rejected when, in fact, the null
hypothesis was true.
P a g e 4 | 5
Testing a Claim
There are three methods we can perform to make the conclusion whether we should reject
the null hypothesis 0H or we fail to reject the null hypothesis 0H .
1) Using P-Value Method
2) Using Critical Value Method
3) Using Confidence Interval Method
The P-Value method and Critical Value method are similar in the sense that they always
yield the same result, while the Confidence Interval method (chapter 7) is sometimes
different from the P-Value or Critical Value method. It is recommended that we use
Confidence Interval method to estimate a population parameter only. In addition, many
technologies can give the P-Value, and therefore we will focus mainly on how to use the P-
Value Method in this chapter.
Identify the Statistic Relevant to the Test and Determine Its Sampling Distribution
Test Statistics is a value used in making a decision about the null hypothesis.
Parameter Sampling Distribution
Requirements Test Statistics
Proportion p Normal (z) 0 5np and 0 5nq
𝑧0 =�̂� − 𝑝0
√𝑝0𝑞0𝑛
Mean Student’s t not known and normally distributed population or not known and n > 30
𝑡0 =�̅� − 𝜇0𝑠
√𝑛
Mean Normal (z) known and normally distributed population or known and n > 30
𝑧0 =�̅� − 𝜇0𝜎
√𝑛
Standard Deviation or variance 2
Chi-squared 2 Strict requirement: normally distributed population – use normal probability plot to verify this
22
2
( 1)n s
−=
P a g e 5 | 5
Interpreting the Test Statistics: Using the P-Value or Critical Value
P-Value (Probability Value) : the likelihood or probability that sample will result in a
statistic such as the one obtained if the null hypothesis is true.
Critical region in the left tail: P-value = area to the left of the test statistic
Critical region in the right tail: P-value = area to the right of the test statistics
Critical region in two tails: P-value = twice the area in the tail beyond the test statistics
• If P-value ≤ α, reject H0.
• If P-value > α, fail to reject H0.
Critical Value Method (traditional method): Find the critical value(s) that separates the
critical region (where we reject the null hypothesis) from the values of the test statistic that
do not lead to the rejection of the null hypothesis.
• If the test statistic is in the critical region, reject H0.
• If the test statistic is not in the critical region, fail to reject H0.
P a g e 1 | 5
Goal: Conduct a formal hypothesis test of a claim about a population proportion p.
Recall: the best point estimate of proportion p is �̂� =𝑥
𝑛, where x is the number of
individuals in the sample, and n is the sample size.
Conducting a Hypothesis Test about a Population Proportion using the P-Value
Method and Critical Values Method:
Requirements:
1. Simple Random Sample
2. The conditions for a binomial distribution are satisfied. (There is a fixed number of
independent trials having constant probabilities, and each trial has two outcome
categories of “success” or “failure.”).
3. The condition 0 5np and 0 5nq are both satisfied so the binomial distribution of
sample proportions can be approximated by a normal distribution with 0np = and
0 0np q = .
Note that q0 = 1 – p0.
Procedures:
**Part A: P-Value Method
1. Determine the null and alternative hypotheses in one of the following three
ways:
Note that the Null Hypothesis always includes the equal sign.
2. Select a level of significance α depending on the seriousness of making a Type
I error, and the common choice of α is 0.05.
3. For P-Value Method: Compute the test statistics
𝑧0 =�̂� − 𝑝0
√𝑝0𝑞0𝑛
Section 9.4: Hypothesis Tests for Proportions
P a g e 2 | 5
Then use table A2 or technology to determine the P-Value.
The P-Value is just the shaded green area, and we can find those areas on TI-
83/84 by using normalcdf function.
4. If P-Value < α, reject the null hypothesis. If P-Value > α, do not reject the null
hypothesis.
**Part B: Critical Value Method
Repeat the same steps 1-3 as for the P-Value Method. Then use table A2 to find the critical
value instead of the P-Value.
Then compare the critical value with the test statistic:
Left-Tailed Two-Tailed Right-Tailed
P a g e 3 | 5
Example: The Genetics and IVF Institute conducted a clinical trial of YSORT method
designed to increase the probability of conceiving a boy. As of this writing, 291 babies were
born to parents using the YSORT method, and 239 of them were boys. Use a 0.01
significance level to test the claim that the YSORT method is effective in increasing the
likelihood that a baby will be a boy.
Answer:
1. Original claim: YSORT method is effective means 0.5p . Because 0.5p does not
contain equality, so this is Alternative Hypothesis.
0
1
: 0.5
: 0.5
H p
H p
=
2. This is a right tailed test and 0.01 = .
3. Test Statistic:
Point Estimate: 239
0.821291
xp
n= = =
0 00
0 0 0 0
0.821 0.510.952
(1 ) 0.5(1 0.5)
291
p p p pz
p q p p
n n
− − −= = = =
− −
Note: When checking the requirements 0 5np and 0 5nq for small sample
size, it usually won’t pass the conditions, and we need to use the binomial
distribution instead of the normal distribution approximation.
Find P-Value using TI-83, hit 2nd VARS, choose
normalcdf( ):
P(z>10.952)=normalcdf(z0,∞)=normalcdf(10.952,
1099).
On TI 84, hit 2nd VARS, choose normalcdf( ), then
enter:
4. P-Value = 3.049x10-28,
This value is less than α=0.01, reject the null hypothesis!
P-Value Method
Duy Tran Laptop
Pencil
P a g e 4 | 5
After find the test statistics, we find critical value instead of p-value. From chapter 7,
0.01 =
P-value and Critical value methods both give the same result: Reject the Null Hypothesis!
Conclusion: There is sufficient evidence to support the claim that the YSORT method is
effective in increasing the likelihood that a baby will be a boy!
Using Technology TI 83-84: We will use 1-PropZTest command to perform an z-test to
compare a population proportion to a hypothesis value. This test is valid for sufficiently
large sample values: only when 0 5np and 0 5nq
Hit STAT, right arrow to TESTS, arrow down to 1-PropZTest…, enter the below screen
information:
Critical Value Method
Duy
Text Box
Z
Duy
Pencil
Duy
Pencil
Duy
Pencil
Duy
Pencil
P a g e 5 | 5
then hit Calculate:
Example: In 2006, 10.5% of all live births in the United States were to mothers under 20
years of age. A sociologist claims that this percentage is decreasing. She conducts a simple
random sample of 34 births and finds that 3 of them were to be mothers less than 20 years
of age. Test a sociologist’s claim at the α=0.01 level of significance.
Answer: We will use the P-Value approach in this example ONLY.
Conclusion:
There is
insufficient
evidence to
conclude that
the percentage
of live births in
the US to
mothers under
the age of 20
was deceased
since 2006.
P a g e 1 | 6
Goal: Conduct a formal hypothesis test of a claim about a population mean µ.
Recall: the best point estimate of population mean is x , which is the sample mean.
Conducting a Hypothesis Test about a Population Mean using the P-Value Method
and Critical Values Method:
There are two cases: unknown 𝝈 and known 𝝈 population standard deviation.
Parameter Sampling Distributions
Requirements Test Statistics
Unknown 𝝈 Student’s t Simple Random Sample, Normally distributed population or n > 30
𝑡0 =�̅� − 𝜇0
𝑠
√𝑛
Use Table A3 or Technology
Known 𝝈 Normal (z) Simple Random Sample, Normally distributed population or n > 30
𝑧0 =�̅� − 𝜇0𝜎
√𝑛
Use Table A2 or Technology
x = sample mean, µ0 = population mean, s = sample standard deviation, 𝝈 = population standard deviation, n = sample size. Note**: Sometimes the sample size of 15 to 30 are sufficient if the population has a
distribution that is not far from normal.
**Part A: P-Value Method
1. Determine the null and alternative hypotheses in one of the following three
ways:
Note that the Null Hypothesis always includes the equal sign.
2. Select a level of significance α depending on the seriousness of making a Type
I error, and the common choice of α is 0.05.
3. For P-Value Method: Compute the test statistics
t0 if unknown 𝝈 with n-1 degree of freedom, and z0 if known 𝝈
Then use table A3/A2 or technology to determine the P-Value.
Sections 9.2 & 9.3: Hypothesis Testings for a Population Mean
P a g e 2 | 6
The P-Value is just the shaded green area, and we can find those areas on TI-
83/84 by using tcdf function for Student’s t or normalcdf function for z-
distribution.
4. If P-Value < α, reject the null hypothesis. If P-Value > α, do not reject the null
hypothesis.
**Part B: Critical Value Method
Repeat the same steps 1-3 as for the P-Value Method. Then use table A2/A3 to find the
critical value instead of the P-Value.
If it is a Normal (z), then:
P a g e 3 | 6
If it is a Student’s t, then:
Then compare the critical value with the test statistic
Two-Tailed Left-Tailed Right-Tailed
Note: When working with small sample size n < 30, we must verify that the
sample data is coming from a normally distributed population. We can do this
by using a Normal Probability Plot or Normal Quantile Plot. If the data
exhibits a linear relationship (straight line), then we are good.
Press 2nd STAT PLOT, then turn
Plot1 On, choose the last graph for
Type. Enter the Data List to be the list
that you store the data. This will plot
the observations against the z-scores.
P a g e 4 | 6
Example: A simple random sample of the weights of 19 green M&Ms has a mean of
0.8635g and a standard deviation of 0.0570g. Use a 0.05 significance level to test the claim
that the mean weight of all green M&Ms is equal to 0.8535g, which is the mean weight
required so that M&Ms have the weight printed on the package label. Do green M&Ms
appear to have weights consistent with the package label?