Lesson 10 of 15
Hypothesis Testing (t-test)
Hypothesis Testing: t-test
A t-test tests whether an observed difference is statistically significant or could be due to random chance.
One-sample t-statistic tests whether a sample mean differs from a hypothesized value :
where is the sample standard deviation and is the sample size. Large values indicate the sample mean is unlikely to come from a distribution with mean .
Two-sample t-statistic (Welch's) tests whether two independent samples have different means:
Welch's version is preferred because it does not assume equal variances.
Your Task
Implement:
t_statistic(sample, mu0)— one-sample t-statistictwo_sample_t(xs, ys)— Welch's two-sample t-statistic
Python runtime loading...
Loading...
Click "Run" to execute your code.