7. Hypothesis Testing Flashcards

1
Q

Hypothesis test: z test

A

Z(obs) = x̅-μ0 / σ/sqrt(n)

p-value = 2(1 - Φ|Zobs| )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Hypothesis test: t test

A

Use this when variance is unknown.
t(obs) = x̅-μ0 / s/sqrt(n)
p-value = 2(1 - Φ|Zobs| )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

R code for hypothesis test using standard normal distribution.

A

pnorm( z(obs), 0, 1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

R code for hypothesis test using t distribution.

A

pt( t(obs), n-1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Type 1 error

A

Reject H0 when it is true.
p(type 1 error) = α
where α is the significance level being tested.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Type 2 error

A

Accept H0 when it is false.

p(type 2 test) = 1 - power

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the power of a hypothesis test?

A

power = 1 - p(type 2 error)

= Φ(-Zcrit - (μ-μ0)/ σ/sqrt(n) ) +1 - Φ(Zcrit - (μ-μ0)/ σ/sqrt(n) )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Testing with a fixed significance level, α. When do we reject H0?

A

We reject H0 if

|Z(obs)| > Φ^-1( 1 - α/2)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Two sample hypothesis tests when the samples are dependent.

A

Define a new random variable: Di = Xi - Yi. Then Di and Dj are independent.
(d-bar) = (x-bar) - (y-bar).
Then continue with t as normal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Two sample hypothesis tests when the samples are independent and variance is unknown.

A

We can work with the raw data. We compare:
T = (Xbar - Ybar) - μ0 / sqrt( Sx^2/nx + Sy^2/ny)
with the T distribution it would have if H0 were true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Two sample confidence interval for μ when the samples are independent and variance is unknown.

A

(xbar - ybar) +- T(v, 1-α/2) sqrt(S x^2/nx + Sy^2/ny)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Plus four / Wilson confidence interval for a proportion.

A

Replace p^=x/n with p~=(x+2) / (n+4)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly