You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 KiB

Introduction to Statistical Inference

Title slide   slide

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

Sampling Distributions

Sampling Distributions   slide

Sampling Distributions   slide

  • $Standard.error = \frac{\sigma}{\sqrt{n}}$
Variable Value
Standard deviation of population ($\sigma$) 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   slide

/Courseware/quantitative-methods/src/commit/2611bf2a3c86f808c6f950e4268d96959a408489/bsample3.png

Distribution of sample mean with unknown population variance   slide

/Courseware/quantitative-methods/src/commit/2611bf2a3c86f808c6f950e4268d96959a408489/bsample5.png

T Test for means   slide

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

$H_{0}: \mu = 0$

$H_{a}: \mu \neq 0$

  readRDS("plfsdata/plfsacjdata.rds")->worker
  worker$standardwage->worker$wage
  worker->t9
  t.test(t9$wage)
- One Sample t-test
- data:  t9$wage
- t = 432.99, df = 37634, p-value < 0.00000000000000022
- alternative hypothesis: true mean is not equal to 0
- 95 percent confidence interval:
- 289.7136 292.3484
- sample estimates:
- mean of x 
- 291.031

Testing equality of means   slide

$H_{0}: \mu_{women} = \mu_{men}$

$H_{a}: \mu_{women} \neq \mu_{men}$

  subset(worker,sex!=3)->t9
  factor(t9$sex)->t9$sex
  t.test(wage~sex,data=t9)
- Error in subset(worker, sex != 3) : object 'worker' not found
- Error in factor(t9$sex) : object 't9' not found
- Error in eval(m$data, parent.frame()) : object 't9' not found

Z Test for equality of proportions   slide

$H_{0}: p_{women} = p_{men}$

$H_{a}: p_{women} \neq p_{men}$

  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)
- 2-sample test for equality of proportions with continuity correction
- data:  a$schooled out of b$all
- X-squared = 847.73, df = 1, p-value < 0.00000000000000022
- alternative hypothesis: two.sided
- 95 percent confidence interval:
- -0.1694726 -0.1525728
- sample estimates:
- prop 1     prop 2 
- 0.09245986 0.25348253
Results of test for equality of proportions of men and women who have passed secondary school

F Test for equality of variances   slide

$H_{0}: \sigma_{women}^{2} = \sigma_{men}^{2}$

$H_{a}: \sigma_{women}^{2} \neq \sigma_{men}^{2}$

  subset(worker,sex!=3)->t9
  factor(t9$sex)->t9$sex
  var.test(wage~sex,data=t9)
- F test to compare two variances
- data:  wage by sex
- F = 1.8352, num df = 30652, denom df = 6975, p-value <
- 0.00000000000000022
- alternative hypothesis: true ratio of variances is not equal to 1
- 95 percent confidence interval:
- 1.768532 1.903506
- sample estimates:
- ratio of variances 
- 1.835174