/Two_Tailed_T-test

Multivariate Analysis - Final Project

Primary LanguagePython

Two Tailed T-test

  • A t-test is a type of inferential statistic used to determine if there is a significant difference between the means of two groups, which may be related in certain features.
  • It is used as a hypothesis testing tool, which allows testing of an assumption applicable to datasets.

Steps involved in the T-test

Screenshot 2021-10-19 at 2 52 09 AM

T-test Performed on the Following Studies

  1. To compare the agricultural yield of two barley produce batches. The first batch was produced under natural conditions the second batch was produced in a greenhouse.
  2. To compare the height of boys (having parents shorter than 4 feet tall) at different stages of their childhood.
  3. Determine the effectiveness of a weight loss program. Before and after weights of 15 subjects in the program.

Specifications in the T-test explored

  1. Paired T-test: a statistical test that compares two related or dependent groups to determine if there is a significant difference between the two groups.
  2. Unpaired T-test: a statistical procedure that compares two independent or unrelated groups to determine if there is a significant difference between the two.

Paired t-tests are considered more powerful than unpaired t-tests because using the same participants or item eliminates variation between the samples that could be caused by anything other than what’s being tested.

Variations in the T-test explored

  1. Two-tailed hypothesis tests: are also known as nondirectional and two-sided tests because you can test for variations in both directions. When you perform a two-tailed test, you split the significance level percentage between both tails of the distribution.

  2. One-tailed hypothesis tests: are also known as directional and one-sided tests because you can test for variations in only one direction. When you perform a one-tailed test, the entire significance level percentage goes into the extreme end of one tail of the distribution.

Two Tailed T-test One Tailed T-test
Screenshot 2021-10-19 at 2 58 32 AM Screenshot 2021-10-19 at 2 58 05 AM

Directory Structure

  • src folder contains the source code.
  • results folder contains code output screenshots.

Running the code

  1. Edit the code to contain dataset specific to your hypothesis
  2. Adjust the Critical Value based on your requirement
  3. Install any necessary libraries if needed
  4. Run the file