Statistics and Methodology
1 - RECAP
Null hypothesis testing
Two-sided hypothesis
o H0: no effect/no difference
o Ha: an effect/ a difference
One-sided hypothesis: when one direction is biologically/physically impossible, or we want to test
specific threshold
o H0: smaller than (or larger than)
o Ha: larger than or equal to (or smaller than or equal to)
We can only reject/retain the H0
Statistics tell you whether an observed relationship between X and Y in your sample is likely to reflect a
TRUE relationship in the (unobserved) population
Research question
P population: humans, animals
I intervention: treatment, experimental condition
C comparison: to what you want to compare this?
O outcome: what are you measuring?
S study design (determines causality: not the statistics)
o Experimental
Allows causal inference and manipulation
When I change X, how does Y change?
o Observational
No causal inference
How do different levels of X correspond to different levels of Y?
Levels of measurements
Categorical
o Nominal: category without logical order
Dichotomous if limited to two categories e.g. sex m/f, color blue vs. red
Non-dichotomous when e.g. favorite color in general
o Ordinal: category with a specific order or rank
Race position, height rank, lung function (bad, good, excellent)
Best represented via boxplot
Quantitative (units)
o Discrete: counts, finite values
Countable e.g. number of coughs
5, 4, 3, 99
o Continuous: scale variable with infinite values
Measurable e.g. lung volume in liters, weight of the package
3.2, 5.667, 12.347
P-value
Probability of the data given that the null hypothesis is true
Very unlikely (p less than α 0.05) reject the H0, non-significant result
1
,Errors
Probability implies uncertainty errors possible!
Type I error: if the H0 is rejected while in reality the H0 is true
Type II error: if the H0 is retained while in reality the H0 is false
If type I error is increasing type II error will decrease and vice versa
Confidence intervals (CI)
95% CI
o If we sample a large number of times, and compute the CI for each sample, 95% of CIs would
contain the true population parameter
o We are 95% confident that the population parameter lies within the CI
The CI conclusion doesnt change no matter whether we reject or retain the H0
Narrower CI estimate is more precise
One sample t-test
o 𝜇 = value
o If H0 is rejected we conclude:
The mean under the H0 (𝜇) does not lie within the CI around the sample mean
And we are 95% confident that the population mean 𝜇 lies within the CI around the
sample mean
Two samples t-test
o 𝜇𝑋 = 𝜇𝑌 i.e. 𝜇𝑋 – 𝜇𝑌 = 0
o If H0 is rejected we conclude:
2
, The difference in means under the H0 (𝜇𝑋 – 𝜇𝑌) does not lie within the CI around the
mean difference in the sample
And we are 95% confident that the difference in population means (𝜇𝑋 – 𝜇 𝑌) lies within
the CI around the mean difference in the sample
Correlation
To which extent do two variables tend to change together or ‘co-vary’
o Shows only degree of association but no direction of effect
Pearson's correlation: the correspondence between the actual data
Spearman's rho: the correspondence between the ranks
Graph: scatter plot, sensitive to outliers
Quantification (measurement of the quantity of something): correlation coefficient (r or ρ)
o -1 to 1 (negative to positive relationship)
o Measure of linear association
Hypothesis
o H0: 𝜌 = 0, X and Y are not correlated
o H1: 𝜌 ≠ 0, X and Y are correlated
Conclusion: X and Y are strongly correlated (covariation is not causal)
Regression
Regression shows direction of effect (does not imply causality)
o For each value of X (IV) prediction of Y (DV)
Y = a + b*X +
o b regression coefficient which predicts change in Y if X increases one scale unit
WORKGROUP 1
Data view presents actual data as can be presented in excel
Variable view variables are further defined and specified
Descriptive statistics
SPSS: Analyze descriptive statistic descriptives
In the options you can adjust what descriptives do you want (mean, range, min, max etc.)
SPSS: Analyze descriptive statistic frequencies
Can give insight into proportions
3
, Example on hypothesis testing: one sample t-test
According to the central bureau of statistics, the mean BMI of people in the Netherlands, in 2011 was 25.3.
Investigate whether the mean BMI in this sample is representative for people in the Netherlands in 2011.
H0: Mean BMI in the Netherlands in 2011 is 25.3 μ = 25.3
H1: Mean BMI in the Netherlands in 2011 is not 25.3 μ ≠ 25.3
Q1. Which probability distribution and statistical test is necessary to evaluate the evidence?
A one-sample t-test is appropriate because we have one sample in the data, for which we want to test whether
the mean (in the population from which the sample was taken) is equal to a given (or known) population mean.
Given the continuous nature of the outcome variable (BMI), and the unknown mean and variance in the
population, a t-distribution with 512-1 = 511 degrees of freedom is appropriate.
SPSS: Analyze compare means and proportions one sample t-test
The “test value” must be set to the given population mean i.e. in this case 25.3
Q2. You find the CI to be [26.59, 27.22] (calculated by hand). What is the interpretation of this CI?
If we were to repeat this experiment a large number of times, and compute the CI for each experiment, 95% of
them would contain the true mean of the population. For this reason we are 95% confident that interval [26.59,
27.22] may contain the true mean of the population.
Q3. The CI calculated by hand and the CI in the SPSS output do not match. Why is that?
This is because SPSS first computed the difference between the sample mean and the population mean. Around
the mean of this difference, a CI was computed.
Q4. Make a conclusion on whether to retain or reject the H0.
The t = 9.995 with p-value of <0.01 (df = 511) indicates that the result is non-significant meaning we will reject
our H0. The same can be concluded by looking at the CI [26.59, 27.22]. Under the H0 the difference between the
sample mean and the population mean is 0, so the expected value under the H0 (0) is not part of the CI, leading
thus to the same conclusion to reject the H0.
Q5. What assumptions come with this test?
Most important assumtions are „simple random sample“ and „normality“ assumption. „Simple random sample“
refers to the assumtion that all observations are independent. „Normality“ refers to the assumtion that the
outcome variable is a sample drawn from the population which follows a normal distirbution.
4