In: Statistics and Probability
1. One tailed is test where we check the sample mean is the correct estimate of population mean, under certain level of significance
Null hypothesis : The mean of the population is mu is equal to any value mu_o ( say ) , mu = mu_o
Alternate hypothesis : The mean of the population is mu is greater than the value mu_o ( say ) , mu > mu_o
in case of data not being normal, for one tailed, we will use t test
where, t = ( x_bar - mu_o ) / ( SE(x_bar)*(n-1)^1/2 ) , where X_bar is sample mean, SE(x_bar) is standard deviation of x_bar and n is sample size
Assumptions for one sample t test:
data should be continuous or ordinal
sample should be random
sample size should be less ( n < 30 )
population should follow normal distribution
Assumptions for two sample t test:
data should be continuous or ordinal
sample should be random
sample size should be less ( n < 30 )
population should follow normal distribution
variance of the two samples should be same ( homogeniety of variance )
In terms of coding one sample t test is performed using command
t.test( x,y ), when it is two sample t test, for x and y
when Welch test is used an additional command, var.equal = FALSE is used
.t.test( x,y ,var.equal = FALSE), when it is two sample t test, for x and y and variance are not equal
paired t test is used when we check the difference of the sample sample before and after any operation, for example, before and after weight of sample on a diet
So, in paired t test we check for the significance difference between the before and after effect of treatment whereas in two sample t test we check for the overall difference in means of to samples.
In paired t test same sample value is tested twice before and after the treatment, whereas in two paired t test two different sample values are taken