# 12

1. What is the critical region for a 5% two-sided test if, under the null hypothesis, the test statistic is distributed as \text{Student}(0,\sigma,4)? That is, what values of the test statistic disprove the null hypothesis with p < 0.05? (OK to use Python, MATLAB, or Mathematica.)

from scipy.stats import t
print t.ppf(.025, 4)
print t.ppf(.975, 4)

value 1: -2.7764451052
value 2: 2.7764451052


2. For an exponentially distributed test statistic with mean \mu (under the null hypothesis), when is the the null hypothesis disproved with p < 0.01 for a one-sided test? for a two-sided test?

$e^{-\lambda{x}}$

$-1$

$x}\lambda{e^{-\lambda{x}}$

$-\lambda{x}$

$-ln(.01)}{\lambda} = -\mu*{ln(.01)$

In two sided tests with p = .01, we must find two x's

$x}\lambda{e^{-\lambda{x}}$

$-\lambda{x}$

$-ln(.005)}{\lambda} = -\mu*{ln(.005)$

$x}\lambda{e^{-\lambda{x}}$

$-\lambda{x}$

$-ln(.995)}{\lambda} = -\mu*{ln(.995)$