# 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?

**Failed to parse (unknown error): p = \lambda{e^{-\lambda{x}}}**

**Failed to parse (unknown error): \mu = \lambda^{-1}**

**Failed to parse (unknown error): \int_0^{x}\lambda{e^{-\lambda{x}}}\,dx = .99**

**Failed to parse (unknown error): 1-e^{-\lambda{x}}=.99**

**Failed to parse (unknown error): x = \frac{-ln(.01)}{\lambda} = -\mu*{ln(.01)}**

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

**Failed to parse (unknown error): \int_0^{x}\lambda{e^{-\lambda{x}}}\,dx = .995**

**Failed to parse (unknown error): 1-e^{-\lambda{x}}=.995**

**Failed to parse (unknown error): x = \frac{-ln(.005)}{\lambda} = -\mu*{ln(.005)}**

**Failed to parse (unknown error): \int_0^{x}\lambda{e^{-\lambda{x}}}\,dx = .005**

**Failed to parse (unknown error): 1-e^{-\lambda{x}}=.005**

**Failed to parse (unknown error): x = \frac{-ln(.995)}{\lambda} = -\mu*{ln(.995)}**