Professional Documents
Culture Documents
Practical Guide To Hypothesis Testing in Data Science 1616263956
Practical Guide To Hypothesis Testing in Data Science 1616263956
For example cases see next page. Yes Population variance σ2 known No
and large sample size(s)?
Z-Statistic T-Statistic
Dependent Independent
Reject H0 if │Test statistic (T, Z)│>│critical value (t, z)│ or p-value < confidence level α
Confidence σ 2x σ 2y sd s2p s 2p
Interval
Sample
x±z α σ
2 √n
( x− y)±z α
2 √ +
nx ny
x±t n−1 , α
2
s
√n
d ±t n−1 , α
2 √n
( x− y)±t n +n −2 , α
x y
2 √ +
nx n y
Example 1 2 3 4 5
Single population, Independent samples, Single population, Multiple populations, Multiple populations,
Key unknown population dependent samples, independent samples,
known population known population unknown variances but assumed
features variance variances variance unknown variance to be equal
1) State the null and 1) State the null and 1) State the null and 1) State the null and 1) State the null and
alternative alternative alternative alternative hypotheses alternative hypotheses
hypotheses hypotheses hypotheses 2) Choose α 2) Choose α
2) Choose α 3) For each person
2) Choose α 2) Choose α calculate the 3) Calculate the pooled
3) Calculate Z from 3) Calculate Z from 3) Calculate T from difference in grade variance and the Test
the sample the sample statistic the sample before and after statistic T using the
statistic. using the means of statistic. taking the course. pooled variance
4) Calculate the p- each sample and 4) Calculate the p- Calculate the mean d, 4) Calculate the p-Value for
value using Z with the known variance value using T with standard deviation sd
Test and the test statistic T
nx+ny-2 degrees of
a stats calculator for this class. a stats calculator freedom and compare to
Procedure and compare to 4) Calculate the p- and compare to using these values.
4) Calculate the p-value chosen significance level
chosen significance value using Z with chosen significance using T with a stats α.
level α. a stats calculator level α. calculator and
and compare to α. 5) Reject H0 if p<α
5) Reject H0 if p < α 5) Reject H0 if p < α compare to chosen
5) Reject H0 if p < α significance level α. 6) Interpret the decision
6) Interpret the 6) Interpret the within the context of the
6) Interpret the decision within the 5) Reject H0 if p < α
decision within the 6) Interpret the decision problem.
context of the decision within the context of the within the context of
problem. context of the problem. the problem.
problem.