Segment 12

From Computational Statistics (CSE383M and CS395T)
Jump to navigation Jump to search

Calculation Problems

1. Critical region for a 5% two-sided test, under the null hypothesis, Student(0, <math>\alpha</math>, 4).

Input:
from scipy.stats import t
#0.05 two sided test would be 0.025
print t.ppf(0.025, 4)
print t.ppf(0.975, 4)
Output: 
(-<math>\infin </math>, -2.7764451052) (2.7764451052, <math>\infin</math>)

2. When is null hypothesis disapproved for an exponential distributed test with mean <math> \mu </math>, p < 0.01 for one-sided and two-sided?

from scipy.stats import expon
#0.01 one sided and 0.005 two sided
#one-sided
print expon.ppf(0.99, loc=u)
#two-sided
print expon.ppf(0.995, loc=u) 
print expon.pdF(0.005, loc=u)

Food for Thought Problems

Class Activity