Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ t-test Mathematically | Statistical Testing
Statistics with Python

bookt-test Mathematically

メニューを表示するにはスワイプしてください

The task of the t-test is to determine whether the difference between the two samples' means is significant. What should you take into consideration to perform it?

Obviously, you should consider the difference between the means itself.

As shown in the image below, the variance matters too.

Also, the size of each sample should be taken into consideration.

To account for the difference between the means, simply calculate that difference:

xˉ1xˉ0\bar{x}_1-\bar{x}_0

The situation becomes more complex when it comes to variance. The t-test assumes that the variance is equal for both samples. This will be explored further in the t-test assumptions chapter. To estimate the variance from two samples, the pooled variance formula is applied.

spooled2=s12df1+s22df2df1+df2=s12(n11)+s22(n21)n1+n22s^2_{pooled} = \frac{s^2_1 \cdot df_1 + s^2_2 \cdot df_2}{df_1 + df_2} = \frac{s^2_1(n_1-1)+s^2_2(n_2-1)}{n_1+n_2-2}

Where:

  • n1n_1 - size of i-th sample;
  • df1=ni1df_1 = n_i - 1 - i-th degree of freedom;
  • si2s_{\raisebox{-1pt}{i}}^{\raisebox{1pt}{2}} - i-th sample variance.

And to account for the size, it needs sample sizes:

n1,n2are the sample sizesn_1, n_2 - \text{are the sample sizes}

Put it all together into t-statistic.

t=xˉ1xˉ0spooled2  1n1+1n2t = \frac{\bar{x}_1-\bar{x}_0}{\sqrt{s^2_{pooled}}\ \cdot\ \sqrt{\frac{1}{n_1}+\frac{1}{n_2}}}

Sample sizes may not always be used in the most intuitive manner. However, this approach ensures that t follows the t-distribution, which will be explored in the next chapter.

question mark

What sample properties does the t-test take into account?

すべての正しい答えを選択

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 6.  3

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 6.  3
some-alt