P-values


What is a P-value?

Idea: Suppose nothing is going on - how unusual is it to see the estimate we got?

Approach:

  1. Define the hypothetical distribution of a data summary (statistic) when “nothing is going on” (null hypothesis)
  2. Calculate the summary/statistic with the data we have (test statistic)
  3. Compare what we calculated to our hypothetical distribution and see if the value is “extreme” (p-value)

P-values

pt(0.8, 15, lower.tail = FALSE) 
[1] 0.2181

The attained significance level


Notes


Revisiting an earlier example

choose(8, 7) * .5 ^ 8 + choose(8, 8) * .5 ^ 8 
[1] 0.03516
pbinom(6, size = 8, prob = .5, lower.tail = FALSE)
[1] 0.03516

Poisson example

ppois(9, 5, lower.tail = FALSE)
[1] 0.03183