T-distribution & independent t-test Flashcards
What do we use simulation studies for?
We can’t measure the whole population so we use a sample from that population and we can run a simulation to learn from the statistics of the sample
How can we represent the difference between two means using a linear model?
This is just an interesting thing that you can calculate t and p-value with a linear regression model in JASP. But because we are focusing on the t-test, we don’t need to know how you get the linear equation. I included the steps but I don’t think we need to practice this since it gives the same info as a t-test
We include a two-category predictor and we can see, using JASP, the t-statistic and p-value which show us whether one category is significantly different from this other
How to do it in JASP?
1. After loading the dataset, on the top click on Regression > Classical > Linear regression
2. Drag the corresponding variable into dependent variable and the independent variable into factors
3. Watch the magic happen
4. Under the coefficients table you see the M1 (interectept) the t and the p values
We can’t measure the whole population - how do we solve this issue?
We collect samples from the population to estimate the mean and the standard deviation of the population
However, each sample will have a different mean and SD as well - sampling variability - which is not the same as the population mean and SD
To fix this, we use a sampling distribution
What is a sampling distribution?
- We repeatedly collect samples of the same size from the same population
- It represents how much variability there is from one sample to the next one
- It has its own mean (which is the closest estimate of the population mean) and its own SD which is called the standard error
What does a large/small standard error mean?
SE is the standard deviation of the sampling distribution
- Large SE = on average, lot of flactuation between our observed means
- Small SE = on average, less flactuation; fairly close to the population mean
- SE is a good indicator of the size of the difference between sample means
What influences SE?
- Sample size - the bigger the sample, the less it will flactuate
- The variability of the variable itself - the bigger our sigma, the higher our SE
Overview
What are the steps of a t-test in general
- State the hypotheses (H₀ and Ha)
- Choose the type of the t-test
- Set the significance level (α)
- Calculate the test statistic (t-value) based on the type of the test chosen
- Determine the degrees of freedom (df)
- Find the critical value corresponding to our df and α in a database
- Compare the t-statistic to the t-distribution to find the p-value
- Make a decision
If the p-value ≤ α: Reject the null hypothesis
If the p-value > α: Fail to reject the null hypothesis - Calculate the effect size
- Report the results
What is the t-statistic?
It represents the deviation of the sample mean from the population mean μ, considering the sample size, expressed as the degrees of freedom df = n − 1
picture 1 for the formula
What is the T-distribution and what do we use it for?
It is a continuous sampling distribution of the t-statistic (standardised scale) which tells us how likely a certain t-value is given the null hypothesis is true
- If the population is normaly distributed (assumption of normality) the t-distribution represents the deviation of sample means from the population mean, given a certain sample size
- It has uncertainty built into it (works fairly well when sample is small and/or population SD is unknown)
- picture 2 for formula (no need to remember)
What role does the sample size play in a t-distribution?
- T-distribution is different for different sample sizes and converges to a standard normal distribution if sample size is large enough
↪ With infinite many df, the t-distribution would be identical to the population distribution - The lower the sample size, the more if differs from pop. distribution - it will have chunkier tails which means it has more probability mass in its tail areas compared to larger samples (picture 3)
What is the difference between one sided and two sided t-test?
We have to establish our alternative hypothesis before we do the analysis
Two sided:
HA: x̄ ≠ μ
One sided (directional hypothesis):
HA: x̄ < μ
HA: x̄ > μ
What does the p value represent in regards to the t statistic?
It represents the probability of observing a t-statistic as extreme as, or more extreme than, the value calculated from our sample data, assuming that the null hypothesis is true
- Compare it to the alpha (α) level (usually 0.05) and we can evaluate the significance of the results
How does the numer of degrees of freedom affect the p-value?
P-value is higher if we have lower df than higher df so to reach significance we need larger t statistic to reject the null hypothesis if our sample is smaller
- because we’re estimating both the population mean and the standard deviation and for low sample sizes it’s hard to estimate population sd because it’s a noisy estimate
- T-distribution helps with this since it has uncertainty build into it so it can compensate for low sample sizes
What does the α represent and where on the picture 4 can we see it?
The (red in the picture) area under the curve is equal to our α = the probability of rejecting the null hypothesis if it it true (Type I error)
- the smaller the α, the more evidence we need in order to reject the null hypothesis
- So we will make Type I error less frequently
- We want Type I error to be as small as possible
What is the difference in the t-distribution for the two sided and one sided t test?
Picture 4
In two sided test, our α level is divided into the two tails, whereas in the one sided test, it is only in one tail
- We look at the tail/s to see whether they contain extreme values or higher than our set α (extreme enough to reject the null)
- The extreme value marks the threshold for when we will reach significance when our p-value will be lower than α
- With a one-sided test, we reach significance faster since we’re making a more specific statement and the p-value doesn’t get split between the two tails
- However if we make a mistake about the directionality - we’re more lost since we have to reject the null hypothesis
What is the effect size?
The effect-size is the standardized difference between the sample mean and the expected population mean
- In the t-test, effect-size can be expressed as d (Cohen’s d)
- formula in picture 5 - we square n which eliminates any influence of the sample size
- Another option is to have the effect size expressed as (similar to correlation coefficient) - formula in picture 6