Download BA 2606 –

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
1
Stat 2264
Chapter 7 Hypothesis Testing with One Sample
Section 7-1 Overview

Researchers are interested in answering many types of questions
 Does a new medication lower a patient’s blood pressure
significantly?
 Does a new diet soda have a higher preference rating?

In statistics, a hypothesis is a claim or statement about a
property of a population

The null hypothesis, denoted H0 is usually a tentative assumption
about a population parameter and, in our case, will be a
statement about the value of a population parameter, like p,  or
. It will contain a condition of equality.

The alternative hypothesis, denoted HA is the opposite of what is
stated in the null hypothesis.

Our objective is to determine whether to reject H0 (there is
sufficient evidence to infer that HA is true) or fail to reject H0
(there is insufficient evidence to infer that HA is true). We will be
making inferences on the population based on the sample
results.
2
Section 7-2 Basics of Hypothesis Testing
Procedure for Test of Hypothesis

Null and Alternative Hypothesis
There are three types of null/alternative hypotheses we can
use:
H0 :    0
H0 :    0
H0 :    0
HA :    0
left- tailed
HA :    0
right-tailed
HA :    0
two tailed
Note the condition of equality in each of the null hypotheses. In your
text, they solely use = symbol in the null hypothesis. This is
theoretically incorrect, but is adopted by many texts. On tests and
assignments I will accept either.
Eg. The manager of the Danvers-Hilton Resort Hotel stated that the
average guest bill for a weekend is $600 or less. A member of the
hotel’s accounting staff noticed that guests’ bills have been increasing
of late. The accountant will use a sample of weekend guest bills to test
the manager’s claim. What type of test is this? Right tailed
Eg. State the null and alternative hypothesis for each conjecture.
a.
A researcher thinks that if expectant mothers use vitamin
pills the birthweight of the babies will increase. The
average birthweights of the population is 8.6 pounds.
b.
An engineer hypothesizes that the mean number of defects
can be decreased in a manufacturing process of compact
discs by using robots instead of humans for certain tasks.
The mean number of defective discs per 1000 is 18.
c.
A psychologist feels that playing soft music during a test
will change the results of the test. In the past, the mean of
the scores is 73.

Level of Significance () If unspecified use =0.05 It is the
probability of rejecting the null hypothesis when the null
hypothesis is actually true or the probability of a Type I error.
3




X  0
n  1s2
or 2 

s
2
n
n
Rejection or Critical Region: This is the set of all values of the
test statistic that will lead us to reject the null hypothesis. The
set up of the Critical Region depends on the test of hypothesis
Calculations & P-Value – The p value or probability value is the
probability of getting a value of the test statistic as extreme or
more extreme than the one calculated.
Conclusion – reject or fail to reject the null hypothesis. We
decide this using two different methods: either based on the
Rejection Region or based on the p-value. If the p-value is less
than the level of significance we reject the null hypothesis.
Test Statistic: Z 
X  0
or t 
This format is to be used at all times hypothesis testing is used.
P-Value Approach




The p-value of a test of hypothesis is the probability of observing
a test statistic at least as extreme as the one computed, given
H0 is true. It measures the support (or lack of support) provided
by the sample for H0
If the p-value  , the value of the test statistic is in the
rejection region
Reject H0 if p-value  
Most computer packages calculate p-value and not the rejection
region. In all of our tests and assignments I will expect both the
p-value approach and the rejection region, If  is unspecified,
assume it to be 0.05.
There are two possible errors to be made.
 Type I error or rejecting H0 when H0 is true. The probability of
Type I error is denoted . This is type of error is controlled by
the experimenter who specifies a maximum allowable error,
usually less than 10 %.
 Type II error or accepting H0 when it is false. The probability
of Type II error is denoted .
Null Hypothesis
Reject
Fail to Reject
True

Significance level
P(Type I error)
1-
Confidence Level
False
1-
Power of the test

P(Type II error)
4
Exercises pages 335 – 336
Section 7-3 Testing a Claim About a Population Proportion
 Psychology Today reported that 56 % of the households in the
United States have Internet access (May 21, 2001). The
parameter 56 % is called a proportion.
 Proportions can be obtained from samples or populations. The
population parameter is denoted p, while the sample proportion
is denoted p̂ .
x
 p̂  , where x is the number of successes in the sample and n
