Docsity

One-Sample Tests: Sign Test and Wilcoxon Signed Rank Test - Prof. Michae Hudgens, Study notes of Data Analysis & Statistical Methods

Partial preview of the text

Download One-Sample Tests: Sign Test and Wilcoxon Signed Rank Test - Prof. Michae Hudgens and more Study notes Data Analysis & Statistical Methods in PDF only on Docsity!

One Sample Tests Bios 662

Michael G. Hudgens, Ph.D. [email protected]

http://www.bios.unc.edu/∼mhudgens

2006-09-20 16:

Outline

  • Small sample, Normal
  • Large sample
  • Nonparametric
    • Sign test
    • Wilcoxon signed rank test

One Sample Test: Small Sample, Normal

  • For small sample and Y ∼ N (μ, σ^2 ),
  • Form previous lecture, test statistic

t = Y¯ − μ s/

n

∼ tn− 1

with critical region Cα = {t : |t| > tn− 1 , 1 −α/ 2 }

One Sample Test: Small Sample, Normal

  • P-value: probability of obtaining test statistic as or more extreme than observed from the sample p = Pr[T ≤ −|t|] + Pr[T ≥ |t|] where T ∼ tn− 1
  • Equivalently

p = 2 Pr[T ≤ −|t|] = 2 Pr[T ≥ |t|]

One Sample Test: SIDS Example

  • Example: text page 281; problem 8.
  • Let our random variable Y equal the weight of SIDS baby (twin) minus weight of non-SIDS baby (twin)

H 0 : μdif f = 0

HA : μdif f 6 = 0

One Sample Test: SIDS Example

  • y¯ = 0.1818, s = 369.57, n = 22

t = y¯ s/

n

  • Critical region at α = 0. 05

C. 05 = {t : |t| > t 21 ,. 975 = 2. 08 }

  • P-value

p = 2 ∗ Pr[T ≤ − 0 .0023] = 0. 9982

One Sample Test: Small Sample

  • t test assumptions:
    • Observations are independent
    • Sample is from (the same?) normal distribution

One Sample Test: Large Sample

  • For large sample, use normal approximation (CLT):

Y¯ ∼ N (μ, σ

2 n

Z =

Y¯ − μ s/

n approx N (0, 1)

  • Approximation improves as n → ∞
  • Note: Y ’s do not need to be normally distributed

One Sample Test: Large Sample

  • Example: Iron deficiency (continued)

H 0 : μ = 14.45; HA : μ 6 = 14. 45

C. 05 = {z : |z| > 1. 96 }

Y^ ¯ = 12.5; s^2 = 22.5625; n = 63

z =

√^12.^5 −^14.^45

  • Reject H 0

One Sample Testing/Estimation: Large Sample

  • Testing H 0 : μ = 0

Cα = {z : |z| > z 1 −α/ 2 } where z = Y¯ − μ 0 s/

n

  • Estimation: confidence interval for μ

Y^ ¯ ± z 1 −α/ 2 √^ s n

  • Can show: Reject H 0 iff CI excludes μ 0

One Sample Testing/Estimation: Large Sample

  • Theorem: Reject H 0 iff CI excludes μ 0
  • Sketch of proof: Suppose CI excludes μ 0 ie

μ 0 ∈/ [ Y¯ − z 1 −α/ 2 √^ s n

, Y¯ + z 1 −α/ 2 √^ s n

]

Without loss of generality, assume μ 0 < Y¯ − z 1 −α/ 2 √^ s n

This implies

z 1 −α/ 2 < Y¯ − μ 0 s/

n ≡ z

implying z ∈ Cα 

One Sample Test: Small Sample, Non-normal

  • Suppose small sample, non-normally distributed data
  • Nonparametric tests:
    • Sign test
    • Wilcoxon signed rank test
  • Read van Belle et al 8.1-8.

Sign Test

  • Delete obs=ζ. 5 , 0 and reduce n by 1 for each
  • Let r be the number of obs > ζ. 5 , 0
  • Under H 0

r ∼ Bin(n, .5)

Pr[r ≤ r′] =

∑^ r′

i=

n i

)i ( 1 −

)n−i

2 n

∑r′

i=

n i

Sign Test

  • Note: H 0 : ζ. 5 = ζ. 5 , 0 ⇐⇒ H 0 : π =. 5 where π is the parameter of a binomial RV
  • In order to test H 0 : π = .5 vs HA : π 6 = .5, we must find values rα/ 2 and r 1 −α/ 2 such that Pr[r ≤ rα/ 2 ] + Pr[r ≥ r 1 −α/ 2 ] ≤ α