T-distribution & independent t-test Flashcards

1
Q

What do we use simulation studies for?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

We can’t measure the whole population - how do we solve this issue?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a sampling distribution?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does a large/small standard error mean?

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What influences SE?

A
  1. Sample size - the bigger the sample, the less it will flactuate
  2. The variability of the variable itself - the bigger our sigma, the higher our SE
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Overview

What are the steps of a t-test in general

A
  1. State the hypotheses (H₀ and Ha)
  2. Choose the type of the t-test
  3. Set the significance level (α)
  4. Calculate the test statistic (t-value) based on the type of the test chosen
  5. Determine the degrees of freedom (df)
  6. Find the critical value corresponding to our df and α in a database
  7. Compare the t-statistic to the t-distribution to find the p-value
  8. Make a decision
    If the p-value ≤ α: Reject the null hypothesis
    If the p-value > α: Fail to reject the null hypothesis
  9. Calculate the effect size
  10. Report the results
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the t-statistic?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the T-distribution and what do we use it for?

A

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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What role does the sample size play in a t-distribution?

A
  • 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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the difference between one sided and two sided t-test?

A

We have to establish our alternative hypothesis before we do the analysis
Two sided:
HA: x̄ ≠ μ

One sided (directional hypothesis):
HA: x̄ < μ
HA: x̄ > μ

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the p value represent in regards to the t statistic?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does the numer of degrees of freedom affect the p-value?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does the α represent and where on the picture 4 can we see it?

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the difference in the t-distribution for the two sided and one sided t test?

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the effect size?

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are two ways to reach significance faster?

A
  1. The size of the effect
  2. The larger the group difference the more power we have to distinguish between two groups
18
Q

How do we classify the effect sizes and what distribution do we use for that?

A

Picture 7
Effect-size distribution - Which values will be more and which will be less likely under my null hypothesis?
Cohen’s d sampling distribution under H0
small ≈ 0.3
Medium ≈ 0.5
Large ≈ 0.8

19
Q

What do we observe if we set the population difference to a non-zero value?

A

We explore the sampling distribution under the alternative hypothesis
- The further the true value (mean of population difference) deviates from 0, the larger our power is

20
Q

What is the power of a t-test?

A

The probability that the test will correctly reject the null hypothesis (H₀) when the alternative hypothesis (Ha) is true
- The effect size drives our power = the higher our effect size, the greater our power
↪ if the effect size is too small, we have to have a large sample size
- A power of 0.8 measn that there is an 80% chance of detecting an effect if it exists
- Power=1−β
- β = the probability of making a Type II error (not rejecting the null when it’s false)

21
Q

What are the different types of t-tests?

A
  1. One-sample t-test
  2. Independent t-test
  3. Paired-samples t-test (dependent t-test)
22
Q

One-sample t-test

A

Compares the mean of a single sample to a known or hypothesized population mean

23
Q

What are the assumptions of one-sample t-test?

A

Normal samples distribution
Random samples
Measurement level
- Interval
- Ratio

Will return to those later

24
Q

What is a model and what does it contribute to?

A

Model says something about the average value in the population and we can fit such a model to our data
Outcome = model + error
The equation shows what our model predicts accurately and mistakingly and together these form our observed scores

  • we want the model to be high and the error to be low
25
Q

Example of a model

A

Postulated average of IQ = 120 (null hypothesis) - our model
Collected data: n = 63, mean = 117, sd = 16
Is the difference statistically significant that we reject our model of 120? = We do inferential statistics since the data is just from a sample and we’re talking about a population
We determine our Ha and α level, check the assumptions (later), t -statistic, use the t distribution to quantify how extreme our t statistic is, locate our t statistic on the x axis (what is the probability of observing a t statistic of 1.2 or greater if the null hypothesis is true = p value), calculate p value based on the t-dist.

26
Q

Paired-samples t-test?

A

Compares means of the same entities tested in different conditions on a related observation (e.g., within person, before and after treatment)
- Test whether the average difference of my two groups is equal to the null hypothesis or not

27
Q

What do we calculate in a paired-samples t-test?

A

