Skip to content
faizan8201 edited this page Apr 19, 2020 · 13 revisions

What is T-Test:

**A t-test is a statistic that checks, if two means/averages (of two groups) are reliably different from each other**

Why not just MEAN:

  • Looking at mean may show a difference but we cannot be sure if it is reliable difference.
  • For example: If two person(you and me) flip the coin 100 times and you gets more heads,
    does that mean in future you will again get more head? NO, because its just a chance

Screenshot 2020-04-14 at 6 17 51 PM

  • So, here comes the difference between Descriptive Stat. and Inferential Stat
Descriptive Statistics Inferential Statistics
It is stat, such as mean, it describes data but does not goes beyond that. It is stat, such as t-test, that allow us to make inferences beyond our data.

Example for t-test:

  • The working of t-test can be understand by a test.
  • Let's test a cholesterol control pill on two groups
    but in a way that half of them get the drug and rest half get the inactive drug.

Screenshot 2020-04-14 at 6 36 19 PM.

  • So, the mean cholesterol of both group is different. But Is the
    difference reliable? Is the drug working or not? There we can check by t-test analysis.

Screenshot 2020-04-14 at 6 54 21 PM.

  • Where difference between groups is 2 and difference with-in groups is 6
    So, t=> 2/6 = 0.3
  • To, check the reliability of test p-value is used. Whereas, p-value tells
    that there is a real difference between two groups or its just a fluke.
  • Usually if p-value is less the 0.05 (means 5%) or less
    then hen the effect is real otherwise not.
  • But do not forget p-value depends upon Sample size. Bigger the sample size better the accuracy.

Types of T-Tests:

  • Usually there are three main types of t-test
  1. Independent sample test.
  2. Paired sample test(dependent sample test).
  3. One sample test
Independent sample test Paired sample test One sample test
Tests the mean of two different groups Tests the mean of one group twice Tests the mean of one group against a set mean
e.g. Testing the average quality of two different batches of beer e.g. Testing balance of people before and after drinking alcohol e.g. Testing IQ of group of people against a standard value 100

Limitations in T-test:

  1. Results can only be applied to population that resembles the sample.
    e.g. Cholesterol drug test was conducted for adults, So i can not be true for children.

  2. Sample and Population should be roughly normal in distribution.

  3. Each group should have same number of data points. Otherwise there will be inaccurate results.

  4. All data should be independent.

Overcoming T-Test:

  • Non-parametric tests like Mann-Whitney U-test.
  • It performs the same job as t-test, but it can work with normal distribution and ordered level data.
Clone this wiki locally