Normality testsP R A C T I C I N G S TAT I S T I C S I N T E R V I E W Q U E S T I O N S I N R
Zuzanna ChmielewskaActuary
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Testing normalityStatistical tests
Shapiro-Wilk test
Kolmogorov-Smirnov test
Visual measure
Q-Q plot
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Shapiro-Wilk test
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Shapiro-Wilk test
Razali, Nornadiah; Wah, Yap Bee (2011). "Power comparisons of Shapiro–Wilk, Kolmogorov–Smirnov, Lilliefors andAnderson–Darling tests"
1
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
P-value
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Shapiro-Wilk test
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Kolmogorov-Smirnov test
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Kolmogorov-Smirnov test
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Kolmogorov-Smirnov test
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Transforming data for normality
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Transforming data for normality
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Checking normality in R
Method Function
Shapiro-Wilk test shapiro.test(x)
Kolmogorov-Smirnov test ks.test(x, y = "pnorm")
Q-Q plot qqnorm(x); qqline(x)
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Summarynormality tests
Shapiro-Wilk test
Kolmogorov-Smirnov test
p-value
Q-Q plot
data transformation
checking normality in R
Let's practice!P R A C T I C I N G S TAT I S T I C S I N T E R V I E W Q U E S T I O N S I N R
Inference for a meanP R A C T I C I N G S TAT I S T I C S I N T E R V I E W Q U E S T I O N S I N R
Zuzanna ChmielewskaActuary
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Inference for a mean
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Inference for a meancon�dence interval
one-sample mean
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
AssumptionsThe t-test's assumptions:
normally distributed underlying data (recall CLT!)
random sample
independent observations
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Con�dence interval
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Con�dence interval
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Con�dence interval
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Con�dence interval
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
95% con�dence interval
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
95% con�dence interval
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
95% con�dence interval
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
95% con�dence interval
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
One-sample t-testH : μ = μ
H : μ ≠ μ
where:
μ - the population's mean
μ - the hypothesized mean
0 0
1 0
0
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
t-test in R
t.test(x)
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
t-test in R
t.test(x)
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
t-test in R
t.test(x)
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
t-test in R
t.test(x, mu = 2)
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
t-test in R
t.test(x, mu = 2, conf.level = 0.9)
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Summaryt-test's assumptions
con�dence interval
one-sample t-test
t.test() in R
Let's practice!P R A C T I C I N G S TAT I S T I C S I N T E R V I E W Q U E S T I O N S I N R
Comparing twomeans
P R A C T I C I N G S TAT I S T I C S I N T E R V I E W Q U E S T I O N S I N R
Zuzanna ChmielewskaActuary
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Comparing two means
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
HypothesesTwo-tailed test:
H : μ = μ
H : μ ≠ μ
where:
μ - the �rst population's mean
μ - the second population's mean
0 1 2
1 1 2
1
2
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
AssumptionsThe two-sample t-test's assumptions:
normally distributed underlying data
random samples
independent observations
homogeneity of variances
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
AssumptionsThe two-sample t-test's assumptions:
normally distributed underlying data
random sample
independent observations
homogeneity of variances - e.g. bartlett.test()
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Teaching methods
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Teaching methods
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Teaching methods
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Teaching methods
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Teaching methods
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Teaching methods
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Teaching methods
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Teaching methods
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Teaching methods
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Teaching methods
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
t-test in RTwo-sample t-test
t.test(value ~ group, data = df, var.equal = TRUE)
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
t-test in RTwo-sample t-test
t.test(value ~ group, data = df, var.equal = TRUE)
Paired t-test
t.test(value ~ group, data = df, paired = TRUE)
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Summarytwo-sample t-test
hypotheses
assumptions
paired t-test
t.test() in R
Let's practice!P R A C T I C I N G S TAT I S T I C S I N T E R V I E W Q U E S T I O N S I N R
ANOVAP R A C T I C I N G S TAT I S T I C S I N T E R V I E W Q U E S T I O N S I N R
Zuzanna ChmielewskaActuary
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Hypotheses
H : μ = μ = ... = μ
H : ∃ μ ≠ μ
0 1 2 n
1 (i,j) i j
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Hypotheses
H : μ = μ = μ0 1 2 3
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
HypothesesTwo-sample t-test:
H : μ = μ0 1 2
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Hypotheses
H : μ = μ = ... = μ0 1 2 n
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Why not multiple t-tests?
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Why not multiple t-tests?
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Why not multiple t-tests?
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Why not multiple t-tests?
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Why not multiple t-tests?
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Assumptionsindependence of cases
normal distributions
homogeneity of variances
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
ANOVA in R
oneway.test(value ~ group, data, var.equal = TRUE)
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Box plot
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Box plot
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Box plot
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Box plot
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Box plot
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Box plot
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Box plot
PRACTICING STATISTICS INTERVIEW QUESTIONS IN R
Summaryhypotheses of ANOVA
type I and II errors
assumptions of ANOVA
oneway.test() in R
box plot
Let's practice!P R A C T I C I N G S TAT I S T I C S I N T E R V I E W Q U E S T I O N S I N R