independent t test Flashcards
T-test
t-tests are a type of inferential statistic used to compare groups of data
when might we use an independent T-test
- Who can run faster football players or rugby players?
- Is there a significant difference in health between patients who took Drug A compared with patients who took Drug B?
- Which YouTube channels get the most views (in time duration) gaming channels or vlogging channels?
Features of the data for an Independent T-test
One independent variable with two independent groups
One dependent variable measured using continuous and normally distributed data
continuous data
measured data, can have infinite values within possible range.
e.g. i weigh 57.7kg
discrete data
observations can only exist at limited values, often counts.
e.g. i have 2 legs
What is an Independent T-test
An independent-samples t-test (independent t-test for short) is used to establish whether two means collected from independent samples differ significantly.
Inferential statistics
● Descriptive statistics e.g., measures of central tendency (i.e., mean, mode, median) and measures of spread (i.e., range, variance, standard deviation) give us information about our immediate group of data (sample)
● Inferential statistics allows us to use the sample we have collected to make generalisation about the population that sample represents. Inferential statistics involves:
1. Estimation of parameters
2. Testing of statistical hypotheses
Null hypothesis testing
● Null hypothesis: a statement that often suggests no difference/relationship e.g., “There is no relationship between the number of hours spent gaming and happiness”
● Inferential statistics (e.g., correlations, regressions, t-tests etc) give the probability of observing your sample results (or more extreme) given that the null hypothesis is true.
● This is often expressed as a p-value
● The null hypothesis for the independent t-test is that the population means from the two unrelated groups are equal:
H0: u1 = u2
● In most cases, we are looking to see if we can show that we can reject the null hypothesis and accept the alternative hypothesis, which is that the population means are not equal:
HA: u1 ≠ u2
● To do this, we need to set a significance level (also called alpha) that allows us to either reject or accept the alternative hypothesis. Most commonly, this value is set at 0.05
The role of variance
An independent t-test accounts for both:
The difference between groups
AND
The variance within groups
r studio
t_test(dataset ~ dataset, data = data)
/
T_test(dataset, dataset, data = data)