Sociology 301
Hypothesis Testing
LiyingLuo
04.12
Why You Should Care
1.Makeareasonable/ra7onaldecision.
2.Desirableskillsonthejobmarket.
The Scope and Objectives of this Class
Whatisthisclassallabout?
methodsandsta7s7cs
Theobjec7ves:
“howsta7s7csarecomputedandinterpreted,andhowtheycanbeusedtoaddresskeysocialscienceques7ons.”
Unsolicited Advice
Itisahardclass…
However,youcansucceedbyworkinghard…
Our Goal
Theunknown“truth”…
popula7onparameters(e.g.,mean,propor7on)
Makeagood(i.e.,informed)guess…
usingsample(e.g.,samplemean,samplepropor7on)
CI for Proportion
Schlitzvs.Michelob:WhywasSchlitzsosurethattheresultsairedliveatSuperBowlhalSimewouldnotscrewthem?
Thesebeerstastenodifferent:
AccordingtoCLT:
Forn=100,95%CI?99%CI?
Terminology
Population Parameter
Sample Statistic
Sampling Distribution
mean
variance
standard deviation
Hypothesis Testing
Are all swans white?
Hypothesis Testing
Hypothesis:Claims(abouttruth,popula7onparameters)
Thelogicoffalsifica7on:webestadvanceknowledgebydisapprovinghypotheses.
i.e.,cannotapprove,butcondi7onallyaccept
Hypothesis Testing
Thebasicques7on:
Whatistheprobabilityofge]ngasamplesta7s7cifthetruepopula7onparameterhasahypothesizedvalue?
Isthesampleevidencesufficienttomakeconfidentconclusionsaboutthepopula7on?
So,hypothesisisalwaysaboutpopula7onparameters,althoughwetesttheirtruevalueswithasamplesta7s7c.
Hypothesis Testing
TaylorSwiS’s“BlankSpace”
Hypothesis Testing
TaylorSwiS’shypothesisin“BlankSpace”:
“Boysonlywantloveifit’satorture.”
Howcanwetestthishypothesis?
Hypothesis Testing: Steps
1.Stateyournullandresearchhypotheses
2.Decidethealphalevelandcri7calvalue
3.Computetheteststa7s7c
4.Comparetheteststa7s7ctothecri7calvaluetomakeadecision
5.Stateatechnicaldecisionandasubstan7veconclusion
Hypothesis Testing: 1. State hypotheses
Hypothesiscomesinpairs.
H1:ResearchHypothesis…stateswhatyoubelievetobetrue.
H0:NullHypothesis…statestheoppositeofH1;astatementthatyouexpecttorejectasuntrue.
Hypothesis Testing: 1. State hypotheses
Twotypesofhypothesis
Type1:Hypothesessta7ngthedirec6onofapopula7onparameter
One-sidedhypotheses
H0:UDelmeanGPAisbelow3.00
H1:UDelmeanGPAis3.00orhigher
Type2:Hypothesesuncertainaboutthepopula7onparameter’sdirec7on
Two-sidedhypotheses
H0:UDelmeanGPAis3.00
H1:UDelmeanGPAisnot3.00
H0: μ<3.00 H1: μ≥3.00
H0: μ=3.00 H1: μ≠3.00
Hypothesis Testing: 1. State hypotheses
Beabletostatehypothesesinwordsandsymbols.
Hypothesis Testing: 1. State hypotheses
TaylorSwiS’shypothesisin“BlankSpace”:
“Boysonlywantloveifit’satorture.”
Let’shelpherdeveloparesearchhypothesisandanullhypothesis.
Hypothesis Testing: 1. State hypotheses
TaylorSwiS’sresearchhypotheses:
H1:90%ormoreyoungmen,agedbetween16and28,intheUSonlywantloveifit’satorture.
H0:Lessthan90%youngmen,agedbetween16and28,intheUSonlywantloveit’satortureornot.
H0: μ<0.9 H1: μ≥0.9
Hypothesis Testing: 1. State hypotheses
AresearcherhypothesizesthatintheUnitedStatestheaverageyearsofschoolingforwomenisgreater12years.
Statethenullandresearchhypothesesinwordsandsymbols.
H0:?
H1:?
Hypothesis Testing: 1. State hypotheses
AresearcherhypothesizesthatintheUnitedStatestheaverageyearsofschoolingforwomenisnotequalto12years.
Statethenullandresearchhypothesesinwordsandsymbols.
H0:?
H1:?
Hypothesis Testing: 1. State hypotheses
Aresearcherhypothesizesthatthemeanannualsalaryofadefec7veislessthan$75,000.
Statethenullandresearchhypothesesinwordsandsymbols.
H0:?
H1:?
Hypothesis Testing: 1. State hypotheses
Aresearcherhypothesizesthatthemeanannualsalaryofadefec7veisnotequalto$75,000.
Statethenullandresearchhypothesesinwordsandsymbols.
H0:?
H1:?
Hypothesis Testing: 1. State hypotheses
AresearcherhypothesizesthatintheUnitedStatesthemeannumberofsexthatadultsyoungerthan40yearsisgreaterthan1007mesperyear.
Statethenullandresearchhypothesesinwordsandsymbols.
H0:?
H1:?
Hypothesis Testing: 1. State hypotheses
AresearcherhypothesizesthatintheUnitedStatesthemeannumberofsexthatadultsyoungerthan40yearsisnotequalto1007mesperyear.
Statethenullandresearchhypothesesinwordsandsymbols.
H0:?
H1:?
Hypothesis Testing
Twopossibledecisions:
rejec7ngthenullhypothesis
or…
acceptthenullhypothesis?
Hypothesis Testing
Twopossibledecisions:
rejec7ngthenullhypothesis
or…
acceptthenullhypothesis?failtorejectthenullhypothesis
Errors in Hypothesis Testing
Wealwaysruntheriskofmakinganincorrectdecision,whateverdecisionwemaymake.
Errors in Hypothesis Testing
Wealwaysruntheriskofmakinganincorrectdecision,whateverdecisionwemaymake.
Soweneedtoacknowledgeandmakeitexplicitaboutthehowmucherrorwewouldliketorisk.
Errors in Hypothesis Testing
IfthenullhypothesisH0isinfacttrue,butwerejectit:
TypeIError
IfthenullhypothesisH0isinfactfalse,butwefailtorejectit:
TypeIIError
Scien7stscareabout…orareobsessedwith…TypeIError.
Thatis,wewouldliketohaveasmallα.
Errors in Hypothesis Testing
TypeIError…orFalseRejec7onError…occurswhenweincorrectlyrejectatruenullhypothesis.
H0:UDelmeanGPAisbelow3.00
H1:UDelmeanGPAis3.00orhigher
ThemeanGPAis3.20inaoursample,sowedecidetorejectH0.
However,themeanGPAis2.90isinfactinthepopula7on,soourdecisiontorejectH0isanerror.
H0: μ<3.00 H1: μ≥3.00
Alpha (α)
TheprobabilityofmakingTypeIErrorisdenotedbyα
P(TypeIError)=α
…alphalevel,alphaarea,orregionofrejec6on
One-tailhypothesisTwo-tailhypothesis
Alpha (α)
Thepreciseα levelweselectisarbitrary,andvariesbydiscipline(andsome7mesbyjournalorevenbyauthor).
0.05ismostcommon.
0.01isalsoverycommon.
Critical Value
One-tailhypothesisTwo-tailhypothesis
Cri6calValue:theminimumvalueofadistribu7onnecessarytodesignateanalphaarea,i.e.,howlargetheteststa7s7cmustbeinordertorejectthenullhypothesisatthegivenalevel.
Critical Value
One-tailhypothesisTwo-tailhypothesis
Cri6calValue:theminimumvalueofadistribu7onnecessarytodesignateanalphaarea,i.e.,howlargetheteststa7s7cmustbeinordertorejectthenullhypothesisatthegivenalevel.
Critical Value
Cri7calvaluesformanydistribu7ons:
Z,t,F,…
Hypothesis Testing: 2. Choose an alpha level and determine the critical value
Thecri7calvaluethatyouwilluseinhypothesistes7ngdependsonyourchoiceofalphalevelandthetypeofhypothesis(one-tailvs.two-tail)
Zαdenotesthecri7calvalueforaone-tailedtest.
Zα/2denotesthecri7calvalueforatwo-tailedtest.
Chooseanalphalevelandiden7fythecri7calvalueforthefollowingtests…
H0:UDelmeanGPAisbelow3.00
H1:UDelmeanGPAis3.00orhigher
H0:UDelmeanGPAisnotequalto3.00
H1:UDelmeanGPAis3.00
H0: μ<3.00 H1: μ≥3.00
H0: μ≠3.00 H1: μ=3.00
Hypothesis Testing: 3. Compute a test statistic
Supposethatthestandarddevia7onforthepopula7onisσ=0.5.
WhatistheZ-scoreofasamplemean=3.2withsamplesizen=100?
H0:UDelmeanGPAisbelow3.00
H1:UDelmeanGPAis3.00orhigher
H0:UDelmeanGPAisnotequalto3.00
H1:UDelmeanGPAis3.00
H0: μ<3.00 H1: μ≥3.00
H0: μ=3.00 H1: μ≠3.00
Hypothesis Testing: 4. Make a decision by comparing the test statistic to the critical value
Rule:rejectH0iftheabsolutevalueofyourteststa7s7cislargerthanthecri7calvalue|Z|>Zα/2orZα
One-tail
Two-tail
Hypothesis Testing: 4. Make a decision by comparing the test statistic to the critical value
Rule:rejectH0iftheabsolutevalueofyourteststa7s7cislargerthanthecri7calvalue|Z|>Zα/2orZα
Supposethatthestandarddevia7onforthepopula7onisσ=0.5.
WhatistheZ-scoreofasamplemean=3.2withsamplesizen=100?
H0:UDelmeanGPAisbelow3.00
H1:UDelmeanGPAis3.00orhigher
H0:UDelmeanGPAisnotequalto3.00
H1:UDelmeanGPAis3.00
H0: μ<3.00 H1: μ≥3.00
H0: μ=3.00 H1: μ≠3.00
Hypothesis Testing: 5. State your conclusion
Technically:Atthatalphalevel,werejectorfailtorejectH0.
Substan7vely:Atthatalphalevel,wedoordonotsufficientevidencetoconcludethat…
Supposethatthestandarddevia7onforthepopula7onisσ=0.5.
WhatistheZ-scoreofasamplemean=3.2withsamplesizen=100?
H0:UDelmeanGPAisbelow3.00
H1:UDelmeanGPAis3.00orhigher
H0:UDelmeanGPAisnotequalto3.00
H1:UDelmeanGPAis3.00
H0: μ<3.00 H1: μ≥3.00
H0: μ=3.00 H1: μ≠3.00
Hypothesis Testing: Steps
1.Stateyournullandresearchhypotheses
2.Decidethealphalevelandcri7calvalue
3.Computetheteststa7s7c
4.Comparetheteststa7s7ctothecri7calvaluetomakeadecision
5.Stateatechnicaldecisionandasubstan7veconclusion
Example 1
In2007theU.S.Na7onalTransporta7onSafetyBoardseta5-yeargoalofhavingmorethan95%ofallAmericandriversusetheirseatbelts.
Toseewhethertheyareontargetformee7ngthatgoal,theyrandomlysampled1,000Americandriversin2012.
Theyfoundthat962—or96.2%—ofthe1,000driverstheysampledusetheirseatbelts
1.Stateyournullandresearchhypotheses
2.Decidethealphalevelandcri7calvalue
3.Computetheteststa7s7c
4.Comparetheteststa7s7ctothecri7calvaluetomakeadecision
5.Stateatechnicaldecisionandasubstan7veconclusion
Example 2
Aveterinarianclaimsthat6%ofcatshaveFIDS(FelineImmuneDeficiencySyndrome).
Toevaluatethisclaim,researchersrandomlysampled320catsTheyfoundthat26—or8.1%—ofthe320catshaveFIDS.
Isthisevidencesufficienttoconfidentlyconcludethatthepopula7onpropor7onofcatswhohaveFIDSisdifferentfrom0.06?
1.Stateyournullandresearchhypotheses
2.Decidethealphalevelandcri7calvalue
3.Computetheteststa7s7c
4.Comparetheteststa7s7ctothecri7calvaluetomakeadecision
5.Stateatechnicaldecisionandasubstan7veconclusion