inst/snippet/t-test-01.R

t <- ( 10.3 - 10 )/ (0.4 / sqrt(10)); t;       # test statistic
2 * pt(-abs(t),df=9);            # p-value using t-distribution
2 * pnorm(-abs(t));              # "p-value" using normal distribution

Try the fastR package in your browser

Any scripts or data that you put into this service are public.

fastR documentation built on May 2, 2019, 5:53 p.m.