Probability Statistics

Cover

stat 1-5.pdf

Table of contents

  1. Statistics defined as data (Plural sense)
  2. Chapter Two: Data Collection and Presentation
  3. Presentation of Data
  4. Chapter Three: Measures of Central Tendency and Dispersion
  5. Chapter Four: Probability Theory
  6. Chapter Five: Probability Distribution

1. Statistics defined as data (Plural sense)

1.1 Statistics defined as data (Plural sense)

Statistics, when understood as data, refers to aggregates of facts that are influenced by multiple causes. These facts must be expressed numerically, either through enumeration or estimation with reasonable accuracy.

They need to be collected systematically for a predetermined purpose and must be relatable to each other 1 2.

Characteristics of Statistics as data:

  • Aggregates of facts: Individual figures are not statistics; they must be in a mass or group where individual elements relate to a common phenomenon for comparison.
  • Affected by multiplicity of causes: Statistics are typically outcomes of numerous interacting factors, especially in social sciences, rather than a single cause.
  • Numerically expressed: Statistics must be quantifiable. However, not all numerical statements are statistics if they don't meet other criteria.
  • Enumerated or estimated with reasonable accuracy: Numerical data can be precisely counted or estimated, but estimations must adhere to acceptable accuracy standards.
  • Collected in a systematic manner: Haphazard data collection can lead to incorrect conclusions; systematic collection ensures reasonable accuracy.
  • Collected for a predetermined purpose: Data collected without a clear objective are not useful. The purpose must be defined before collection 2.
  • Placed in relation to each other: Numerical facts must be comparable, either over time (period-wise) or by location (region-wise), or through other comparative means 3.

📝 A supermarket marketing head collects expenditure data from 1000 households to revise a marketing strategy. This data is considered statistics because it's an aggregate from multiple households, influenced by factors like income and taste, expressed numerically, collected systematically using stratified sampling and interviews, has a clear purpose, and can be compared region-wise or period-wise 3.

1.2 Statistics defined as a method (Singular sense)

Statistics, in its singular sense, refers to the science or methods used in statistical analysis. It encompasses the principles and techniques for collecting, classifying, presenting, analyzing, and interpreting numerical data to shed light on any area of inquiry 3 4.

Key definitions of Statistics as a method:

  • "Statistics is the science which deal with the methods of collecting, classifying, presenting, comparing (analyzing) and interpreting numerical data collected to throw some light on any sphere of enquiry." - Seligman 3.
  • "Statistics is the method of judging collective, natural or social phenomenon from the results obtained from the analysis or enumeration or collection of estimates." - King.
  • "Statistics is the application of the scientific method in the analysis of numerical data for the purpose of making rational decisions." - Berenson and Levin.
  • "Statistics is the collection, presentation, analysis and interpretation of numerical data." - Croxton and Cowden 4.

A preferred definition combines these aspects: Statistics is the study of the principles and methods used in the collection, presentation, analysis, and interpretation of numerical data in any sphere of enquiry 4.

1.3 Basic terminologies in statistics

Understanding statistical terms is crucial for grasping statistical methods and concepts 4.

Key statistical terms:

  • Variable: A characteristic or factor that can take on different values. Unlike a constant, its values can change. Examples include income, height, and age. Variables can be qualitative or quantitative.
  • Elementary Unit: A specific individual, business, or item that has a characteristic being measured or categorized.
  • Population: The complete set of all items or causes under consideration in an investigation. It can be finite (countable) or infinite (unrestricted and uncountable) 4.
  • Sample: Any non-empty subset taken from a population. The goal is to select a sample that best represents the population's behavior.
  • Parameter: A measurable characteristic of a population or a numerical result derived from measuring the population.
  • Statistic: A measurable characteristic of a sample; essentially, a sample result.
  • Survey: A method used to obtain desired data, which can be an experiment or a systematic collection of information.
  • Statistical Design: A process involving a decision problem and selecting an approach to solve it, guiding how an investigation will be conduc
Cover

Stat200.PracticeExam2 - No Normal.pdf

📚 Stat200.PracticeExam2 - No Normal.pdf

Brief overview

This document summarizes key concepts in statistical inference, focusing on hypothesis testing and confidence intervals for population means and proportions. Mastery of these topics is essential for analyzing data and drawing reliable conclusions in various scientific and research contexts.

Key points

  • Overview of normal distribution and sample means with IQ score examples.
  • Constructing and interpreting confidence intervals for population means.
  • Determining required sample sizes for a specified margin of error.
  • Hypothesis testing procedures for population means, including p-value interpretation.
  • Hypothesis testing for population proportions, including rejection region determination.

1. Normal distribution and sample means

1.1 The normal distribution

  • Population characteristics:
    • Mean: μ=100\mu = 100 dollars
    • Standard deviation: σ=16\sigma = 16 dollars
  • IQ scores follow a normal distribution.

