Upload
muhammad-ali-gunawan
View
2.307
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Citation preview
11
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
What is a testable What is a testable hypothesis, anyway?hypothesis, anyway?
Tools for Samples ContinuedTools for Samples Continued
Inferences Based on a Single Sample: Inferences Based on a Single Sample: Tests of HypothesisTests of Hypothesis
PBAF 527 Winter 2005PBAF 527 Winter 2005
22
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.TodayToday
1.1. Tools for Samples (recap)Tools for Samples (recap)
2.2. Confidence Intervals and Sample Size: Scallops, Sampling, and the Confidence Intervals and Sample Size: Scallops, Sampling, and the LawLaw
3.3. Hypothesis TestingHypothesis Testing
1.1. Distinguish Types of Hypotheses Distinguish Types of Hypotheses
2.2. Describe Hypothesis Testing ProcessDescribe Hypothesis Testing Process
3.3. Solve Hypothesis Testing Problems Based on a Single SampleSolve Hypothesis Testing Problems Based on a Single Sample
4.4. Explain Power of a TestExplain Power of a Test
5.5. Explain p-Value ConceptExplain p-Value Concept
6.6. Summarize the Elements of a Hypothesis TestSummarize the Elements of a Hypothesis Test
7.7. Things to Think about When Hypothesis TestingThings to Think about When Hypothesis Testing
8.8. Special CasesSpecial Cases Small Sample Test Small Sample Test Large Sample Test of ProportionsLarge Sample Test of Proportions
33
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Tools for SamplesTools for Samples
Point EstimatePoint Estimate Best guess of a population parameter based upon a Best guess of a population parameter based upon a
sample sample
Confidence IntervalConfidence Interval Range estimate around point estimateRange estimate around point estimate
Hypothesis TestHypothesis Test Decision rule for rejecting hypothesized population Decision rule for rejecting hypothesized population
values (null hypotheses)values (null hypotheses)
p-valuep-value Continuous measure of support for null hypothesis (a Continuous measure of support for null hypothesis (a
probability, probability, ))
44
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Tools for SamplesTools for Samples
Point EstimatePoint Estimate Best guess of a population parameter based upon a Best guess of a population parameter based upon a
sample sample
Confidence IntervalConfidence Interval Range estimate around point estimateRange estimate around point estimate
Hypothesis TestHypothesis Test Decision rule for rejecting hypothesized population Decision rule for rejecting hypothesized population
values (null hypotheses)values (null hypotheses)
p-valuep-value Continuous measure of support for null hypothesis (a Continuous measure of support for null hypothesis (a
probability, probability, ))
55
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Statistical MethodsStatistical Methods
StatisticalMethods
DescriptiveStatistics
InferentialStatistics
EstimationHypothesis
Testing
StatisticalMethods
DescriptiveStatistics
InferentialStatistics
EstimationHypothesis
Testing
66
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Hypothesis TestingHypothesis Testing
77
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Hypothesis TestingHypothesis Testing
PopulationPopulation
88
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Hypothesis TestingHypothesis Testing
PopulationPopulation
I believe the population mean age is 50 (hypothesis).
99
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Hypothesis TestingHypothesis Testing
PopulationPopulation
I believe the population mean age is 50 (hypothesis).
MeanMean X X = 20= 20
Random Random samplesample
1010
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Hypothesis TestingHypothesis Testing
PopulationPopulation
I believe the population mean age is 50 (hypothesis).
MeanMean X X = 20= 20
Reject hypothesis! Not close.
Reject hypothesis! Not close.
Random Random samplesample
1111
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
What’s a What’s a Hypothesis?Hypothesis?
1.1. A Belief about a A Belief about a Population ParameterPopulation Parameter
Parameter Is Parameter Is PopulationPopulation Mean, Mean, Proportion, VarianceProportion, Variance
Must Be StatedMust Be StatedBeforeBefore Analysis Analysis
I believe the mean GPA I believe the mean GPA of this class is 3.5!of this class is 3.5!
© 1984-1994 T/Maker Co.
1212
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.A question, oftenA question, often
What is the relationship between being a What is the relationship between being a women and living in poverty?women and living in poverty?
How fast is the response time to a new How fast is the response time to a new drug?drug?
Is the level of pollutant emitted by an Is the level of pollutant emitted by an industrial facility too high?industrial facility too high?
1313
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
A more specific A more specific question!question!
• Do single female householders in Do single female householders in Washington State make, on average, Washington State make, on average, the poverty rate for a family of three?the poverty rate for a family of three?
• Is the time to respond to a new drug Is the time to respond to a new drug 1.2 seconds?1.2 seconds?
• Is the level of pollutant emitted by an Is the level of pollutant emitted by an industrial facility in violation of the EPA industrial facility in violation of the EPA standard of 55 ppm?standard of 55 ppm?
1414
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Construct Construct HypothesesHypotheses
In the case of the drug trial:In the case of the drug trial:
Null hypothesis: Null hypothesis: = 1.2 = 1.2 This we hold to be true until falsifiedThis we hold to be true until falsified
Alternative hypotheses: Alternative hypotheses: 1.2 1.2 Everything but the null hypothesisEverything but the null hypothesis
1515
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Null HypothesisNull Hypothesis
1.1. What Is TestedWhat Is Tested
2.2. Has Serious Outcome If Incorrect Decision Has Serious Outcome If Incorrect Decision MadeMade
3.3. Always Has Equality Sign: Always Has Equality Sign: , , , or , or 4.4. Designated HDesignated H00
5.5. Specified as HSpecified as H00: : Some Numeric Value Some Numeric Value Specified with = Sign Even if Specified with = Sign Even if , or , or Example, HExample, H00: : 1.2 1.2
IsIsxx close to this hypothesized value? close to this hypothesized value?
1616
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Alternative Alternative HypothesisHypothesis
1.1. Opposite of Null HypothesisOpposite of Null Hypothesis
2.2. Always Has Inequality Sign:Always Has Inequality Sign: ,,, or , or
3.3. Designated HDesignated Haa
4.4. Specified HSpecified Haa: : < Some Value < Some Value Example, HExample, Haa: : < 3 < 3
Everything but the value of the null hypothesis.Everything but the value of the null hypothesis.
1717
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.A hypothesis test…A hypothesis test…
• Is a decision rule for rejecting or failing Is a decision rule for rejecting or failing to reject the null hypothesis.to reject the null hypothesis.
• Sets significance level of cut-off Sets significance level of cut-off Often 5% or 1%Often 5% or 1%
• Will reject null if not within CI at same Will reject null if not within CI at same confidence levelconfidence level
• Will reject null if p is less than Will reject null if p is less than
1818
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Basic IdeaBasic Idea
1919
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Basic IdeaBasic Idea
S am p le M ea n = 50 S am p le M ea n = 50HH00HH00
Sampling DistributionSampling Distribution
2020
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Basic IdeaBasic Idea
S am p le M ea n = 50 S am p le M ea n = 50
Sampling DistributionSampling Distribution
It is unlikely It is unlikely that we would that we would get a sample get a sample mean of this mean of this value ...value ...
20202020HH00HH00
2121
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Basic IdeaBasic Idea
S am p le M ea n = 50 S am p le M ea n = 50
Sampling DistributionSampling Distribution
It is unlikely It is unlikely that we would that we would get a sample get a sample mean of this mean of this value ...value ...
... if in fact this were... if in fact this were the population mean the population mean
20202020HH00HH00
2222
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Basic IdeaBasic Idea
S am p le M ea n = 50 S am p le M ea n = 50
Sampling DistributionSampling Distribution
It is unlikely It is unlikely that we would that we would get a sample get a sample mean of this mean of this value ...value ...
... if in fact this were... if in fact this were the population mean the population mean
... therefore, ... therefore, we reject the we reject the hypothesis hypothesis
that that = 50.= 50.
20202020HH00HH00
2323
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
2-Tailed Test About a 2-Tailed Test About a MeanMean
Is the observed value the same as the true value?Is the observed value the same as the true value?
Is the time to respond to a new drug 1.2 Is the time to respond to a new drug 1.2 seconds? seconds?
Suppose 100 rats were injected with the drug. Suppose 100 rats were injected with the drug. The mean response time at the end of the The mean response time at the end of the experiments was 1.05 seconds, and the standard experiments was 1.05 seconds, and the standard deviation .5 seconds.deviation .5 seconds.
2424
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
2-Tailed Test About a 2-Tailed Test About a MeanMean
1.1. Establish hypotheses Establish hypotheses HH00::= 1.2 H= 1.2 Haa: : 1.21.2
2.2. Set the decision rule for the test: Set the decision rule for the test: if |z|>zif |z|>z/2/2 then reject the null then reject the null
hypothesis.hypothesis. Draw a picture. Draw a picture.
• pick pick =.05 (for two-sided test this is .025 in each tail)=.05 (for two-sided test this is .025 in each tail)
• find zfind z/2/2zz/2/2=1.96=1.96
3.3. Find z-statistic (like z-score)Find z-statistic (like z-score)
4.4. Compare test statistic to critical value.Compare test statistic to critical value.
Since |z|> zSince |z|> z/2/2 we can reject the null hypothesis at a 5% level. we can reject the null hypothesis at a 5% level.
The response time is not actually 1.2 seconds.The response time is not actually 1.2 seconds.
0.305.
15.
100
5.2.105.1
n
xxz
x
0.305.
15.
100
5.2.105.1
n
xxz
x
2525
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
1-Tailed Test About a 1-Tailed Test About a MeanMean
Is the observed value greater then or less Is the observed value greater then or less than the true value?than the true value?
The need for action determines the The need for action determines the alternative hypothesis. Think of this as alternative hypothesis. Think of this as the research hypothesis.the research hypothesis.
Is the sample mean response time of 1.05 Is the sample mean response time of 1.05 seconds seconds lower thanlower than 1.2 seconds? 1.2 seconds?
2626
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
1-Tailed Test About a 1-Tailed Test About a Mean:Mean:
Left-Tailed TestLeft-Tailed Test1. Establish hypotheses 1. Establish hypotheses HH00::1.2 H1.2 Haa: : <1.2<1.2
TheThe need for action is if the observed value is less than 1.2, so that’s need for action is if the observed value is less than 1.2, so that’s the alternative hypothesis.the alternative hypothesis.
2. Set the decision rule for the test: 2. Set the decision rule for the test: if z<zif z<z then reject the null hypothesis. then reject the null hypothesis. Draw a picture.Draw a picture.
• pick pick =.05 (for one-sided test this is .5 in the tail)=.05 (for one-sided test this is .5 in the tail)• find zfind z zz=-1.645=-1.645
3.3. Find test statisticFind test statistic
4. Compare test statistic to critical value.4. Compare test statistic to critical value.
Since z< zSince z< z we can reject the null hypothesis at a 5% level. The we can reject the null hypothesis at a 5% level. The response time actually less than 1.2 seconds.response time actually less than 1.2 seconds.
0.305.
15.
100
5.2.105.1
n
xxz
x
0.305.
15.
100
5.2.105.1
n
xxz
x
2727
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
1-Tailed Test About a 1-Tailed Test About a Mean:Mean:
Right-Tailed TestRight-Tailed TestThe building specifications in a certain city require that the The building specifications in a certain city require that the average breaking strength of residential sewer pipe be average breaking strength of residential sewer pipe be more than 2,400 pounds per foot of length. Each more than 2,400 pounds per foot of length. Each manufacturer who wants to sell pipe in this city must manufacturer who wants to sell pipe in this city must demonstrate that its product meets the specification. demonstrate that its product meets the specification.
So, we want to decide whether the mean breaking strength So, we want to decide whether the mean breaking strength of the pipe exceeds 2,400 pounds per linear foot. of the pipe exceeds 2,400 pounds per linear foot.
We tested 50 sections of pipe and found the mean and We tested 50 sections of pipe and found the mean and standard deviations of the 50 measurements to be:standard deviations of the 50 measurements to be:
2828
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
1-Tailed Test About a 1-Tailed Test About a Mean:Mean:
Right-Tailed TestRight-Tailed Test = 2,460 lbs for linear foot= 2,460 lbs for linear foot s=200 lbs per linear foots=200 lbs per linear foot
1.1. Establish hypotheses Establish hypotheses
2. Set the decision rule for the test: if z>z2. Set the decision rule for the test: if z>z then reject the then reject the null hypothesis. Draw a picture.null hypothesis. Draw a picture.
Pick Pick
Find zFind z
3.3. Find test statisticFind test statistic
4. Compare test statistic to critical value.4. Compare test statistic to critical value.
H 0:2,400 Ha: >2,400
xx
=.05 (for one-sided test this is .05 in the tail)
z=1.645
Since z> z we can reject the null hypothesis at a 5% level. The company’s pipe has a mean strength that exceeds 2,400 pounds per linear foot.
12.228.28
60
50
200400,2460,2
n
xxz
x
12.2
28.28
60
50
200400,2460,2
n
xxz
x
2929
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Rejection Regions Rejection Regions (Two-Tailed Test) (Two-Tailed Test)
3030
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Rejection Regions Rejection Regions (Two-Tailed Test) (Two-Tailed Test)
HoValue Critical
ValueCriticalValue
1/2 1/2
Sample Statistic
RejectionRegion
RejectionRegion
NonrejectionRegion
HoValue Critical
ValueCriticalValue
1/2 1/2
Sample Statistic
RejectionRegion
RejectionRegion
NonrejectionRegion
Sampling DistributionSampling Distribution
1 - 1 -
Level of ConfidenceLevel of Confidence
3131
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Rejection Regions Rejection Regions (Two-Tailed Test) (Two-Tailed Test)
HoValue Critical
ValueCriticalValue
1/2 1/2
Sample Statistic
RejectionRegion
RejectionRegion
NonrejectionRegion
HoValue Critical
ValueCriticalValue
1/2 1/2
Sample Statistic
RejectionRegion
RejectionRegion
NonrejectionRegion
Sampling DistributionSampling Distribution
1 - 1 -
Level of ConfidenceLevel of Confidence
Observed sample statisticObserved sample statistic
3232
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Rejection Regions Rejection Regions (Two-Tailed Test) (Two-Tailed Test)
HoValue Critical
ValueCriticalValue
1/2 1/2
Sample Statistic
RejectionRegion
RejectionRegion
NonrejectionRegion
HoValue Critical
ValueCriticalValue
1/2 1/2
Sample Statistic
RejectionRegion
RejectionRegion
NonrejectionRegion
Sampling DistributionSampling Distribution
1 - 1 -
Level of ConfidenceLevel of Confidence
3333
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Rejection Regions Rejection Regions (Two-Tailed Test) (Two-Tailed Test)
HoValue Critical
ValueCriticalValue
1/2 1/2
Sample Statistic
RejectionRegion
RejectionRegion
NonrejectionRegion
HoValue Critical
ValueCriticalValue
1/2 1/2
Sample Statistic
RejectionRegion
RejectionRegion
NonrejectionRegion
Sampling DistributionSampling Distribution
1 - 1 -
Level of ConfidenceLevel of Confidence
3434
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Rejection Region Rejection Region (One-Tail Test) (One-Tail Test)
3535
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Rejection Region Rejection Region (One-Tail Test) (One-Tail Test)
HoValueCritical
Value
Sample Statistic
RejectionRegion
NonrejectionRegion
HoValueCritical
Value
Sample Statistic
RejectionRegion
NonrejectionRegion
Sampling DistributionSampling Distribution
1 - 1 -
Level of ConfidenceLevel of Confidence
3636
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Rejection Region Rejection Region (One-Tail Test) (One-Tail Test)
HoValueCritical
Value
Sample Statistic
RejectionRegion
NonrejectionRegion
HoValueCritical
Value
Sample Statistic
RejectionRegion
NonrejectionRegion
Sampling DistributionSampling Distribution
1 - 1 -
Level of ConfidenceLevel of Confidence
Observed sample statisticObserved sample statistic
3737
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Rejection Region Rejection Region (One-Tail Test) (One-Tail Test)
HoValueCritical
Value
Sample Statistic
RejectionRegion
NonrejectionRegion
HoValueCritical
Value
Sample Statistic
RejectionRegion
NonrejectionRegion
Sampling DistributionSampling Distribution
1 - 1 -
Level of ConfidenceLevel of Confidence
3838
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Rejection Regions
Summarized
3939
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Errors in Errors in Making DecisionMaking Decision
1.1. Type I ErrorType I Error Probability of Rejecting True Null HypothesisProbability of Rejecting True Null Hypothesis Has Serious ConsequencesHas Serious Consequences Probability of Type I Error Is Probability of Type I Error Is (Alpha)(Alpha)
Called Level of SignificanceCalled Level of Significance
2.2. Type II ErrorType II Error Probability of Failing to Reject a False Null Probability of Failing to Reject a False Null
HypothesisHypothesis Probability of Type II Error Is Probability of Type II Error Is (Beta)(Beta)
4040
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Jury Trial H0 Test
Actual Situation Actual Situation
Verdict Innocent Guilty Decision H0 True H0
False
Innocent Correct ErrorDo NotReject
H0
1 - Type IIError
()
Guilty Error Correct RejectH0
Type IError ()
Power(1 - )
Jury Trial H0 Test
Actual Situation Actual Situation
Verdict Innocent Guilty Decision H0 True H0
False
Innocent Correct ErrorDo NotReject
H0
1 - Type IIError
()
Guilty Error Correct RejectH0
Type IError ()
Power(1 - )
Decision ResultsDecision Results
HH00: Innocent: Innocent
4141
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Jury Trial H0 Test
Actual Situation Actual Situation
Verdict Innocent Guilty Decision H0 True H0
False
Innocent Correct Error AcceptH0
1 - Type IIError
()
Guilty Error Correct RejectH0
Type IError ()
Power(1 - )
Jury Trial H0 Test
Actual Situation Actual Situation
Verdict Innocent Guilty Decision H0 True H0
False
Innocent Correct Error AcceptH0
1 - Type IIError
()
Guilty Error Correct RejectH0
Type IError ()
Power(1 - )
Decision ResultsDecision Results
HH00: Innocent: Innocent
4242
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
& & Have an Have an Inverse RelationshipInverse Relationship
You can’t reduce both errors simultaneously!
4343
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Pipe Example, Pipe Example, RevisitedRevisited
= 2,430 lbs for linear foot= 2,430 lbs for linear foot s=200 lbs per linear foots=200 lbs per linear foot
1.1. Establish hypotheses Establish hypotheses
2. Set the decision rule for the test: if z>z2. Set the decision rule for the test: if z>z then reject the null then reject the null hypothesis. Draw a picture.hypothesis. Draw a picture.
• Pick Pick
• Find zFind z
3. Find test statistic3. Find test statistic
4. Compare test statistic to critical value.4. Compare test statistic to critical value.
H 0:2,400 Ha: >2,400 xx
=.05 (for one-sided test this is .05 in the tail)
z=1.645
Since z> z is NOT TRUE we cannot reject the null hypothesis at a 5% level. The mean is larger, but does not exceed the specification by enough to provide convincing evidence that the population mean exceeds 2,400.
06.128.28
30
50
200400,2430,2
n
xxz
x
06.1
28.28
30
50
200400,2430,2
n
xxz
x
What if the sample mean breaking strength for the pipe turned out What if the sample mean breaking strength for the pipe turned out to be 2,430 pounds, but the sample standard deviation remains to be 2,430 pounds, but the sample standard deviation remains 200 pounds per linear foot. 200 pounds per linear foot.
4444
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.Level of SignificanceLevel of Significance
1.1. ProbabilityProbability
2.2. Defines Unlikely Values of Sample Statistic Defines Unlikely Values of Sample Statistic if Null Hypothesis Is Trueif Null Hypothesis Is True Called Rejection Region of Sampling Called Rejection Region of Sampling
DistributionDistribution
3.3. Designated Designated (alpha)(alpha) Typical Values Are .01, .05, .10Typical Values Are .01, .05, .10
4.4. Selected by Researcher at StartSelected by Researcher at Start
4545
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.P-ValueP-Value
• Probability that you’d get a sample value this Probability that you’d get a sample value this far from the mean or more far from the mean or more IFIF the null the null hypothesis were true. hypothesis were true.
• A continuous measure of “strength” of A continuous measure of “strength” of evidence for null hypothesisevidence for null hypothesis
• Higher p value means less evidence that Ha Higher p value means less evidence that Ha is right (more support for Ho)is right (more support for Ho)
• 1-sided p values give value for one end of the 1-sided p values give value for one end of the distribution; 2 sided includes both.distribution; 2 sided includes both.
4646
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Is z=15 the same as Is z=15 the same as z=2?z=2?
S am p le M ea n = 50 S am p le M ea n = 50 15151515
HH00HH00
µµ 22
4747
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.P-Value ExampleP-Value Example
What is the probability of getting an observed What is the probability of getting an observed mean of 1.05 seconds to respond to the drug mean of 1.05 seconds to respond to the drug if the true mean is 1.2 seconds? There were if the true mean is 1.2 seconds? There were 100 rats were injected with the drug, the 100 rats were injected with the drug, the mean response time at the end of the mean response time at the end of the experiments was 1.05 seconds, and the experiments was 1.05 seconds, and the standard deviation was .5 seconds.standard deviation was .5 seconds.
4848
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.P-Value ExampleP-Value Example
To find P value:To find P value:
1. Set up hypotheses: 1. Set up hypotheses: HH00::= 1.2 H= 1.2 Haa: : 1.21.2
2. Find estimate of mean and standard error:2. Find estimate of mean and standard error:
3. Find test statistic (z score):3. Find test statistic (z score):
4. Find p value (probability) 4. Find p value (probability) associated with test statistic from t or z table (large samples, associated with test statistic from t or z table (large samples, use z-table)use z-table)
p=P(|z|>3|Hp=P(|z|>3|H00 true)=2(.0013)=.0026 is the probability that you’d true)=2(.0013)=.0026 is the probability that you’d
get a value of 1.05 if the actual mean were 1.2.get a value of 1.05 if the actual mean were 1.2.
05.1x 05.1x
0.305.
2.105.1
x
xz
0.3
05.
2.105.1
x
xz
05.100
5.ˆ
n
sx
05.100
5.ˆ
n
sx
4949
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Summary: Summary: Elements of a Hypothesis Elements of a Hypothesis
Test (1)Test (1)
Null Hypothesis (H0)Null Hypothesis (H0) A theory about the values of one or more population A theory about the values of one or more population
parameters. The status quo.parameters. The status quo.
Alternative Hypothesis (Ha) Alternative Hypothesis (Ha) A theory that contradicts the null hypothesis. The theory A theory that contradicts the null hypothesis. The theory
generally represents that which we will accept only when generally represents that which we will accept only when sufficient evidence exists to establish its truth.sufficient evidence exists to establish its truth.
Test Statistic Test Statistic A sample statistic used to decide whether to reject the null A sample statistic used to decide whether to reject the null
hypothesis. In general,hypothesis. In general,
Error Standard
Parameter edHypothesiz-Estimatestatistictest
Error Standard
Parameter edHypothesiz-Estimatestatistictest
5050
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Summary: Summary: Elements of a Hypothesis Elements of a Hypothesis
Test (2)Test (2)
Critical ValueCritical Value A value to which the test statistic is compared at some particular A value to which the test statistic is compared at some particular
significance level. (usually apha=.01, .05, .10)significance level. (usually apha=.01, .05, .10)
Rejection RegionRejection Region The numerical values of the test statistic for which the null The numerical values of the test statistic for which the null
hypothesis will be rejected. hypothesis will be rejected. The probability is The probability is that the rejection region will contain the test that the rejection region will contain the test
statistic when the null hypothesis is true, leading to a Type I error. statistic when the null hypothesis is true, leading to a Type I error. is usually chosen to be small (.01, .05, .10) and is the level of is usually chosen to be small (.01, .05, .10) and is the level of significance of the test.significance of the test.
Experiment and calculation of test statisticExperiment and calculation of test statistic Sample from the population and determine the numerical value of Sample from the population and determine the numerical value of
the test statistic.the test statistic.
5151
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Some things to think Some things to think aboutabout
1.1. What happens when n is large or What happens when n is large or σσ is small? is small?
2.2. When can we automatically accept the null When can we automatically accept the null hypothesis?hypothesis?
3.3. What if we misspecify the null hypothesis?What if we misspecify the null hypothesis?
4.4. Practical significance is not the same thing Practical significance is not the same thing as statistical significance.as statistical significance.
5.5. Always formulate HAlways formulate H0 0 and Hand Haa BEFORE you BEFORE you
analyze the data. No snooping!analyze the data. No snooping!
5252
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Hypothesis Testing Hypothesis Testing When When
n is Small and n is Small and σσ UnknownUnknown
Because the sample is smallBecause the sample is small Cannot assume normalityCannot assume normality Cannot assume s is a good approximation for Cannot assume s is a good approximation for σσ
So, use t-distribution:So, use t-distribution:
with n-1 degrees of freedomwith n-1 degrees of freedom
n
sx
t
n
sx
t
5353
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Small Sample t-test Small Sample t-test Example 1 (1)Example 1 (1)
Most water treatment facilities monitor the quality of their drinking Most water treatment facilities monitor the quality of their drinking water on hourly basis. One variable monitored it is pH, which water on hourly basis. One variable monitored it is pH, which measures the degree of alkalinity or acidity in the water. A pH measures the degree of alkalinity or acidity in the water. A pH below 7.0 is acidic, one above 7.0 is alkaline, and a pH of 7.0 is below 7.0 is acidic, one above 7.0 is alkaline, and a pH of 7.0 is neutral. One water treatment plant has a target pH of 8.5 (most neutral. One water treatment plant has a target pH of 8.5 (most try to maintain a slightly alkaline level). The mean and standard try to maintain a slightly alkaline level). The mean and standard deviation of 1 hour’s test results, based on 17 water samples at deviation of 1 hour’s test results, based on 17 water samples at this plant are:this plant are:
Does this sample provide sufficient evidence that the mean pH Does this sample provide sufficient evidence that the mean pH level in the water differs from 8.5?level in the water differs from 8.5?
s=.16s=.1624.8x 24.8x
5454
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Small Sample t-test Small Sample t-test Example 1 (2)Example 1 (2)
1. Establish hypotheses1. Establish hypotheses
2. Set the decision rule for the test: 2. Set the decision rule for the test:
pick pick find tfind t at n-1 dfat n-1 df
3.3. Find test statisticFind test statistic
4. Compare test statistic to critical value.4. Compare test statistic to critical value.
05.2039.
08.
17
16.5.842.8
n
sx
t 05.2
039.
08.
17
16.5.842.8
n
sx
t
=.05 (for two-sided test this is .025 in each tail)
H 0:=8.5 Ha: 8.5
if |t|>t at n-1 df then reject the null hypothesis
t=2.12 with 16 degrees of freedom
Since |t|< t we cannot the null hypothesis at a 5% level. We cannot conclude that that the mean pH differs from the target based on the sample evidence.
5555
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Small Sample t-test Small Sample t-test Example 2 (1)Example 2 (1)
A major car manufacturer wants to test a new engine to A major car manufacturer wants to test a new engine to determine whether it meets new air-pollution standards. The determine whether it meets new air-pollution standards. The mean emission mean emission for all engines of this type must be less than 20 for all engines of this type must be less than 20 parts per million of carbon. 10 engines are manufactured for parts per million of carbon. 10 engines are manufactured for testing purposes, and the emission level for each is determined. testing purposes, and the emission level for each is determined. The mean and standard deviation for the tests are:The mean and standard deviation for the tests are:
Do the data supply enough evidence to allow the manufacturer to Do the data supply enough evidence to allow the manufacturer to conclude that this type of engine meets the pollution standard? conclude that this type of engine meets the pollution standard? Assume the manufacturer is willing to risk a Type I error with Assume the manufacturer is willing to risk a Type I error with probability probability =.01.=.01.
s=2.98s=2.9817.17x 17.17x
5656
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Small Sample t-test Small Sample t-test Example 2 (2)Example 2 (2)
1. Establish hypotheses1. Establish hypotheses
2. Set the decision rule for the test: 2. Set the decision rule for the test:
pick pick find tfind t
3.3. Find test statisticFind test statistic
4. Compare test statistic to critical value.4. Compare test statistic to critical value.
00.3
10
98.22017.17
n
sx
t 00.3
10
98.22017.17
n
sx
t
=.01 (for one-sided test this is .01 in the tail)
H 0:≥20 Ha: <20
if t<t then reject the null hypothesis
t=-2.821 with 9 degrees of freedom
We can reject the null. The actual value is less than 20 ppm, and the new engine type meets the pollution standard.
5757
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Large Sample Test for Large Sample Test for the Population the Population
ProportionProportion
When the sample size is large (np and nq When the sample size is large (np and nq are greater than 5)are greater than 5) Assume is distributed normally with Assume is distributed normally with
mean p and standard deviationmean p and standard deviation where q=1-pwhere q=1-p
Test statistic: Test statistic:
2- or 1-tailed tests2- or 1-tailed tests
p̂p̂
n
pqn
pq
nqp
ppz
00
0ˆ
nqp
ppz
00
0ˆ
5858
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Large Sample Tests Large Sample Tests for Proportion for Proportion Example (1)Example (1)
In screening women for breast cancer, doctors use a In screening women for breast cancer, doctors use a method that fails to detect cancer in 20% of the women method that fails to detect cancer in 20% of the women who actually have the disease. Suppose a new method who actually have the disease. Suppose a new method has been developed that researchers hope will detect has been developed that researchers hope will detect cancer more accurately. This new method was used to cancer more accurately. This new method was used to screen a random sample of 140 women known to have screen a random sample of 140 women known to have breast cancer. Of these, the new method failed to detect breast cancer. Of these, the new method failed to detect cancer in 12 women. cancer in 12 women.
Does this sample provide evidence that the failure rate Does this sample provide evidence that the failure rate of the new method differs from the one currently in use?of the new method differs from the one currently in use?
5959
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Large Sample Tests Large Sample Tests for Proportion for Proportion Example (2)Example (2)
1. Establish hypotheses1. Establish hypotheses
2. Set the decision rule for the test: 2. Set the decision rule for the test:
pick pick find tfind t
3.3. Find test statisticFind test statistic
4. Compare test statistic to critical value.4. Compare test statistic to critical value.
=.05 (for two-sided test this is .025 in each tail)
H 0:p=.2 Ha: p≠.2
if |z|>z then reject the null hypothesis
z=1.96 36.3
034.
114.
140)8)(.2(.
2.086.ˆ
00
0
nqp
ppz 36.3
034.
114.
140)8)(.2(.
2.086.ˆ
00
0
nqp
ppz
Since the test statistic falls in the rejection region, we can reject the null. The rate of detection for the new test differs from the old at a .05 level of significance.
6060
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
It helps to It helps to remember…remember…
““Hypothesis testing is a ritualized exercise Hypothesis testing is a ritualized exercise in devil’s advocacy.”in devil’s advocacy.”
---Robert P. ---Robert P. AbelsonAbelson
6161
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.
Scallops, Sampling, Scallops, Sampling, and the Lawand the Law
• Read CaseRead Casea.a. Can a reliable estimate of the mean weight of all Can a reliable estimate of the mean weight of all
the scallops be obtained from a sample size of the scallops be obtained from a sample size of 18?18?
b.b. Do you see any flaws in the rule to confiscate a Do you see any flaws in the rule to confiscate a scallop catch if the sample mean weight is less scallop catch if the sample mean weight is less than 1/36 of a pound?than 1/36 of a pound?
c.c. Develop your own procedure for determining Develop your own procedure for determining whether a ship is in violation of the weight whether a ship is in violation of the weight restriction.restriction.
d.d. Apply your procedure to the data provided.Apply your procedure to the data provided.
6262
Portions of these notes are adapted from Statistics 7e © 1997 Prentice-
Hall, Inc.TodayToday
1.1. Tools for Samples (recap)Tools for Samples (recap)
2.2. Confidence Intervals and Sample Size: Scallops, Sampling, and the Confidence Intervals and Sample Size: Scallops, Sampling, and the LawLaw
3.3. Hypothesis TestingHypothesis Testing
1.1. Distinguish Types of Hypotheses Distinguish Types of Hypotheses
2.2. Describe Hypothesis Testing ProcessDescribe Hypothesis Testing Process
3.3. Solve Hypothesis Testing Problems Based on a Single SampleSolve Hypothesis Testing Problems Based on a Single Sample
4.4. Explain Power of a TestExplain Power of a Test
5.5. Explain p-Value ConceptExplain p-Value Concept
6.6. Summarize the Elements of a Hypothesis TestSummarize the Elements of a Hypothesis Test
7.7. Things to Think about When Hypothesis TestingThings to Think about When Hypothesis Testing
8.8. Special CasesSpecial Cases Small Sample Test Small Sample Test Large Sample Test of ProportionsLarge Sample Test of Proportions
End of Chapter
Any blank slides that follow are blank intentionally.