StatBCS 0 intro handout complete

Table of contents

  1. Welcome to Stats For Brain and Cognitive Sciences

  2. Class, slides, and material

  3. You might have guessed we will use R

  4. What about “AI”?

  5. Why do we need Statistics in Psychology?

  6. Simpson’s paradox

  7. Properties and models

  8. Take home message

1. Welcome to Stats For Brain and Cognitive Sciences

1.1 Introduction to the course and instructor

This section introduces the course "Statistics for Brain and Cognitive Sciences" and its instructor, Stefano Noventa. It provides context regarding the instructor's academic background, research interests, and contact information, as well as introducing the Teaching Assistant 5.

  • Instructor: Stefano Noventa, a researcher at the Department of General Psychology, University of Padova, specializing in Mathematical Psychology, Psychometrics, and Psychophysics.

  • Contact: Email: stefano.noventa@unipd.it. Office hours: Wednesdays 13:30-15:30 (room 22, 6th floor PSICO-1) or via ZOOM by appointment 5.

1.2 Teaching Assistant

The course will be supported by Daria Ardelean, a PhD student in Psychological Sciences. Her research interests include cognitive rehabilitation for neurodegenerative diseases and meta-research methodology 6.

2. Class, slides, and material

2.1 Course logistics and schedule

The course comprises theory and practice sessions, with a flexible schedule that may vary. All course materials, including slides and R scripts, will be made available on Moodle 7.

  • Theory sessions: Tuesdays, 14:30 to 16:30.

  • Practice sessions: Thursdays, 14:30 to 16:30.

  • Material: Self-sufficient slides and R scripts will be provided on Moodle.

  • Attendance: While not strictly mandatory, student presence is encouraged 7.

2.2 Suggested readings and exam preparation

Several texts are recommended for further study, though the exam will focus on the content covered in lectures and practice sessions 8.

  • Primary resource: Navarro, D. (v.06) Learning statistics with R. A tutorial for psychology students and other beginners. (available online).

  • Additional readings: Faraway, J.J. Linear models with R. and Baguley, T.S. Serious stats a guide to advanced statistics for the behavioral sciences. .

  • Exam basis: Content from slides and practice sessions 8.

📝 The exam will be based on content from slides and practice sessions, with recommended readings including Navarro's Learning statistics with R and Faraway's Linear models with R.

2.3 Core concepts to be revisited

The course will review fundamental statistical and mathematical concepts essential for advanced analysis, including R basics, linear algebra, measurement scales, descriptive and inferential statistics, probability distributions, sampling, and Null Hypothesis Significance Testing (NHST) 9.

  • R programming basics..

  • Linear algebra and systems of equations..

  • Measurement scales..

  • Descriptive and inferential statistics..

  • Fundamental probability distributions..

  • Sampling distributions..

  • Null Hypothesis Significance Testing (NHST)..

  • Correlation vs. causation. 9.

2.4 Course topics

The curriculum is structured around linear regression, its matrix formulation, interpretation of outputs, and extensions to categorical predictors. It also covers connections to ANOVA, ANCOVA, Generalized Linear Models (GLMs), Item Response Theory (IRT), Confirmatory Factor Analysis (CFA), Structural Equation Models (SEM), and Multilevel/Mixed-effects models 10.

  • Introduction to R and linear/matrix algebra..

  • Linear Regression:

    • Introduction and matrix notation.

    • Interpretation of regression outputs.

    • Regression with categorical predictors.

    • Contrasts and basic model selection.

    • Multiple and multivariate regression.

  • Connections and extensions:

    • ANOVA, ANCOVA (General Linear Models).

    • Generalized Linear Models (GLMs).

    • Item Response Theory (IRT) models.

    • Confirmatory Factor Analysis (CFA).

    • Structural Equation Models (SEM).

    • Multilevel/Mixed-effects models 10.

2.5 Tentative lecture plan

The course schedule outlines lectures and practice sessions from September to January, including buffer lectures, exam simulations, and exam sessions 11.

Date

Hours

Topic

29.09

2

Intro to R I

01.10

4

Lin. Algebra I

06.10

6

Intro to R II

08.10

8

Lin. Algebra II - Measurement

13.10

10

Distributions and Statistics

15.10

-

No lecture - Graduations

20.10

12

Intro to R III

