Testing

Testing

Example: Testing for Bias in Selecting Managers

Assumptions, Hypotheses, Test Statistic, P-Value and Conclusion

p-value - Wikipedia

Significance Test for Proportion

Example: Climate Change a Major Threat?

prop.test(524,1008,p=0.50,alt="two.sided",conf.level=0.95, correct=FALSE)

    1-sample proportions test without continuity correction

data:  524 out of 1008, null probability 0.5
X-squared = 1.5873, df = 1, p-value = 0.2077
alternative hypothesis: true p is not equal to 0.5
95 percent confidence interval:
 0.4889822 0.5505497
sample estimates:
        p 
0.5198413 

Significance Test for Mean

Example: Significance Test about Political Ideology

Polid<-read.table("http://stat4ds.rwth-aachen.de/data/Polid.dat", header=TRUE)
t.test(Polid$ideology[Polid$race=="hispanic"], mu=4.0, alt="two.sided")

    One Sample t-test

data:  Polid$ideology[Polid$race == "hispanic"]
t = 1.2827, df = 368, p-value = 0.2004
alternative hypothesis: true mean is not equal to 4
95 percent confidence interval:
 3.952333 4.226528
sample estimates:
mean of x 
 4.089431 

Exercises