Skip to content

Latest commit

 

History

History
398 lines (318 loc) · 11.6 KB

statistical-inference.org

File metadata and controls

398 lines (318 loc) · 11.6 KB

Introduction to Statistical Inference

Title slide

(org-show-animate '("Quantitative Methods, Part-II" "Introduction to Statistical Inference" "Vikas Rawal" "Prachi Bansal" "" "" ""))

Sampling Distributions

Sampling Distributions

Sampling Distributions

  • $Standard.error = \frac{σ}{\sqrt{n}}$
Variable Value
Standard deviation of population ($σ$) 130
Standard errors of samples of size
5 58
20 29
50 18
200 9

Introduction to Hypothesis Testing

Transforming the Distribution to Standard Normal

bsample3.png

Distribution of sample mean with unknown population variance

bsample5.png

T Test for means

Testing if the mean is different from a specified value (say zero)

$H0: μ = 0$

$Ha: μ ≠ 0$

readRDS("plfsdata/plfsacjdata.rds")->worker
worker$standardwage->worker$wage
worker->t9
t.test(t9$wage)

Testing equality of means

$H0: μwomen = μmen$

$Ha: μwomen ≠ μmen$

subset(worker,sex!=3)->t9
factor(t9$sex)->t9$sex
t.test(wage~sex,data=t9)

Z Test for equality of proportions

$H0: pwomen = pmen$

$Ha: pwomen ≠ pmen$

subset(worker,sex!=3)->t9
as.numeric(t9$gen_edu_level)->t9$gen_edu_level
factor(t9$sex)->t9$sex
t9[gen_edu_level>=8,.(schooled=length(fsu)),.(sex)]->a
t9[,.(all=length(fsu)),.(sex)]->b
prop.test(a$schooled,b$all)

F Test for equality of variances

$H0: σwomen2 = σmen2$

$Ha: σwomen2 ≠ σmen2$

subset(worker,sex!=3)->t9
factor(t9$sex)->t9$sex
var.test(wage~sex,data=t9)