n
is the sample size. In Chapter 9, we learned that p̂ was
approximately normally distributed, with mean p and standard
pq
deviation
, q  1  p , as long as np  5 and nq  5 .
n
p̂  p
Therefore, z 
, as long as np  5 and nq  5 .
pq
n
There are three types of null/alternative hypotheses we can use:
H0 : p  p 0
H0 : p  p 0
H0 : p  p 0
HA : p  p 0
left- tailed
HA : p  p 0
right-tailed
HA : p  p 0
two tailed
Procedure for Test of Hypothesis
 Null and Alternative Hypothesis (one of the above sets)
 Level of Significance () If unspecified use =0.05
p̂  p 0
 Test Statistic: Z 
p 0 q0
n
 Rejection Region:
Two-tailed : Reject H0 if Z <  Z  or if Z > Z 
2
Right-tailed:
Reject H0 if Z > Z 
Left-tailed: Reject H0 if Z < - Z 


Calculations & P-Value
Conclusion
2
5
Example
A telephone company representative estimates that 40% of its
customers have call-waiting service. To test this hypothesis, she
selected a sample of 100 customers and found that 37 of them had
call waiting. At =0.01, is there enough evidence to reject the claim?
Note that np  5 and nq  5
H0 : p  0.4
H A : p  0.4
=0.01
Test Statistic: Z 
p  p0
p 0 q0
n
Rejection Region: Reject H0 if Z < -2.575 or if Z > 2.575
Calculations:
0.37  0.40
Z
 0.61
p  value  2.5  .2291  .5418
0.40.6
100
Conclusion: Fail to reject the null hypothesis at =0.01. There is
insufficient evidence to infer that the true proportion of customers with
call-waiting service is significantly different from 40 %
Example
A statistician read that at least 77% of the population oppose replacing
$5 bills with $5 coins. To see if this claim is valid, the statistician
selected a sample of 80 people and found that 55 were opposed to
replacing the $5 bills. At =0.01, test the claim that at least 77 % of
the population are opposed to the change.
Note that np  5 and nq  5
H0 : p  0.77
HA : p  0.77
=0.01
Test Statistic: Z 
p̂  p 0
p 0 q0
n
Rejection Region: Reject H0 if Z < -2.33
6
Calculations:
55
p̂ 
 .6875 ,
80
Z
0.6875  0.77
0.770.23
 1.75
80
p  value  .5  .4599  .041
Conclusion: Fail to reject the null hypothesis at =0.01. There is
insufficient evidence to infer that the alternative hypothesis is true.
The claim may be correct.
Try Exercises on pages 344 – 347
Section 7-4 Testing a Claim About the Population Mean , when
the Population Standard Deviation, , is Known
Assumptions:
1.
That the population that the sample is drawn from is
normally distributed or n>30
2.
Sample is a simple random sample
3.
The population standard deviation, ơ, is known.
Note: If  is unknown we will use the t distribution , in Sec 7-5.
There are three types of null/alternative hypotheses we can use:
H0 :    0
H0 :    0
H0 :    0
HA :    0
left- tailed
HA :    0
right-tailed
HA :    0
two tailed
Procedure for Test of Hypothesis




Null and Alternative Hypothesis (one of the above sets)
Level of Significance () If unspecified use =0.05
X  0
Test Statistic: Z 

n
Rejection Region:
Two-tailed : Reject H0 if Z <  Z  or if Z > Z 
2
Right-tailed:
Reject H0 if Z > Z 
Left-tailed: Reject H0 if Z < - Z 


Calculations & P-Value
Conclusion
2
7
Example:
The Medical Rehabilitation Foundation reports that the average cost of
rehabilitation for stroke victims is $ 24 672 (September 1995). To see
if the average cost of rehabilitation at a particular hospital, a
researcher selected a random sample of 35 stroke victims at the
hospital and found that the average cost of their rehabilitation is
$25 226. The standard deviation of the population is $3251. At
  0.01, an it be concluded that the average cost of stroke
rehabilitation at this particular hospital is different from $24 672?
Z=1.01 There is insufficient sample evidence to support the claim that
the average cost of stroke rehab is different from 24 672.
Example:
A researcher wishes to test the claim that the average age of
lifeguards in Ocean City exceeds 24 years. She selects a sample of 36
guards and finds the sample mean to be 24.7. The population standard
deviation is 2 years. Is there evidence to support this claim at 0.01
level of significance?
Z=2.10, p-value= .0179, Fail to reject null hypothesis
Exercises pages 351 – 352
Section 7-5 Testing a Claim About the Population Mean , when
the Population Standard Deviation, , is Not Known
Assumptions:
1. That the population that the sample is drawn from is normally
distributed or n>30
2. Sample is a simple random sample
3. The population standard deviation, ơ, is unknown.
There are three types of null/alternative hypotheses we can use:
H0 :    0
H0 :    0
H0 :    0
HA :    0
left- tailed
HA :    0
right-tailed
HA :    0
two tailed
8
Procedure for Test of Hypothesis




Null and Alternative Hypothesis (one of the above sets)
Level of Significance () If unspecified use =0.05
X  0
Test Statistic: t 
s
n
Rejection Region:
Two-tailed : Reject H0 if t <  t  or if t > t 
2
Right-tailed:


2
Reject H0 if t > t 
Left-tailed: Reject H0 if t < - t 
Calculations & P-Value
Conclusion
Example:
A job placement director claims that the average salary for a nursing
assistant is $24 000. A sample of 10 nursing assistants has a mean of
$23 450 and a standard deviation of $400. Assuming salaries are
normally distributed, is there sufficient evidence to reject the director’s
claim at 0.05 level of significance?
H0 :   24000
HA :   24000
=0.05
X
s
n
Rejection Region: Reject H0 if t < -2.262 or t > 2.262
Calculations:
23450  24000
p-value > 2(0.10)
t
 4.35
400
10
Conclusion: Reject H0, there is sufficient evidence to infer that  is not
equal to 50
Test Statistic: t 
Example:
A physician claims that a runner’s maximal volume oxygen is greater
than the average of all adults. A sample of 15 joggers has a mean of
40.6 ml/kg and a standard deviation of 6 ml/kg. If the average of all
adults is 36.7 ml/kg, is there enough evidence to support the
physician’s claim at 0.05 level of significance? Assume normality.
t=2.517, .01<p value<.025
9
Exercises page 360 – 363
Section 7-6 Testing a Claim About a Standard Deviation or
Variance of a Population
Assumptions for the use of  2 distribution:
 The sample must be randomly selected from the
population
 The population must be normally distributed for the
variable under study
Procedure for Hypothesis Testing About 2 :
1. Null and Alternative Hypothesis
H0 :  2   20
H0 :  2   20
H0 :  2   20
HA :  2   20
HA :  2   20
H A :  2   20
Two-tailed
Right-tailed
Left-tailed
Note: For tests about the population standard deviation, , everything
about this procedure remains the same.
2. Level of Significance 
3. Test Statistic
2 
n  1s2
 2o
4. Rejection Region
a) For 2-tailed test: Reject H0 if  2 < 12  or if  2 >  2
2
2
b) For a right tailed test: Reject H0 if  > 
2

c) For a left-tailed test: Reject H0 if  2 < 12 
5. Calculations & a bound on p-value
6. Conclusion
2
10
Example:
A researcher knows from past studies that the standard deviation of
the time it takes to examine a patient is 16.8 minutes. A random
sample of 24 patients is selected and examination time recorded. The
standard deviation was 12.5 minutes. At .05 level of significance can it
be concluded that the standard deviation has changed? Assume
examination time is normally distributed.
Chi squared = 12.733, p value is between .05 and .10, insufficient
evidence to conclude that std dev has changed.
Example:
A hospital administrator believes that the standard deviation of the
number of people using outpatient surgery per day is greater than
eight. A random sample of 15 days is selected and the data is shown
below. At 0.10 level of significance is there enough evidence to
support the administrator’s claim? Assume normality.
25
30
5
15
18
42
16
9
10
12
12
38
8
14
27
H0 : 2  64
HA : 2  64
  0.10
Test Statistic:

2

n  1s 2

 02
Rejection Region: Reject H0 if χ2 > 21.064
Calculations:
X
i
 281,  Xi2  7021, n  8, s2 
2812
15  125.4952381
14
7021 
14125.495
.01< p-value <.025
 27.452
64
Conclusion:
Reject the null hypothesis. There is sufficient evidence to
infer that the variance has exceeds 64.
2 
Exercises pages 368 - 369