22.10

14

Theory I

27.10

16

Practice R I

29.10

18

Theory II

03.11

20

Practice R II

05.11

22

Theory III

10.11

24

Practice R III

12.11

26

Theory IV

17.11

28

Practice R IV

19.11

30

Theory V

24.11

32

Practice R V

26.11

34

Buffer lecture - Exam Simulation?

02.12

-

No lecture - Graduations

03.12

36

Presentations I

08.12

-

No lecture - Holiday

10.12

-

No lecture - Graduations

15.12

38

Presentations II

17.12

40

Presentations III

22.12

42

Winter break

14.01

-

09:30 Exam session 4M

29.01

-

15:30 Exam session 4M

23.06

-

14:30 Exam session 4M

16.07

-

10:30 Exam session 4R

02.09

-

12:30 Exam session 4T

2.6 Exam format and procedures

The exam is approximately two hours long and requires writing an R script to address one theoretical question and three data analysis tasks. Students are permitted to consult R-help documentation during the exam 12.

  • Exam structure: One theoretical question and three data analysis tasks.

  • Duration: Approximately 2 hours.

  • Allowed resources: R-help documentation.

  • Provided scripts: Some scripts will be provided to facilitate analysis.

  • Absence policy: Failure to attend a registered exam session without prior notification may prevent registration for subsequent sessions.

  • Exam simulation: An exam simulation may be conducted if time permits 12.

📝 The exam lasts about 2 hours and consists of writing an R script to answer one theoretical question and three data analysis tasks, allowing consultation of R-help documentation.

2.7 Optional presentations

Students have the opportunity to deliver an optional oral presentation on a topic related to the course material, which can earn extra points towards the final exam grade 13.

  • Benefit: Potential for extra points (0-3) on the exam.

  • Format and topics: To be determined.

  • Point validity: Presentation points do not expire 13.

3. You might have guessed we will use R

3.1 R as the primary tool for statistical analysis

The practical components of this course will utilize the R programming environment, emphasizing its status as the preferred language for statistical analysis in psychology due to its open-source nature, extensive community support, and capacity for complex analyses 14.

  • R's role: The R programming language will be used for practical sessions.

  • Accessibility: R is free and open-source.

  • Support: It benefits from regular updates and a large community.

  • Prevalence: R is the standard language for psychological data analysis.

  • Capabilities: It enables analyses of increasing complexity and enhances statistical comprehension 14.

The R logo, a stylized blue R, is displayed prominently.

14.

4. What about “AI”?

4.1 Responsible use of AI in learning

The use of AI tools, such as Large Language Models (LLMs), is encouraged for learning and exercise completion between sessions but is strictly prohibited during exams 15.

  • Permitted use: Moderate and judicious use for learning and exercises.

  • Prohibited use: AI tools are not allowed during exams 15.

4.2 Critical engagement with AI tools

AI tools should augment, not replace, critical thinking. Students are cautioned against developing an "illusion of knowledge" and must avoid using AI during examinations 15.

  • AI as a tool: LLMs can be useful but require critical engagement.

  • Avoid:

    • Replacing critical thinking with AI.

    • Falling into the illusion of knowledge.

    • Using AI during exams 15.

5. Why do we need Statistics in Psychology?

5.1 Addressing math anxiety in psychology students

A common sentiment among psychology students is a dislike for mathematics and statistics. This section argues for the necessity of formal quantitative methods to overcome the inherent subjectivity and complexity of human behavior 21.

  • Prevalence of math/stats aversion: Many psychology students express a dislike for mathematics and statistics 21.

📝 Many psychology students express a dislike for mathematics and statistics 21.

5.2 The pitfalls of scientific naivety

Scientific naivety can lead to misconceptions, such as the belief that certain disciplines are inherently more "mathsy" or that intuitive understanding of human behavior (Folk Psychology) suffices for scientific inquiry. While soft sciences may use less math than hard sciences, advanced formalization is crucial across all disciplines 22.

  • Misconceptions arising from scientific naivety:

    • Some disciplines are inherently more mathematical than others.

    • Psychology or biology can be chosen to avoid math.

    • Scientific approaches in psychology are unnecessary due to intuitive understanding of behavior.

  • Role of formalization: Advanced disciplines, including psychology, require a high degree of formalization (mathematics, logic, statistics, methodology).

  • Rationale for statistics: The need for math and statistics in psychology is rooted in the nature of psychological phenomena 22.

5.3 Overcoming subjectivity in psychological research

The inherent subjectivity and richness of human behavior can impede understanding. Statistics provides essential tools to mitigate biases, manage uncertainty, and move beyond common sense or gut feelings towards rigorous scientific inquiry 23.

  • Challenges in understanding human behavior:

    • Subjectivity and complexity can undermine comprehension.

    • Human thinking is prone to logical fallacies and influenced by non-rational factors.

    • Humans exhibit low tolerance for uncertainty, often viewing ideas as strictly true or false.

    • "Common sense" and "gut feelings" are insufficient for complex scientific problems.

  • Beliefs hindering understanding:

    • Forming accurate beliefs requires observation, memory, and analysis.

    • Confirmation bias: People seek evidence that confirms their existing beliefs.

    • Expert influence: Individuals tend to accept beliefs from perceived experts, especially if widely shared and intuitive 23.

6. Simpson’s paradox

6.1 Introduction to Simpson's Paradox

Simpson's Paradox, first described by E. H.

Simpson in 1951, is a statistical phenomenon where a trend appears in different groups of data but disappears or reverses when these groups are combined. The classic example involves UC Berkeley's 1973 admission data, which initially suggested bias against female applicants 24.

  • Definition: A trend observed in multiple groups disappears or reverses when the groups are aggregated.

  • Origin: Described by E. H. Simpson.

  • Classic Example: UC Berkeley admission data 24 .

6.2 Aggregated data: Apparent bias against females

When examining the overall admission rates for male and female applicants at UC Berkeley in 1973, females appeared to have a lower admission percentage than males 25.

—

Number of applicants

Percent admitted

Males

8442

44%

Females

4321

35%

📝 When examining the overall admission rates for male and female applicants at UC Berkeley in 1973, females appeared to have a lower admission percentage (35%) than males (44%) 25.

6.3 Disaggregated data by department

A closer examination of the data, broken down by the specific departments to which applicants applied, reveals a different picture. This disaggregation is crucial for understanding the paradox 26.

This table displays applicant and admission percentages for males and females across different departments (A-F).

26.

6.4 Analysis of departmental admission rates

When admission rates are analyzed per department, it becomes evident that some departments are more accessible than others, and both male and female applicants were admitted at higher rates in easier-to-access departments 27.

Dept

Applicants (Males)

Percent admitted (Males)

Applicants (Females)

Percent admitted (Females)

A

825

62%

108

82 %

B

560

63%

25

68%

C

325

37%

593

34%

D

417

33%

375

35%

E

191

28%

393

24%

F

272

6%

341

7%

📝 In Department A, 825 male applicants had a 62% admission rate, while 108 female applicants had an 82% admission rate 27.

6.5 Differential application patterns by gender

A key factor contributing to Simpson's Paradox is that male and female applicants tended to apply to different departments. Females were disproportionately represented in departments with lower admission rates, while males were more concentrated in departments with higher admission rates 28.

See the table in section 6.4.

6.6 Resolution of the paradox

The paradox arises because the aggregation of data across departments obscures the fact that females were more likely to apply to departments with lower overall admission rates. When the data is properly disaggregated by department, the apparent bias against females disappears, and in some departments, they were actually admitted at higher rates 29.

This scatter plot visualizes the relationship between IQ and alcohol intake, with different colored lines representing different individuals.

29.

7. Properties and models

7.1 Linear relations and regression

A linear relation is modeled by an equation where a dependent variable (YY) is related to an independent variable (XX) through a slope (aa) and an intercept (bb), plus an error term (ϵ\epsilon). This error term is typically assumed to be normally distributed with a mean of 0 and a variance of σ2\sigma^2.

The expected value of YY conditional on XX, denoted E(Y∣X)E(Y|X), is given by aX+baX + b. This implies that for any specific value of XX, there is a distribution of possible YY values 32 33.

The equation for a simple linear regression is Y=aX+b+ϵY = aX + b + \epsilon, where:

  • YY is the dependent variable.

  • XX is the independent variable.

  • ϵ\epsilon is the normally distributed error term, ϵ∼N(0,σ2)\epsilon \sim N(0, \sigma^2).

  • E(Y∣X)=aX+bE(Y|X) = aX + b represents the expected value of YY given XX.

  • Y∣X∼N(aX+b,σ2)Y|X \sim N(aX + b, \sigma^2) indicates that YY conditional on XX follows a normal distribution with mean aX+baX + b and variance σ2\sigma^2 33.

This diagram illustrates the basic equation for a simple linear regression model.

Linear regression models capture correlation, not necessarily causality. To establish causality, experimental manipulation and control are required 34.

7.2 Categorical versus continuous variables

Variables can be treated as either continuous or categorical. For instance, while AI and IQ might be considered continuous, the individuals themselves can be modeled as a categorical variable.

If a model includes a dichotomous variable D∈{0,1}D \in \{0, 1\} to represent two individuals (e.g., Mary and John) with parallel regression lines differing only in their intercepts, the equation can be written as AI=aIQ+cD+b+ϵAI = a IQ + c D + b + \epsilon. In this setup, cc represents the difference in intercepts between John (b+cb+c) and Mary (bb).

The distinction between regression, ANOVA, and ANCOVA arises from the use of continuous and/or categorical variables 35.

📝 If D=0D=0 represents Mary and D=1D=1 represents John, and their AI scores are modeled as AI=aIQ+cD+b+ϵAI = a IQ + c D + b + \epsilon, then cc represents the difference in intercepts between John (b+cb+c) and Mary (bb) 35.

7.3 Fixed versus random effects

In statistical modeling, effects can be classified as fixed or random. A fixed effect is specific to a particular entity, such as the coefficient cc representing the intercept difference for a specific individual.

In contrast, random effects are considered when dealing with a potentially infinite number of entities, where the interest lies not in estimating specific coefficients for each entity but in estimating the parameters of their distributions, such as their variances and means. Multilevel models, or more generally mixed-effect models, adopt this approach by treating coefficients like aa and bb as random effects, allowing each person to have their own coefficients (aAnne,bAnnea_{Anne}, b_{Anne}, etc.) 36.

7.4 Model extensions

Simple regression models can be expanded in several ways:

  • Multiple regression: Incorporating more independent variables (X1,X2,X3,…X_1, X_2, X_3, \dots) into the model: Y=a1X1+a2X2+a3X3+⋯+b+ϵY = a_1 X_1 + a_2 X_2 + a_3 X_3 + \dots + b + \epsilon.

  • Multivariate regression: Extending the model to include multiple dependent variables (Y1,Y2,Y3,…Y_1, Y_2, Y_3, \dots).

  • Generalized linear models (GLMs): Used when the dependent variable is categorical (e.g., dichotomous). These models generalize the linear equation by using a link function g(μ)=aX+bg(\mu) = aX + b, where μ=E(Y∣X)\mu = E(Y|X) is the expected value of YY conditional on XX 37.

7.5 Observed versus latent variables

Variables can be either observed directly or considered latent constructs. For example, IQ scores are observed measures that serve as proxies for the latent construct of intelligence (ξ\xi).

In continuous factor analysis, the relationship can be modeled as IQ=λξ+ν+ϵIQ = \lambda \xi + \nu + \epsilon, where λ\lambda is the loading and ν\nu is the intercept. This linear relationship is explored in factor analysis 38.

This equation represents IQ as a linear measure of latent intelligence (ξ), with λ as the loading and ν as the intercept.

When dependent variables are categorical, the framework shifts to categorical factor analysis and Item Response Theory, which are applications of latent variable models similar to GLMs. Structural equation models serve as a generalization of all these approaches 38.

8. Take home message

8.1 Core principles of statistical modeling

A fundamental takeaway is that many statistical models are built upon a linear equation structure, typically represented as Y=aX+b+ϵY = aX + b + \epsilon 39.

The primary distinctions between these models arise from:

  1. The nature of variables and effects:
  • Categorical versus continuous variables.

  • Latent versus observed variables.

  • Fixed versus random effects.

  • Single versus multiple dependent variables.

  1. Generalizations of the linear equation: Adaptations made to the linear equation to accommodate the specific nature of the variables involved 39.

Therefore, a thorough understanding of one's variables is crucial for selecting and correctly applying appropriate statistical models 39.

A pie chart illustrates the perceived distribution of knowledge gained during a psychology degree.

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also