stat110 practice 2026S1

📚 stat110_practice_2026S1 (1).pdf

Brief overview

This document provides a comprehensive review of foundational and advanced statistical concepts. It equips learners with the tools to understand data, perform statistical inference, and build complex models, crucial for rigorous scientific inquiry.

Key points

  • Overview of descriptive statistics, variable types, and probability distributions
  • Application of statistical inference through confidence intervals and hypothesis testing
  • Principles and practices of linear regression for variable relationship modeling
  • Exploration of advanced models like multiple linear regression and ANOVA
  • Discussion of research integrity, including the replication crisis and ethical data handling

1. Descriptive statistics and probability distributions

1.1 Types of variables

  • Categorical variables represent qualities or categories.

    • Nominal categorical variables have no inherent order (e.g., colors).
    • Ordinal categorical variables have a natural order but the distances between categories are not equal or known (e.g., agreement scales: "Strongly Agree", "Agree").
    • Binary categorical variables have only two possible outcomes (e.g., Yes/No, True/False).
  • Numerical variables represent quantities.

    • Continuous numerical variables can take any value within a range (e.g., height, temperature).
    • Discrete numerical variables can only take specific, separate values, often integers (e.g., number of cars, number of siblings).

Ordinal categorical variables are not continuous numerical, even if they use numbers for coding.

1.2 Descriptive statistics

Descriptive statistics summarize and describe the main features of a dataset.

  • Sample mean (yˉ\bar{y}): The average of a set of numerical values. It is calculated by summing all values and dividing by the number of values. yˉ=∑i=1nyin\bar{y} = \frac{\sum_{i=1}^{n} y_i}{n} For the data y=(39.7,41.3,44.4,39.0,45.5)y = (39.7, 41.3, 44.4, 39.0, 45.5), the sample mean is closest to 42.0.

  • Sample standard deviation (ss): A measure of the spread or dispersion of data points around the mean. A low standard deviation means data points are close to the mean, while a high standard deviation means they are spread out. s=∑i=1n(yi−yˉ)2n−1s = \sqrt{\frac{\sum_{i=1}^{n} (y_i - \bar{y})^2}{n-1}} For the data y=(39.7,41.3,44.4,39.0,45.5)y = (39.7, 41.3, 44.4, 39.0, 45.5), the sample standard deviation is closest to 2.9.

Variation and uncertainty are fundamental concepts in statistics. Statistical models help describe variation, and uncertainty is quantified wherever possible.

1.3 Probability distributions and random variables

A random variable is a variable whose value is a numerical outcome of a random phenomenon. It's a random process with a numerical outcome.

1.3.1 Discrete probability distributions

A discrete probability distribution assigns probabilities to each possible value of a discrete random variable. The sum of all probabilities must equal 1.

  • Example: Gene copy number variation (CNV). A gene locus can have 0, 1, 3, or 4 copies. The probabilities are:

To find the missing probability for 4 copies: 1−(0.05+0.15+0.50)=1−0.70=0.301 - (0.05 + 0.15 + 0.50) = 1 - 0.70 = 0.30.

* Probability of observing 3 or 4 copies: $P(Y=3 \text{ or } 4) = P(Y=3) + P(Y=4) = 0.50 + 0.30 = 0.80$.

1.3.2 Expected value and variance

  • Expected value (E[Y]E[Y]): The average value of a random variable over many trials. It's the weighted average of all possible values, where weights are their probabilities. E[Y=∑yi⋅P(Y=yi)E[Y = \sum y_i \cdot P(Y=y_i) For the gene copy number example: E[Y=(0×0.05)+(1×0.15)+(3×0.50)+(4×0.30)=0+0.15+1.50+1.20=2.85E[Y = (0 \times 0.05) + (1 \times 0.15) + (3 \times 0.50) + (4 \times 0.30) = 0 + 0.15 + 1.50 + 1.20 = 2.85.

    Interpretation of E[Y]: It is the expected, or average, number of copies of the gene for a randomly selected person.

  • Variance (Var(Y)Var(Y)): A measure of how spread out the distribution of a random variable is. It is the expected value of the squared deviation from the mean. Var(Y)=E[(Y−E[Y])2=∑(yi−E[Y])2⋅P(Y=yi)Var(Y) = E[(Y - E[Y])^2 = \sum (y_i - E[Y])^2 \cdot P(Y=y_i) For the gene copy number example: Var(Y)=(0−2.85)2×0.05+(1−2.85)2×0.15+(3−2.85)2×0.50+(4−2.85)2×0.30Var(Y) = (0 - 2.85)^2 \times 0.05 + (1 - 2.85)^2 \times 0.15 + (3 - 2.85)^2 \times 0.50 + (4 - 2.85)^2 \times 0.30 Var(Y)=(8.1225×0.05)+(3.4225×0.15)+(0.0225×0.50)+(1.3225×0.30)Var(Y) = (8.1225 \times 0.05) + (3.4225 \times 0.15) + (0.0225 \times 0.50) + (1.3225 \times 0.30) Var(Y)=0.406125+0.513375+0.01125+0.39675=1.3275Var(Y) = 0.406125 + 0.513375 + 0.01125 + 0.39675 = 1.3275. The variance is closest to 1.328 3.

1.3.3 Conditional probability

Conditional probability, P(A∣B)P(A|B), is the probability of event A occurring given that event B has already occurred. It is calculated as P(A∣B)=P(A∩B)P(B)P(A|B) = \frac{P(A \cap B)}{P(B)}.

  • Example: Plant-based burger preferences. Let VV be the event a customer is vegetarian, and BB be the event a customer chooses a plant-based burger. Given: P(V)=0.30P(V) = 0.30, P(B∣V)=0.600P(B|V) = 0.600, P(B∣Vc)=0.15P(B|V^c) = 0.15.

    • Interpretation of P(B∣Vc)P(B|V^c): The probability that a customer chooses a plant-based burger, given that they are not vegetarian.

    • Calculate P(V∣B)P(V|B) using Bayes' Theorem: P(V∣B)=P(B∣V)P(V)P(B)P(V|B) = \frac{P(B|V)P(V)}{P(B)}. First, find P(B)P(B) using the law of total probability: P(B)=P(B∣V)P(V)+P(B∣Vc)P(Vc)P(B) = P(B|V)P(V) + P(B|V^c)P(V^c). P(Vc)=1−P(V)=1−0.30=0.70P(V^c) = 1 - P(V) = 1 - 0.30 = 0.70.

P(B)=(0.600×0.30)+(0.15×0.70)=0.180+0.105=0.285P(B) = (0.600 \times 0.30) + (0.15 \times 0.70) = 0.180 + 0.105 = 0.285. Now, P(V∣B)=0.600×0.300.285=0.1800.285≈0.632P(V|B) = \frac{0.600 \times 0.30}{0.285} = \frac{0.180}{0.285} \approx 0.632.

* Probability of being vegetarian OR choosing a plant-based burger ($P(V \cup B)$):

P(V∪B)=P(V)+P(B)−P(V∩B)P(V \cup B) = P(V) + P(B) - P(V \cap B). We need P(V∩B)=P(B∣V)P(V)=0.600×0.30=0.180P(V \cap B) = P(B|V)P(V) = 0.600 \times 0.30 = 0.180.

P(V∪B)=0.300+0.285−0.180=0.405P(V \cup B) = 0.300 + 0.285 - 0.180 = 0.405.

* Probability that a customer chooses a plant-based burger ($P(B)$):

P(B)=P(B∣V)P(V)+P(B∣Vc)P(Vc)P(B) = P(B|V)P(V) + P(B|V^c)P(V^c) P(B)=(0.600×0.30)+(0.15×(1−0.30))=0.180+(0.15×0.70)=0.180+0.105=0.285P(B) = (0.600 \times 0.30) + (0.15 \times (1 - 0.30)) = 0.180 + (0.15 \times 0.70) = 0.180 + 0.105 = 0.285.

🔑 Important: The interpretation of conditional probability P(A∣B)P(A|B) is the probability of A happening given that B has already happened.

🔑 Important: Use the law of total probability to find the overall probability of an event by summing probabilities across all possible conditions.

1.4 Continuous random variables

  • A continuous random variable can take any value within a given range. Modeling these often involves probability density functions (PDFs), not discrete probability mass functions 4.

🔑 Important: Understanding variable types is crucial for choosing the correct statistical methods 2.

2. Statistical inference: confidence intervals and hypothesis testing

2.1 Confidence intervals

  • Confidence interval (CI): A range of plausible values for an unknown population parameter.

  • Confidence level: The percentage of intervals that would contain the true parameter if the study were repeated many times. Common levels are 95% or 99%.

  • Formula structure: CI = Estimate ± Multiplier × Standard Error

    • Estimate: A sample statistic that approximates the population parameter (e.g., sample mean yˉ\bar{y} for population mean μ\mu).
    • Multiplier: A value determined by the confidence level and the distribution used (e.g., z∗z^* or t∗t^*).
    • Standard Error (SE): A measure of the variability of the sampling distribution of the estimate. For a sample mean, SE=s/nSE = s / \sqrt{n} or SE=σ/nSE = \sigma / \sqrt{n}.
  • Impact of confidence level:

    • Increasing the confidence level (e.g., from 95% to 99%) leads to a wider interval. This is because a larger multiplier is needed to capture the true parameter with higher certainty. .
  • Interpretation of a confidence interval:

    We are [confidence level]% confident that the true population parameter lies between [lower bound and [upper bound.

    • It is incorrect to state there is a [confidence level]% probability that the true parameter is within a specific interval. The parameter is fixed; it's the interval that varies across samples. 7.

2.2 Hypothesis testing

  • Hypothesis test: A formal procedure to evaluate a claim or hypothesis about a population parameter using sample data.

  • Null Hypothesis (H0H_0): A statement of no effect or no difference. It is the hypothesis we try to find evidence against.

  • Alternative Hypothesis (HAH_A): A statement that contradicts the null hypothesis, suggesting an effect or difference exists.

  • P-value: The probability of observing sample data as extreme as, or more extreme than, what was observed, assuming the null hypothesis is true.

    • A small p-value (typically < α\alpha) suggests the observed data are unlikely if H0H_0 were true.
    • The p-value is NOT the probability that H0H_0 is true. .
  • Significance Level (α\alpha): A threshold for deciding whether to reject the null hypothesis. If the p-value is less than α\alpha, we reject H0H_0. Common values are 0.05 or 0.01.

  • Decision rule:

    • If p-value < α\alpha: Reject H0H_0. Evidence suggests the alternative hypothesis is more plausible.
    • If p-value ≥α\ge \alpha: Fail to reject H0H_0. Insufficient evidence to conclude HAH_A is true.
  • Interpretation of p-value vs. effect size: A very small p-value means an effect is statistically significant, but it doesn't necessarily mean the effect is large or practically important. 8.

2.3 Sampling distributions and the Central Limit Theorem

  • Sampling distribution of the sample mean (yˉ\bar{y}): The distribution of sample means from all possible samples of a given size taken from the population.

  • Central Limit Theorem (CLT): States that for a sufficiently large sample size (nn), the sampling distribution of the sample mean will be approximately normal, regardless of the population distribution.

    • The mean of the sampling distribution is equal to the population mean (μ\mu).
    • The standard deviation of the sampling distribution (standard error) is σ/n\sigma / \sqrt{n}.

    The CLT makes large samples behave predictably, even if the original data doesn't. 6.

  • Conditions for CLT:

    • Sample size n≥30n \ge 30 is often considered sufficient for reasonably non-skewed populations.
    • If the population is already normal, the sampling distribution of the mean is normal for any sample size.

2.4 Types of hypothesis tests and intervals

  • Paired t-test: Used for comparing means of two related groups (e.g., measurements before and after an intervention on the same subjects). The test is performed on the differences between paired observations. 10.

  • Two-sample t-test: Used for comparing means of two independent groups.

  • Confidence interval for difference in means (μ1−μ2\mu_1 - \mu_2):

    Type of Test/IntervalGroupsSample SizesStandard Error CalculationDistribution
    Independent samplesIndependentn1,n2n_1, n_2SE=s12/n1+s22/n2SE = \sqrt{s_1^2/n_1 + s_2^2/n_2} (approximate)t-distribution
    Paired samplesPairednnSE=sd/nSE = s_d / \sqrt{n}, where sds_d is SD of differencest-distribution
    Known σ\sigmaAnynnSE=σ/nSE = \sigma / \sqrt{n}z-distribution
  • Interpreting confidence intervals for differences:

    • If the interval contains 0: There is no statistically significant difference between the group means at the chosen confidence level. 11.
    • If the interval is entirely positive: Group 1 mean is significantly higher than Group 2 mean.
    • If the interval is entirely negative: Group 1 mean is significantly lower than Group 2 mean.

2.5 Linear Regression

  • Model: Y=β0+β1X+ϵY = \beta_0 + \beta_1 X + \epsilon

    • β0\beta_0: Intercept, the expected value of YY when X=0X=0.
    • β1\beta_1: Slope, the expected change in YY for a one-unit increase in XX.
    • ϵ\epsilon: Error term, representing random variation.
  • Parameter estimation:

    • Estimates (β^0,β^1\hat{\beta}_0, \hat{\beta}_1) are typically found using least squares regression, which minimizes the sum of squared residuals (∑(observed−predicted)2\sum (\text{observed} - \text{predicted})^2). 16.
  • Interpretation of coefficients:

    • Slope (β^1\hat{\beta}_1): Represents the estimated average change in the response variable (YY) for a one-unit increase in the predictor variable (XX), holding other predictors constant. 14.
    • Intercept (β^0\hat{\beta}_0): Represents the estimated value of the response variable when the predictor variable is zero. Interpretation is only meaningful if X=0X=0 is within the range of the data and scientifically plausible. .
  • Model fit:

    • R-squared (R2R^2): The proportion of the variance in the response variable that is explained by the predictor variable(s).
    • Residual standard error: An estimate of the standard deviation of the error term (ϵ\epsilon), representing the typical prediction error. 17.
  • Prediction intervals:

    • Confidence interval for mean response: A range for the average response for a given predictor value. It is narrower.
    • Prediction interval: A range for an individual response for a given predictor value. It is wider because it accounts for both the uncertainty in the mean response and the variability of individual data points. .
  • Extrapolation: Making predictions outside the range of the observed data is unreliable. .

Linear regression helps quantify relationships, but beware of predicting too far beyond the data's reach. 18.

3. Advanced statistical modeling and interpretation

3.1 Multiple linear regression

Multiple linear regression allows us to examine the relationship between a dependent variable and multiple independent variables. It helps assess the effect of each predictor while controlling for the influence of others.

  • Model: y=β0+β1x1+β2x2+⋯+βkxk+εy = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots + \beta_k x_k + \varepsilon
  • The term ε\varepsilon represents the error term, assumed to be normally distributed with a mean of 0 and a variance of σ2\sigma^2.
  • The fitted model is represented as y^=β^0+β^1x1+β^2x2+⋯+β^kxk\hat{y} = \hat{\beta}_0 + \hat{\beta}_1 x_1 + \hat{\beta}_2 x_2 + \dots + \hat{\beta}_k x_k.

β0\beta_0 is the expected value of yy when all predictors are zero. Interpret cautiously if x=0x=0 is outside the data range or biologically unreasonable.

3.1.1 Interpreting regression coefficients

Coefficients (β^i\hat{\beta}_i) in multiple linear regression indicate the change in the expected outcome (yy) for a one-unit increase in the corresponding predictor (xix_i). This change is estimated while holding all other predictors constant.

  • For the model metabolic_rate∼temperature+activitymetabolic\_rate \sim temperature + activity:
    • The coefficient for temperaturetemperature (β^temperature≈−18.63\hat{\beta}_{temperature} \approx -18.63) suggests that for every one-degree Celsius increase in temperature, metabolic rate is expected to decrease by approximately 18.63 kcal/day, holding activity constant.
    • The coefficient for activityactivity (β^activity≈52.64\hat{\beta}_{activity} \approx 52.64) suggests that for every one-hour increase in activity, metabolic rate is expected to increase by approximately 52.64 kcal/day, holding temperature constant.

3.1.2 Confidence intervals and R-squared

  • A confidence interval for a coefficient provides a range of plausible values for the true population parameter. For example, a 95% confidence interval for βactivity\beta_{activity} between 46.79 and 58.49 indicates that we are 95% confident that the true increase in metabolic rate for each additional hour of activity, holding temperature fixed, lies within this range.
  • R-squared (R2R^2) quantifies the proportion of variance in the outcome variable explained by the predictors in the model.
    • It ranges from 0 to 1.
    • R2R^2 is the squared correlation between the observed outcome (yy) and the predicted outcome (y^\hat{y}).
    • The output "Multiple R-squared" in statistical software reports this value.

A high R2R^2 value indicates that the predictors explain a substantial portion of the outcome's variation. However, a regression model is not necessarily useless if R2<0.5R^2 < 0.5.

3.1.3 Model assumptions

When fitting linear regression models, several assumptions should be met for reliable interpretation:

AssumptionDescriptionHow to Check
LinearityThe relationship between predictors and the outcome is linear.Residuals vs. fitted values plot: Look for a random scatter around zero.
IndependenceErrors (residuals) are independent of each other.Residuals vs. order of data collection plot: Look for no discernible pattern.
Constant VarianceThe variance of the errors is constant across all levels of predictors.Residuals vs. fitted values plot: Look for a consistent spread of residuals.
NormalityThe errors are normally distributed.Histogram or Q-Q plot of residuals: Check if they follow a normal distribution.

Violations of these assumptions can lead to unreliable p-values and confidence intervals.

3.2 Analysis of Variance (ANOVA)

Analysis of Variance (ANOVA) is a statistical method used to compare the means of two or more groups. It partitions the total variation in the data into components attributable to different sources.

ANOVA tests if the means of groups are significantly different by comparing the variance between groups to the variance within groups.

3.2.1 Hypotheses and F-statistic

  • Null Hypothesis (H0H_0): All group means are equal (μ1=μ2=⋯=μk\mu_1 = \mu_2 = \dots = \mu_k).
  • Alternative Hypothesis (HAH_A): At least one group mean is different.
  • The F-statistic is the ratio of the variance between groups to the variance within groups (mean square between / mean square within). A large F-statistic suggests that the variation between group means is larger than the variation within groups, providing evidence against the null hypothesis.

A large F-value (numerator much larger than denominator) indicates that group means likely differ.

3.2.2 ANOVA table

The ANOVA table summarizes the results of the test. Key components include:

  • The F-statistic is compared to an F-distribution with degrees of freedom df1=(number of groups−1)df_1 = (\text{number of groups} - 1) and df2=(total observations−number of groups)df_2 = (\text{total observations} - \text{number of groups}).
  • If the p-value is less than the chosen significance level (α\alpha), we reject the null hypothesis.

3.2.3 Post-hoc tests

If ANOVA indicates a significant difference between group means, post-hoc tests (e.g., Tukey's Honestly Significant Difference - TukeyHSD) are used to determine which specific pairs of group means are significantly different.

  • TukeyHSD compares all possible pairs of group means, adjusting for multiple comparisons to control the overall error rate.
  • The output typically provides the difference between means, a confidence interval for that difference, and an adjusted p-value.

TukeyHSD helps identify which specific groups have different average values.

3.3 Research integrity and ethics

Modern research practices emphasize integrity and ethical considerations to ensure reliable and trustworthy scientific findings.

3.3.1 Replication crisis

The replication crisis refers to the growing concern that many scientific studies are difficult or impossible to reproduce by independent researchers. This raises questions about the validity of published findings.

Key issue: Many studies cannot be reproduced, undermining scientific confidence.

3.3.2 Ethical considerations

Ethical practices are crucial throughout the research process.

  • Data handling: This includes responsible collection, storage, analysis, and reporting of data to prevent bias and ensure accuracy.
  • Informed consent: Participants must be fully informed about a study and voluntarily agree to participate.
  • Confidentiality and privacy: Protecting sensitive information about participants.
  • Plagiarism: Attributing sources properly and avoiding misrepresentation of others' work.
  • HARKing (Hypothesizing After the Results are Known): Presenting exploratory findings as if they were determined before data collection. This is considered a form of p-hacking and distorts the research process.
  • Type I error: The danger of performing many statistical tests without adjustment is an increased chance of a Type I error (falsely rejecting a true null hypothesis).

🔑 Important: Maintaining rigorous ethical standards and transparent practices, like avoiding HARKing and controlling for multiple testing, is essential for scientific credibility.

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

See also