The difference (D) for each pair is calculated and the mean of these differences (D with a bar) is tested against the null hypothesis where μ=0
↪ compares the mean difference between our samples to the difference that we would expect to find between population means
Picture 8 - the formula

28
Q

Explain the formula of paired-sample t-test in terms of signal and noise

A

It’s signal-to-noise variation - if the experimental manipulation creates difference between conditions then we would expect the effect (signal) ti be greater than the unsystematic variation (noise) → t>1

29
Q

What hypothesis can we postulate in the paired-samples t-test?

A

Picture 9

30
Q

What does the structure of the data look like?

A

We have a participant number and then each participant has two rows (k1 and k2) which is the level of the categorical predictor variable and x is the value of the outcome/dependent variable
Picture 10

31
Q

Assumptions of paired-samples t-test

A
  1. Normality (relates to the sampling distribution of the differences between scores, not the scores themselves)
  2. Independence of pairs - each pair of observations should be independent of other pairs
  3. Continous data - dependent variable measured at interval or ratio
32
Q

Independent t-test

A

Compare means of two independent groups of observations to see if they are significantly different
- we measure different subjects in different groups

33
Q

How do we calculate the independent-samples t-test?

A

The mean of both independent samples is calculated and the difference of these (X¯1−X¯2) means is tested against the null hypothesis where μ=0
↪ difference between sample means not between individual pairs of scores
- picture 11
- pooled standard error → combination of sd of group 1 and sd of group 2
↪ takes into account the sample size by weighting the variance of each sample

34
Q

What hypothesis can we postulate in an independent-samples t-test?

A

Picture 12
Null hypothesis - There is no difference between the two groups

35
Q

What does the data structure look like?

A

Picture 13
index column - number of participant
k column - the level fo the categorical predictor variable
x - the value of the outcome/dependent variable

36
Q

What are the assumptions of the independent-samples t-test?

A
  1. Normality assumption
  2. Equality of variance
37
Q

What is the equality of variance assumption of independent-samples t-test?

A

Whether we can assume that the sd of group 1 and sd of group 2 are the same
- use Levene’s test = hypothesis test that is significant when the assumption is violated and it’s not significant if the assumption is not violated
H0: variance = equal (p>0.05)
Ha: variance ≠ equal (p<0.05)

38
Q

What should we be careful with when interpreting Levene’s test?

A
  • Levene’s test is heavily influenced by sample size so a significant test result doesn’t necessarily mean that you have a problem
  • A more pragmatic rule of thumb is to look at the ratio of variances - a ratio greater than 2 is problematic
  • Welch is a version of a t-test that handles unequal variances better
    ↪ the difference between welch test and normal t-test only matters when our group sizes differ from each other (not that important to know)
39
Q

How do we check for the normality assumption?

A
  1. We can use Shapiro-Wilk hypothesis test
    ~If p < α then the assumption is violated
    ~Similar shortcomings to the Levene’s test
    ~Caution as with any p-value → black-and-white decision making (little bit violated vs a lot violated)
  2. Assess using a plot (Q-Q plot)
    ~Points should be along the diagonal
    ~ Not exact - use eyeballing (subjective)

Q-Q plot not on the exam - hard to assess but for real world it’s useful

40
Q

So how do we handle assumption violations?

A

Assumption violations affect the shape of the sampling distribution and mess up the type 1/2 error rates

Unequal variances
- Welch t-test

Non-normality
- use nonparametric test (will come later)

41
Q

How ot report t-test results

This is an example, just know what you have to select if they ask

A

For the data based on independent samples we could report this:
On average, participants given a cloak of invisibility engaged in more acts of mischief (M = 5, SE = 0.48), than those not given a cloak (M = 3.75, SE = 0.55). This difference, -1.25, 95% CI [-2.77, 0.27,], was not significant, t(21.54) = −1.71, p = 0.101; however, it represented an effect of d = 0.70 [−1.52, 0.14]

For the data based on paired samples:
On average, participants engaged in more acts of mischief when having access to a cloak of invisibility (M = 5, SE = 0.48), than when lacking such access (M = 3.75, SE = 0.55). This difference, -1.25, 95% CI [−1.97, −0.527], was significant, t(11) = −3.80, p = 0.003, and represented an effect of d = 0.68 [−1.3, −0.04]