This is a draft cheat sheet. It is a work in progress and is not finished yet.
Formulate the Hypothesis
Null Hypothesis H0 |
hypothesis that is being tested (and trying to be disproved) |
Alternate Hypothesis H1 |
represents the alternative value |
Hypothesis Testing for Mean of 1-Sample
one sample t-test (μ0 (given) is population mean; μ is computed sample mean) |
H0 : μ = μ0, H1 : μ != μ0 |
t.test(sample_vector , mu=population_mean, alternative=”two.sided”) |
Compare p-value with 𝞪 to check if H0 is rejected or not; Check test-statistic z if H0 is true; |
test for proportion (p (given) is population mean; μ is computed sample mean) |
H0 : μ = p, H1 : μ != p |
prop.test(true_proportion, n_proportion, p=population_mean, alternative = ”less”) |
Compare p-value with 𝞪 to check if H0 is rejected or not; Check test-statistic z if H0 is true; |
Test for Normality
Quantile Quantile Plot |
|
qqPlot(vector) |
Check curve of qqplot |
Shapiro-Wilks test |
H0 : x = N(μ,σ) and H1 : x != N(μ,σ) |
shapiro.test |
Check p-value obtained from the test is < 0.05 then we reject H0 and assume the data is not normally distributed. |
Comparing Variances
Fisher’s F test |
H0: the variances are the same; H1: they are different |
var.test(vectorA, vectorB) |
Check p-value; Check ratio if H0 is true. |
|