1.1.1 Probability for an individual score

  • Find the probability of a randomly selected person's IQ being over 105.
  • This uses the Z-score formula for a single observation: Z=x−μσZ = \frac{x - \mu}{\sigma}.
  • Calculate the Z-score: Z=105−10016=516=0.3125Z = \frac{105 - 100}{16} = \frac{5}{16} = 0.3125.
  • The probability P(X>105)P(X > 105) is found using the Z-score. Looking up Z=0.3125Z=0.3125 in a standard normal table or calculator gives a cumulative probability of approximately 0.6217.
  • Therefore, P(X>105)=1−P(Z≤0.3125)=1−0.6217=0.3783P(X > 105) = 1 - P(Z \le 0.3125) = 1 - 0.6217 = 0.3783.

📝 Example: The probability that a randomly selected person's IQ is more than 105 is 0.3783.

1.2 Sample means

  • When we take a sample of nn individuals, the average of that sample (Xˉ\bar{X}) also has a distribution.
  • This distribution of sample means is called the sampling distribution of the mean.

1.2.1 Mean and standard deviation of sample means

  • Consider a sample of n=100n = 100 persons.
  • Let Xˉ\bar{X} be the average IQ of these 100 persons.

🎯 Core Concept: The sampling distribution of the mean is centered around the population mean and its spread depends on the population standard deviation and the sample size.

  • Mean of sample means: μXˉ=μ\mu_{\bar{X}} = \mu
  • Standard deviation of sample means (standard error\text{standard error}): σXˉ=σn\sigma_{\bar{X}} = \frac{\sigma}{\sqrt{n}}

📝 Example: For a sample of 100 persons, the mean IQ of the sample (Xˉ\bar{X}) has a mean of μXˉ=100\mu_{\bar{X}} = 100 and a standard deviation of σXˉ=16100=1610=1.60\sigma_{\bar{X}} = \frac{16}{\sqrt{100}} = \frac{16}{10} = 1.60 dollars.

1.3 Confidence intervals for the population mean

  • A confidence interval (CI) provides a range of plausible values for the population mean (μ\mu).
  • It is constructed from sample data.

1.3.1 Constructing a confidence interval

  • Sample data:

    • Sample size: n=15n = 15 members
    • Sample mean: xˉ=6.5\bar{x} = 6.5 dollars
    • Sample standard deviation: s=0.90s = 0.90 dollars
  • Confidence level: 95%

  • When the population standard deviation (σ\sigma) is unknown and the population is normally distributed (or the sample size is large), we use the t-distribution.

  • The formula for a CI for μ\mu is: xˉ±tα/2,n−1(sn)\bar{x} \pm t_{\alpha/2, n-1} \left(\frac{s}{\sqrt{n}}\right).

    • tα/2,n−1t_{\alpha/2, n-1} is the critical t-value for the desired confidence level and degrees of freedom (n−1n-1).
  • For a 95% CI, α=0.05\alpha = 0.05, so α/2=0.025\alpha/2 = 0.025.

  • Degrees of freedom: df=n−1=15−1=14df = n - 1 = 15 - 1 = 14.

  • The critical t-value t0.025,14t_{0.025, 14} is approximately 2.145.

  • The standard error of the mean is sn=0.9015≈0.903.873≈0.232\frac{s}{\sqrt{n}} = \frac{0.90}{\sqrt{15}} \approx \frac{0.90}{3.873} \approx 0.232.

  • The margin of error is tα/2,n−1(sn)≈2.145×0.232≈0.498t_{\alpha/2, n-1} \left(\frac{s}{\sqrt{n}}\right) \approx 2.145 \times 0.232 \approx 0.498.

  • The 95% confidence interval is 6.5±0.4986.5 \pm 0.498 dollars.

📝 Example: A 95% confidence interval for the mean hourly wage is approximately (5.99, 7.00) dollars.

1.3.2 Assumptions for confidence intervals

  • The following assumptions are needed for valid CI results when using the t-distribution:
    • A: The random sample is selected from a normal population.
    • B: The sample standard deviation (ss) is used because the population standard deviation (σ\sigma) is unknown.

🔑 Important: Independence of observations is also crucial.

1.3.3 Interpretation of confidence intervals

  • A 95% confidence interval (5.5,6.5)(5.5, 6.5) dollars means we are 95% confident that the true population mean hourly wage (μ\mu) falls within this range.
  • It does not mean there is a 95% probability that μ\mu is in the interval; the population mean is a fixed value.
  • It also does not mean that 95% of the data falls in this range; that refers to the sample data (xx).
Cover

StatBCS_0_intro_handout_complete.pdf

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

Cover

StatBCS_3stats_recap_handout.pdf

Table of contents

  1. Recap on Variables, Distributions, and Statistics
  2. Univariate Distributions
  3. Probability density function (PDF)
  4. Sampling distributions
  5. Student’s t

1. Recap on Variables, Distributions, and Statistics

1.1 Population, constants, and variables

A population is defined as the entire collection of units that share one or more properties of interest for a specific study or experiment. These shared properties are considered constant within that population, while properties that vary across individual units are referred to as random variables 4.

  • Population characteristics: Populations are delineated by their constant properties, which are fixed attributes shared by all members.
  • Random variables: These are properties that exhibit variability among the units within a population.
  • Conceptual analogy: The distinction between constants and variables is analogous to playing the "Guess Who?" game, where specific features are used to identify or differentiate characters 4.

📝 In a study focusing on "autistic left-handed Italian children," the characteristics "autistic," "left-handed," and "Italian" are constants defining the population. Any other property, such as height or IQ, that varies among these children would be a random variable 4. A game of Guess Who? is shown, illustrating the concept of variables.

1.2 Random variables

Random variables are typically denoted by uppercase letters (e.g., X,Y,ZX, Y, Z), while their specific observed values or realizations are represented by lowercase letters (e.g., x,y,zx, y, z). This notation allows for expressions that denote probabilities associated with these variables 5.

  • Probability notation:
  • P(X=x)P(X = x): Denotes the probability that a random variable XX takes on a specific value xx.
  • P(X≥x)P(X \ge x): Denotes the probability that a random variable XX takes on a value greater than or equal to xx.
  • Functions of random variables: Any mathematical function or operation applied to random variables (e.g., Z=Y+XZ = Y+X, Z=X2Z = X^2, Y=aX+b+ϵY = aX+b+\epsilon) also results in a random variable. Determining the distribution of these new variables can be complex 5.

1.3 What are random variables?

A random variable serves as a function that maps outcomes from a sample space to numerical values, enabling the quantification of events. This process is fundamental for applying mathematical and statistical methods to probabilistic outcomes 6.

  • Sample space (Ω\Omega): This is the set of all possible outcomes of a random experiment.
  • Events (2Ω2^\Omega): This represents the collection of all possible subsets of the sample space, each subset being an event.
  • Probability measure (PP): This assigns a probability to each event in the collection of events.
  • Numerical coding: To analyze qualitative outcomes numerically, a function is needed to assign real numbers to events (e.g., assigning 0 to "Head" and 1 to "Tail" in a coin toss) 6.
Event in 2Ω2\OmegaFormula for the probability PPProbability PP
∅\emptysetP(∅)P(\emptyset)0
{H}P(H)P(H)1/2
{T}P(T)P(T)1/2
{H, T}P(H,T)=P(H)+P(T)P(H, T) = P(H) + P(T)1

📝 For a fair coin toss, the sample space Ω={H,T}\Omega = \{H, T\}. A random variable XX could be defined such that X(H)=0X(H) = 0 and X(T)=1X(T) = 1. This maps the qualitative outcomes to numerical values, allowing for probabilistic calculations 6. This table shows the probability of different events when tossing a fair coin.

1.4 Simplified definition of random variable

A random variable is formally defined as a function X:Ω→RX: \Omega \to \mathbb{R} that maps outcomes ω\omega from a sample space Ω\Omega to real numbers x∈Rx \in \mathbb{R}. This function essentially quantifies qualitative outcomes, making them amenable to statistical analysis 7.

  • Mapping outcomes: The primary role of a random variable is to assign a numerical value to each possible outcome of an experiment.
  • Probability of values: The probability of a specific numerical value being realized by the random variable is equivalent to the probability of the underlying outcome that maps to that value 7.
Cover

StatBCS_6Regression_3_handout_without_solutions.pdf

Table of contents

  1. Statistics for Brain and Cognitive Sciences
  2. Polynomial terms
  3. Partial correlation
  4. SLR plus one dichotomous IV

1. Statistics for Brain and Cognitive Sciences

1.1 Extending the SLR

This section outlines the extension of the Simple Linear Regression (SLR) model, providing a foundational understanding for advanced statistical analyses in brain and cognitive sciences. The subsequent discussion delves into various curve-fitting methods and their implications for data interpretation 2.

1.2 Curve-fitting methods and their messages

Different curve-fitting methods convey distinct messages about the underlying data relationships and the researcher's analytical approach. The choice of method reflects assumptions about the data's structure and the intended interpretation of the model 3.

MethodImplied Message
LinearBasic regression performed
QuadraticCurved relationship intentionally modeled
LogarithmicTapering-off effect observed
ExponentialUncontrolled growth indicated
LOESSSophisticated, non-foundational approach
LogisticConnecting two lines with mathematical rigor
Confidence intervalAcknowledging scientific difficulty and effort
PiecewiseTheory-driven data selection
Connecting linesExcel's smooth lines feature used
Ad-hoc filterData cleanup based on an idea
House of cardsModel fits smoothly but is unstable upon extension

This chart displays various curve-fitting methods with corresponding scatter plots and fitted lines, illustrating different approaches to data analysis.

📝 When a researcher uses a linear regression model, the implied message is that a basic regression has been performed, suggesting a straightforward, direct relationship between variables. Conversely, selecting an exponential fit communicates that the data exhibits an accelerating growth pattern, potentially indicating an uncontrolled increase in the measured phenomenon 3.

2. Polynomial terms

Polynomial terms extend the capabilities of linear regression models, such as Simple Linear Regression (SLR) and Multiple Linear Regression (MLR), to capture non-linear relationships between variables. While SLR and ANOVA typically follow the form Y=α+βX+ϵY = \alpha + \beta X + \epsilon, and MLR uses Y=β0+β1X1+β2X2+⋯+βpXp+ϵY = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \dots + \beta_p X_p + \epsilon, polynomial regression specifically incorporates continuous variables with degrees greater than one 5.

Variable NatureRegression Type
Continuous, degree oneMultiple Linear Regression (MLR)
Continuous, degree greater than onePolynomial Regression
Categorical and continuousANCOVA
Representing interactionsModeration
All categoricalMulti-way ANOVA

2.1 Polynomial terms - quadratic

Quadratic polynomial terms are used to model relationships that exhibit a curvilinear, often U-shaped or inverted U-shaped, pattern. This approach is particularly useful when the effect of an independent variable on a dependent variable is not monotonic 6.

  • Biological applications: Certain brain regions, such as the ventral temporal cortex (VTC), show a quadratic relationship in the mean square successive difference (MSSD) of the BOLD signal across the lifespan, with high MSSD in middle age and lower MSSD in younger and older age 6.
  • Cognitive function: Prefrontal dopamine and D1DR signaling are proposed to have an 'inverted U-shaped' dynamic, where optimal levels are associated with peak cognitive function 7.

This scatter plot visualizes the relationship between prefrontal dopamine/D1DR levels and working memory performance, showing an inverted U-shaped curve for dopamine and a downward trend for D1DR.

Cover

StatBCS_7Regression_4_handout_without_solutions.pdf

Table of contents

  1. Statistics for Brain and Cognitive Sciences
  2. Multiple linear regression (MLR)
  3. Test of the regression coefficients
  4. Multicollinearity and Singularity
  5. ANOVA Table for MLR
  6. General Linear F-Test
  7. Advanced: alternative approaches to OLS
  8. Multivariate regression
  9. So, why Multivariate regression is less common?
  10. Path Analysis
  11. Confounder, mediator, moderator, and collider
  12. Fixed versus random effects
  13. Generalized Linear Model
  14. Hat Matrix formulation

1. Statistics for Brain and Cognitive Sciences

1.1 From simple linear regression to multiple linear regression and beyond

The field of statistics for brain and cognitive sciences progresses from foundational models like Simple Linear Regression (SLR) to more complex methodologies such as Multiple Linear Regression (MLR) and various advanced statistical models. This progression allows for increasingly nuanced analyses of complex data structures inherent in cognitive and brain research 1.

1.2 Further extending the SLR

Simple Linear Regression (SLR) serves as a fundamental building block for a wide array of advanced statistical models used in brain and cognitive sciences. These extensions allow researchers to address more intricate hypotheses and account for multiple variables and their interactions 3.

  • Hierarchical model structure: Many complex statistical models can be conceptualized as extensions of SLR, building upon its core principles to incorporate additional factors or relationships.
  • Advanced model types: Models such as ANOVA, ANCOVA, Multiple Regression, Multivariate Regression, MANOVA, MANCOVA, Mixed-effect models, Generalized Linear Models (GLM), Path Analysis, Factor Analysis, and Structural Equation Modeling (SEM) all represent further developments from the basic SLR framework 3.

This diagram illustrates how various statistical models, such as ANOVA, ANCOVA, and SEM, can be seen as extensions of simple linear regression.

📝 Models like ANOVA, ANCOVA, Multiple Regression, Multivariate Regression, MANOVA, MANCOVA, Mixed-effect models, Generalized Linear Models (GLM), Path Analysis, Factor Analysis, and Structural Equation Modeling (SEM) are all extensions of the basic SLR framework 3.

1.3 Multiple linear regression

Multiple Linear Regression (MLR) extends SLR by incorporating multiple independent variables to predict a single dependent variable. This allows for a more comprehensive understanding of the factors influencing an outcome in cognitive and brain science research 2 4.

1.4 Beyond MLR

Beyond MLR, statistical methodologies continue to expand to address even more complex research questions. These advanced techniques are crucial for modeling intricate relationships and structures often encountered in brain and cognitive data 3 4.

  • Advanced topics: The curriculum includes discussions on topics beyond MLR, such as the Hat Matrix formulation, which provides deeper insights into regression diagnostics and influence 3 4.

2. Multiple linear regression (MLR)

2.1 Introduction to MLR in cognitive neuroscience

Multiple Linear Regression (MLR) is a statistical method used to model the linear relationship between a dependent variable and two or more independent variables. In cognitive neuroscience, MLR is applied in contexts such as Statistical Parameter Mapping (SPM) for analyzing functional magnetic resonance imaging (fMRI) data 5.

The General Linear Model (GLM) framework, which encompasses MLR, is fundamental to fMRI analysis. This diagram illustrates the General Linear Model (GLM) used in fMRI analysis, showing the relationship between a response model, single voxel time series, and the resulting Statistical Parametric Maps (SPMs).

  • Design matrix: This matrix contains all experimental predictors and nuisance variables.
  • Experimental paradigm: Includes task/stimulus time courses and their temporal derivatives.
  • Nuisance regressors: Such as head motion parameters and physiological signals.
  • Session constants and drifts: Intercepts for baseline and polynomial drifts 5.
  • Temporal derivatives: Often introduced to account for temporal jitter in the hemodynamic response 6.

2.2 Mathematical formulation of MLR

The MLR model describes the dependent variable YY as a linear combination of pp predictor v

Cover

StatBCS_7Regression_4_handout_without_solutions.pdf

Multiple linear regression (MLR)

Multiple Linear Regression (MLR) is a statistical method that extends simple linear regression by allowing for multiple independent variables to predict a single dependent variable. This technique is widely applicable, including in cognitive neuroscience, for instance, in Statistical Parameter Mapping (SPM) which is used to analyze neuroimaging data like fMRI 5.

The core concept of MLR can be represented by the following model: Y=α+β1X1+β2X2+⋯+βpXp+ϵY = \alpha + \beta_1X_1 + \beta_2X_2 + \dots + \beta_pX_p + \epsilon where:

  • YY is the dependent variable.
  • X1,X2,…,XpX_1, X_2, \dots, X_p are the pp independent variables (predictors).
  • α\alpha is the intercept, representing the expected value of YY when all independent variables are zero.
  • β1,β2,…,βp\beta_1, \beta_2, \dots, \beta_p are the regression coefficients, each indicating the change in YY for a one-unit increase in the corresponding XjX_j, holding all other predictors constant.
  • ϵ\epsilon is the error term, representing the unexplained variance.

In matrix notation, this model is expressed as: y=Xβ+ey = X\beta + e where yy is a vector of observed dependent variable values, XX is the design matrix containing the independent variables (including a column of ones for the intercept), β\beta is a vector of coefficients, and ee is a vector of residuals 7 8.

Design matrix in fMRI

In the context of fMRI analysis, the design matrix is crucial. It typically includes regressors representing the experimental paradigm (e.g., task timing, stimulus presentation), nuisance regressors to account for confounding factors (e.g., head motion parameters, physiological noise), and terms for session constants and drifts (e.g., intercept, polynomial drifts). Temporal derivatives of predictors are often included to account for temporal jitter in the experimental design 5 6.

Example: A design matrix might include columns for a main task, a constant (intercept), and the temporal derivative of the main task to capture potential timing variations 6.

Geometric interpretation

Similar to how simple linear regression represents a line in a 2-dimensional space (R2R^2), MLR with two independent variables can be visualized as a plane in a 3-dimensional space (R3R^3). For a model with pp predictors, the relationship can be envisioned in p+1p+1 dimensions 7.

Interpretation of coefficients

  • Intercept (α\alpha): This is the conditional expected value of the dependent variable (YY) when all independent variables (XjX_j) are zero. α=E(Y∣X=0)\alpha = E(Y|X = 0).
  • Partial Regression Coefficients (βj\beta_j): Each βj\beta_j represents the change in the expected value of YY when XjX_j increases by one unit, while all other independent variables (Xj′≠jX_{j'\neq j}) are held constant. This is also known as the partial effect 9.

Example: If β1=−0.05\beta_1 = -0.05 for the Prefrontal Cortex Volume (X1X_1) predicting Stroop Interference Score (YY), it means that for every 1 cubic millimeter increase in Prefrontal Cortex Volume, the Stroop Interference Score is expected to decrease by 0.05 milliseconds, assuming all other predictors remain unchanged 9.

Ordinary Least Squares (OLS) solution

The goal of OLS is to find the coefficients (β^\hat{\beta}) that minimize the sum of squared residuals (SSResSS_{Res}). This is achieved by satisfying two conditions:

  1. The sum of residuals is zero: ∑i=1nei=0\sum_{i=1}^{n} e_i = 0. This ensures the regression hyperplane passes through the mean of all variables. The estimated intercept is then calculated as α^=yˉ−∑j=1pβ^jxˉj\hat{\alpha} = \bar{y} - \sum_{j=1}^{p} \hat{\beta}_j\bar{x}_j.
  2. The covariance between each independent variable (xjx_j) and the residuals (ee) is zero: sxj,e=0s_{x_j,e} = 0 for all j∈{1,…,p}j \in \{1, \dots, p\}. This can be summarized by the matrix equation XTe=0X^T e = 0 10.

The OLS solution for the coefficient vector β^\hat{\beta} is given by the formula: β^=(XTX)−1XTy\hat{\beta} = (X^TX)^{-1}X^Ty This solution involves the inverse of the (XTX)(X^TX) matrix, which contains information about the means and covariances of the independent variables, and the (XTy)(X^Ty) vector, which contains the sum of the dependent variable and its covariances with the independent variables 11.

Test of the regression coefficients

The OLS estimators (β^\hat{\beta}) are considered Best Linear Unbiased Estimators (BLUE), meaning they have the smallest variance among all linear unbiased estimators 12.

  • Expected value: E(β^)=βE(\hat{\beta}) = \beta
  • Variance: Var(β^)=σ2(XTX)−1Var(\hat{\beta}) = \sigma^2(X^TX)^{-1}

The variance of a specific coefficient β^j\hat{\beta}_j can be expressed as: Var(β^j)=SE(β^j)2=σ2nsxj2(1−Rj2)Var(\hat{\beta}_j) = SE(\hat{\beta}_j)^2 = \frac{\sigma^2}{n s_{x_j}^2 (1 - R_j^2)} where sxj2s_{x_j}^2 is the sample variance of the predictor XjX_j, and Rj2R_j^2 is the R-squared value obtained from regressing XjX_j on all other predictors [12](#page=1

Cover

STAT_C1000_Exam_3_Review%28Solutions%29.pdf

Table of contents

  1. Exam 3 Review
  2. Chapter 8
  3. Chapter 8 Continued
  4. Chapter 8 Continued

1. Exam 3 Review

1.1 Confidence interval for standard deviation

To construct a confidence interval for the standard deviation (σ\sigma) of a population with a normal distribution, the chi-squared (χ2\chi^2) distribution is used. The degrees of freedom (d.f.) for this setting are calculated as n−1n-1, where nn is the sample size 1.

  • Confidence level (CL): This is the probability that the confidence interval contains the true population parameter.
  • Alpha (α\alpha): Calculated as 1−CL1 - CL, it represents the significance level.
  • Chi-squared values (χL2\chi^2_L, χR2\chi^2_R): These are critical values from the chi-squared distribution table, corresponding to the lower and upper tails of the distribution, respectively.
  • Confidence interval formula: The interval for σ\sigma is given by (n−1)s2χR2<σ<(n−1)s2χL2\sqrt{\frac{(n-1)s^2}{\chi^2_R}} < \sigma < \sqrt{\frac{(n-1)s^2}{\chi^2_L}}, where ss is the sample standard deviation 1.

📝 For a sample of 107 body temperatures with xˉ=98.80∘F\bar{x} = 98.80^\circ F and s=0.61∘Fs = 0.61^\circ F, a 99% confidence interval for the standard deviation is calculated. With n=107n=107, d.f. = 106. If χR2=129.561\chi^2_R = 129.561 and χL2=74.222\chi^2_L = 74.222, the interval is 0.53<σ<0.770.53 < \sigma < 0.77. This means we are 99% confident that the true standard deviation of body temperatures for all healthy humans lies between 0.53 and 0.77 1.

1.2 Sample size determination for proportions

Determining the necessary sample size for a survey depends on the desired confidence level and margin of error, as well as any prior knowledge about the population proportion 2.

Assumption about percentageSample size (n)
Nothing is known475
Prior survey suggests 36%438

📝 To be 95% confident that the sample percentage is within 4.5 percentage points of the true population percentage of air passengers who prefer aisle seats, the required sample size varies. If nothing is known, n=475n=475. If a prior survey suggests 36% prefer aisle seats, n=438n=438 2.

1.3 Confidence interval for the mean using Student's t-distribution

When the population standard deviation (σ\sigma) is unknown and the sample size is sufficiently large (typically n>30n > 30), or the population is normally distributed, the Student's t-distribution is appropriate for constructing a confidence interval for the population mean (μ\mu) 2.

  • Degrees of freedom (d.f.): Calculated as n−1n-1, where nn is the sample size.
  • Appropriateness: The Student's t-distribution is suitable when the sample size is greater than 30, even if the population distribution is not explicitly stated as normal 2.

📝 For 37 artificial diamonds with a mean weight (xˉ\bar{x}) of 6.75 carats and a sample standard deviation (ss) of 0.33 carats, a 95% confidence interval for the mean weight (μ\mu) can be computed using a Student's t-distribution. The d.f. = 37−1=3637-1=36. The resulting interval is 6.64 carats<μ<6.86 carats6.64 \text{ carats} < \mu < 6.86 \text{ carats}. This indicates 95% confidence that the true mean weight of all diamonds produced by the new process falls within this range 2.

1.4 Confidence interval for the mean using the normal distribution (Z-interval)

When the population standard deviation (σ\sigma) is known and the population is normally distributed, or the sample size is large (n≥30n \ge 30), a Z-interval is used to construct a confidence interval for the population mean (μ\mu) 3.

  • Point estimate of μ\mu: The sample mean (xˉ\bar{x}) serves as the best single-value estimate for the population mean.
  • Critical value (zα/2z_{\alpha/2}): This value corresponds to the desired confidence level and is obtained from the standard normal distribution table.
  • Margin of error (E): Calculated as E=zα/2σnE = z_{\alpha/2} \frac{\sigma}{\sqrt{n}}, it represents the maximum likely difference between the sample mean and the population mean.
  • Confidence interval: The interval is given by xˉ−E<μ<xˉ+E\bar{x} - E < \mu < \bar{x} + E 3.
Cover

stat ch_4.pdf

Table of contents

  1. Measures of dispersion
  2. Measures of shape
  3. Dispersion percentages

1. Measures of dispersion

1.1 Definition of dispersion

Dispersion refers to the scattering of observations within a dataset, either among themselves or relative to a central value like the mean, median, or mode. Measures of dispersion are numerical values that quantify the extent or degree to which data points spread out or vary around an average value.

These are also known as measures of variation 2.

  • Dispersion: The scattering of observations among themselves or from a central value of data.
  • Measures of dispersion: Numerical values indicating the extent to which data items spread or vary about an average value 2.

1.2 Objectives of measuring variation

Understanding dispersion is crucial in various fields, such as analyzing wages, prices, living standards, and wealth distribution. It highlights the differences in magnitudes among items within a group, indicating a lack of uniformity 2.

  • Judging reliability of central tendency: To assess how representative a central value is for the entire dataset.
  • Controlling variability: To manage and reduce unwanted variation in processes or data.
  • Comparing datasets: To evaluate the variability between two or more different datasets.
  • Further statistical analysis: To provide a basis for more advanced statistical techniques and inferences 2.

📝 For boys, the range of achievement test scores is 37 (40 - 3), and the relative range is approximately 0.86. For girls, the range is 6 (23 - 17), and the relative range is 0.15. This indicates larger variation in boys' scores compared to girls' scores 5.

1.3 Properties of a good measure of variation

A good measure of variation should possess all the desirable properties of a good measure of average 2.

1.4 Describing the variation of the data set

The primary summary measures used to describe data variation are illustrated in a flowchart. Among these, the standard deviation and coefficient of variation are frequently employed 2.

1.5 Absolute and relative forms

Measures of dispersion are categorized into two types: absolute and relative 3.

  • Absolute form: A measure of dispersion expressed in the same units as the original observations. For example, if data is in kilograms, the absolute measure will also be in kilograms.
  • Examples include range and standard deviation.
  • Relative form: A measure of dispersion that is independent of the units of the original data. For instance, if data is in dollars or kilometers, these units are not used with the relative measure.
  • Examples include relative range and coefficient of mean deviation 3.
Measure TypeDescriptionExamples
Absolute formExpressed in the same units as original observations.Range, Standard Deviation
Relative formFree of the units of the original data.Relative Range, Coefficient of Mean Deviation

1.6 The Range and the Coefficient of Range

The range is the simplest, though crude, measure of dispersion. It is calculated as the difference between the largest and smallest values in a dataset 4.

  • Range (R): The difference between the largest (L) and smallest (S) values in a dataset.
  • Formula for raw data: R=L−SR = L - S.
  • Formula for grouped data: R=xmk−xm1=UCBk−LCB1R = x_{mk} - x_{m1} = UCB_k - LCB_1.
  • Relative Range (RR): The relative form of the range.
  • Formula: RR=L−SL+S=RL+SRR = \frac{L - S}{L + S} = \frac{R}{L + S} 4.

Merits of Range:

  • Simple to calculate.
  • Provides a general idea of the total spread.
  • Can be used to approximate standard deviation: s≈Range4s \approx \frac{Range}{4} 4.

Demerits of Range:

  • Highly sensitive to outliers.
  • Ignores the middle n−2n-2 observations, losing significant information.
  • Cannot be computed for open-end distributions 4.

ILLUSTRATION 4.1. Calculating range for raw data Given a sample of 5 test grades (90, 95, 80, 60, and 75). Find the range.

Step 1: Arrange data in ascending order: 60, 75, 80, 90, and 95. Step 2: Use formula R=L−S=95−60=35R = L - S = 95 - 60 = 35. Step 3: Interpretation: There is a 35-point difference between the highest and lowest scores 5.

ILLUSTRATION 4.2. Find the range and relative range for the achievement test scores data in (activity 4.1). For boys: Highest score (H) = 40, Lowest score (L) = 3. For girls: Highest score (H) = 23, Lowest score (L) = 17. i. Range for boys: Rboys=40−3=37R_{boys} = 40 - 3 = 37. Range for girls: Rgirls=23−17=6R_{girls} = 23 - 17 = 6. ii.

Relative Range for boys: RRboys=3740+3=3743≈0.86RR_{boys} = \frac{37}{40 + 3} = \frac{37}{43} \approx 0.86. Relative Range for girls: RRgirls=623+17=640=0.15RR_{girls} = \frac{6}{23 + 17} = \frac{6}{40} = 0.15. Interpretation: The variation is larger in boys (0.86) than in girls (0.15) 5.

Cover

Statistical analysis.docx

Table of contents

  1. Descriptive Statistics
  2. Inferential Statistics: Making The Leap from Sample to Population
  3. Inferential Statistics: Making the Leap from sample to population 2 – 09/28/26
  4. t-tests for Independent Groups and Paired Designs

1. Descriptive Statistics

1.1 Variable types

Variables in research can be classified into two main categories: continuous and discrete. This classification helps in understanding the nature of the data and choosing appropriate statistical methods.

  • Continuous variable: A variable that can take on any value within a given range. There are an unlimited number of possible values between any two given values.
  • Examples include height, weight, time, and temperature.
  • Discrete variable: A variable that can only take on specific, distinct, or separated values. These are often whole numbers and cannot have fractional values between them.
  • Examples include the number of eggs in a basket, the number of children in a family, or the number of toys in a box.

1.2 Pictures of data: Histograms

Histograms are graphical tools used to visualize the distribution of data, particularly for continuous variables. They help in understanding the shape, center, and spread of the data.

  • Histogram: A graphical representation that displays the distribution of numerical data. The data is divided into bins (intervals), and the height of each bar represents the number of observations that fall within that bin.
  • Histograms are useful for depicting the frequency distribution of a dataset.
  • They allow for quick visual assessment of data patterns, such as skewness and modality.

1.3 Measures of central tendency

Measures of central tendency provide a single value that represents the center or typical value of a dataset. The most common measures are the mean, median, and mode.

  • Mean: The average of a dataset, calculated by summing all values and dividing by the number of values.
  • Represented by μ\mu for a population and MM for a sample.
  • It is sensitive to outliers, especially in smaller datasets.
  • Median: The middle value in a dataset when the data is ordered from least to greatest.
  • If there is an even number of data points, the median is the average of the two middle values.
  • It is less affected by outliers than the mean and can be used for ordinal data.
  • Mode: The value that appears most frequently in a dataset.
  • It can be used for any level of measurement, including nominal data.
  • A dataset can have one mode (unimodal), two modes (bimodal), or more (multimodal).

1.4 Measures of spread

Measures of spread, also known as measures of variability or dispersion, describe how spread out or clustered the data points are. Key measures include range, standard deviation, variance, and interquartile range.

MeasureDescriptionSensitivity to Outliers
RangeThe difference between the maximum and minimum scores in a dataset.High
Standard Deviation (s or σ)The average or typical deviation of data points from the mean.High
Variance (s² or σ²)The average of the squared deviations from the mean; expressed in squared units.High
Interquartile Range (IQR)The difference between the third quartile (Q3) and the first quartile (Q1).Low
  • Quartiles: These divide the data into four equal parts.
  • Q1: The 25th percentile.
  • Q2: The 50th percentile (same as the median).
  • Q3: The 75th percentile.
  • Interquartile Range (IQR): Calculated as Q3 - Q1, it represents the spread of the middle 50% of the data and is resistant to extreme values.

1.5 Individual data points: Z-scores

A z-score standardizes an individual's score by expressing it in terms of standard deviation units from the mean. This allows for comparisons across different datasets with varying scales and units.

  • Z-score: A measure of how many standard deviations an individual score is away from the mean.
  • The formula for a z-score is z=X−μσz = \frac{X - \mu}{\sigma} for a population, or z=X−Msz = \frac{X - M}{s} for a sample, where XX is the individual score, μ\mu or MM is the mean, and σ\sigma or ss is the standard deviation.
  • Z-scores provide standardization, enabling comparisons between scores from different measurement scales.
  • Standard Normal Distribution: A normal distribution with a mean of 0 and a standard deviation of 1. Transforming all scores in a population to z-scores results in this distribution.