Sunday 1 September 2013

t-test

                                                            t-test


A t-test is a statistics that checks if two means (averages)are reliably different from each other why not just look at the mean looking at the means may show a difference but we can't be sure if that is a reliable diffrence for example if we toss a coin 100 times u get 52 times head where as i get 49 heads this is by chance
this leads to diffrence between infrential and descriptive statistics. a descriptive statistics is a stats that describe you have but cant be genralized beyond that tells us  the sample we have it doesnt tell us the further results what will happen in future where as infrential staistics is same as t-test it allow us to make infrences about the population beyond our data how does t-test work it measures the diffrence between the group nand within the group
     variance between groups 
t=    variance within groups
 A big t-value diffrent groups 
A small t-value similar groups
t-test is any statistical hypothesis test in which the test statistic follows a Student's t distribution if the null hypothesis is supported. It can be used to determine if two sets of data are significantly different from each other, and is most commonly applied when the test statistic would follow a normal distribution if the value of a scaling term in the test statistic were known. When the scaling term is unknown and is replaced by an estimate based on the data, the test statistic (under certain conditions) follows a Student's t distribution.
ASSUMPTIONS:
Most t-test statistics have the form t = Z/s, where Z and s are functions of the data. Typically, Z is designed to be sensitive to the alternative hypothesis (i.e., its magnitude tends to be larger when the alternative hypothesis is true), whereas s is a scaling parameter that allows the distribution of t to be determined.
As an example, in the one-sample t-test Z = \bar{X}/(\hat{\sigma}/\sqrt{n}), where \bar{X} is the sample mean of the data, n is the sample size, and \hat{\sigma} is the population standard deviation of the data; s in the one-sample t-test is \hat{\sigma}/\sqrt{n}, where \hat{\sigma} is the sample standard deviation.
The assumptions underlying a t-test are that
In a specific type of t-test, these conditions are consequences of the population being studied, and of the way in which the data are sampled. For example, in the t-test comparing the means of two independent samples, the following assumptions should be met:
  • If using Student's original definition of the t-test, the two populations being compared should have the same variance (testable using F testLevene's testBartlett's test, or the Brown–Forsythe test; or assessable graphically using a Q-Q plot). If the sample sizes in the two groups being compared are equal, Student's original t-test is highly robust to the presence of unequal variances.[8] Welch's t-test is insensitive to equality of the variances regardless of whether the sample sizes are similar.
The data used to carry out the test should be sampled independently from the two populations being compared. This is in general not testable from the data, but if the data are known to be dependently sampled (i.e. if they were sampled in clusters), then the classical t-tests discussed here may give misleading results
FORMULA

Example 

A researcher wishes to learn whether the pH of soil affects seed germination of a particular herb found in forests near her home. She filled 10 flower pots with acid soil (pH 5.5) and ten flower pots with neutral soil (pH 7.0) and planted 100 seeds in each pot. The mean number of seeds that germinated in each type of soil is below.
      Acid Soil    
pH 5.5
Neutral Soil
pH 7.0
4243
4551
4056
3740
4132
4154
4851
5055
4550
4648

Mean =
  
 43.5

48
The researcher is testing whether soil pH affects germination of the herb.
Her hypothesis is: The mean germination at pH 5.5 is different than the mean germination at pH 7.0.
t-test can be used to test the probability that the two means do not differ. The alternative is that the means differ; one of them is greater than the other.
This is a two-tailed test because the researcher is interested in if soil acidity changes germination percentage. She does not specify if it increases or decreases germination. Notice that a 2 is entered for the number of tails below.

The t-test shows that the mean germination of the two groups does not differ significantly because p > 0.05. The researcher concludes that pH does not affect germination of the herb.

Example 

Suppose that a researcher wished to learn if a particular chemical is toxic to a certain species of beetle. She believes that the chemical might interfere with the beetle’s reproduction. She obtained beetles and divided them into two groups. She then fed one group of beetles with the chemical and used the second group as a control. After 2 weeks, she counted the number of eggs produced by each beetle in each group. The mean egg count for each group of beetles is below.
Group 1
   fed chemical   
Group 2
   not fed chemical (control)   
3335
3142
3443
3841
32
28
      
Mean =  32.7  40.3
The researcher believes that the chemical interferes with beetle reproduction. She suspects that the chemical reduces egg production. Her hypothesis is: The mean number of eggs in group 1 is less than the mean number of group 2.
t-test can be used to test the probability that the two means do not differ. The alternative is that the mean of group 1 is greater than the mean of group 2.
This is a 1-tailed test because her hypothesis proposes that group B will have greater reproduction than group 1. If she had proposed that the two groups would have different reproduction but was not sure which group would be greater, then it would be a 2-tailed test. Notice that a 1 is entered for the number of tails below.
The results of her t-test are copied below.

The researcher concludes that the mean of group 1 is significantly less than the mean for group 2 because the value of P < 0.05. She accepts her hypothesis that the chemical reduces egg production because group 1 had significantly less eggs than the control.
 written by : PRERNA ARORA
group no.8
Group member praveen iyer
                        neeraj ramadas
                        prakhar swami
                        nishant aggarwal

No comments:

Post a Comment