Inferential Statistics
- Sampling and Estimation
- Hypothesis Testing
- Common Tests
- Regression Analysis
- Estimation Methods
Population vs Sample
Concept | Description | Pros | Cons | Example |
---|---|---|---|---|
Population | Entire group of interest (all individuals/objects) | Complete source of truth | Usually too large/infinite to study fully | All voters in a country |
Sample | Subset of population chosen for study | Practical, manageable, enables inference | May mislead if non-representative | 1,000 voters surveyed |
Probability Sampling
Method | Description | Pros | Cons | Example |
---|---|---|---|---|
Simple Random Sampling (SRS) | Every individual has equal chance of selection | Easy, unbiased | Impractical for large groups; may miss subgroups | Randomly choosing 100 IDs |
Stratified Sampling | Population divided into homogeneous subgroups (strata); random sampling within each | Ensures subgroup representation; more precise | Requires population info; complex | Sampling students by grade level |
Systematic Sampling | Select every k-th element after random start | Simple, efficient | Bias risk if population has patterns | Every 10th store customer |
Cluster Sampling | Divide into clusters, randomly select clusters, then sample all in them | Cost-effective; useful for dispersed groups | Higher error if clusters heterogeneous | Survey all students in 10 selected schools |
Non-Probability Sampling
Method | Description | Pros | Cons | Example |
---|---|---|---|---|
Convenience Sampling | Use easily accessible participants | Fast, cheap | Strong bias risk, not representative | Surveying people in one street |
Purposive Sampling | Researcher selects based on judgment/criteria | Good for niche cases or experts | Bias-prone, not generalizable | Interviewing only industry experts |
Quota Sampling | Fill quotas for subgroups without randomization | Ensures subgroup presence | Still biased; no random selection | 50 men, 50 women chosen by interviewer |
Sampling Distribution & Estimation
Concept | Description | Key Points |
---|---|---|
Sampling Distribution | Distribution of a statistic across all possible samples | Central Limit Theorem ensures approximate normality for large n. Standard Error measures precision |
Point Estimate | Single sample statistic used to estimate population parameter | Simple, quick, but no reliability measure |
Interval Estimate (Confidence Intervals) | Range around point estimate with confidence level | Captures uncertainty, widely used in decision-making. Not probability for one sample - reflects long-run accuracy |
Concept | Definition | Key Characteristics | Examples |
---|---|---|---|
Null Hypothesis () | Statement of no effect, no difference, or existing status quo. Always involves equality () | Assumed true until evidence suggests otherwise; refers to population parameter; target of skepticism | ; ; |
Alternative Hypothesis ( or ) | Statement conflicting with ; represents effect/researcher's claim. Uses | What we conclude if evidence is sufficient; also refers to population parameter; usually the hypothesis we want to support | (two-tailed); (right-tailed); (left-tailed) |
Type I Error () | Rejecting when is true (false positive) | Probability = ; controlled via significance level | Convicting an innocent person; concluding a campaign increased conversions when it did not |
Type II Error () | Failing to reject when is false (false negative) | Probability = ; occurs when test lacks sensitivity | Letting a guilty person go free; missing that a campaign actually increased conversions |
Significance Level () | Maximum acceptable probability of Type I error set before test | Common levels: 0.05, 0.01, 0.10; smaller reduces false positives but increases false negatives | If , reject |
P-value | Probability of observing data as extreme or more extreme given is true | Small : reject ; Large : fail to reject . Not the probability that is true | Example: → reject |
Power () | Probability of correctly rejecting a false | Desired ≥ 80%; increases with sample size, higher , larger effect size, lower variability | Ensures study design is sensitive enough to detect meaningful effects; linked to resource planning |
Test | Purpose | When to Use | Assumptions | Use Case |
---|---|---|---|---|
Z-test | Compares a sample mean to a population mean, or two sample means, when σ is known | Population standard deviation known; large n ≥ 30 | Data is interval level; normal distribution (or CLT applies) | Test if average delivery time differs from 30 minutes when σ is known |
t-test (One-sample) | Compares sample mean to a hypothesized population mean when σ is unknown | σ unknown; small to moderate sample size | Approx. normal distribution; independent observations | Check if average product weight differs from 100g |
t-test (Independent samples) | Compares means of two independent groups | σ unknown; two independent groups | Normality; independence; equal variances (if using pooled) | Compare sales from two ad campaigns |
t-test (Paired samples) | Compares means of two related groups (before - after, matched) | σ unknown; paired observations | Differences approx. normally distributed | Compare satisfaction before and after service improvement |
ANOVA (One-way) | Tests if 3+ group means differ significantly (one factor) | Comparing ≥3 group means | Independence; normality; equal variances | Test if spending differs across customer segments |
ANOVA (Two-way) | Tests effect of two categorical factors on a quantitative outcome (plus interaction) | Two factors, multiple groups | Same as above | Compare sales across marketing channels and regions |
Chi-squared Goodness-of-Fit | Tests if observed categorical distribution matches expected | Categorical count data; expected distribution known | Expected counts ≥5 per cell (approx.); independence | Test if website traffic matches equal distribution across pages |
Chi-squared Test of Independence | Tests association between two categorical variables | Contingency tables for two categorical variables | Large enough expected counts; independence | Test if gender and product preference are associated |
Mann-Whitney U (Non-parametric) | Alternative to independent t-test (ranks) | Two independent samples; non-normal or ordinal data | Independence; ordinal/continuous ranked | Compare two groups with skewed data |
Wilcoxon Signed-Rank (Non-parametric) | Alternative to paired t-test (ranks differences) | Paired sample, non-normal | Symmetry of differences (less strict than normality) | Before - after ratings with skewed scores |
Kruskal-Wallis (Non-parametric) | Alternative to one-way ANOVA (ranks) | 3+ independent groups; non-normal | Independence; ordinal/continuous ranked | Compare ranks of satisfaction across multiple regions |
Spearman's Rank Correlation | Measures monotonic relationship between variables (non-parametric) | Ranked or ordinal data; non-linear monotonic | Independence; ordinal/continuous | Correlation between income rank and lifestyle scores |
Aspect | Simple Linear Regression | Multiple Linear Regression | Logistic Regression |
---|---|---|---|
Purpose | Models the relationship between one dependent variable (Y) and one independent variable (X) | Models the relationship between one dependent variable (Y) and multiple independent variables (X₁, X₂, …, Xₖ) | Models the probability of a binary outcome (e.g., yes/no, success/failure) |
Equation | |||
Interpretation of Coefficients | : Expected change in Y for a one-unit increase in X | : Expected change in Y for a one-unit increase in , holding all others constant | Coefficients affect the log-odds of Y=1; positive values increase probability, negative values decrease it |
Estimation Method | Ordinary Least Squares (minimizing SSR) | Ordinary Least Squares (extended to multiple predictors) | Maximum Likelihood Estimation (MLE) |
Assumptions | Linearity, independence of errors, homoscedasticity, normality of errors, no measurement error in X | All simple assumptions, plus no multicollinearity and no endogeneity | Assumes linear relationship between predictors and log-odds, independence of observations |
Goodness of Fit | (proportion of variance explained) | Adjusted (accounts for multiple predictors), | Pseudo-, accuracy, AUC (Area Under Curve) |
Hypothesis Tests | Slope test: | Slope tests for each predictor: | Tests for significance of predictors on log-odds () |
Challenges | Nonlinear relationships, violation of assumptions | Multicollinearity, overfitting, omitted variable bias | Probability calibration, handling class imbalance |
Applications | Predicting sales from advertising spend, predicting height from age | Predicting house price from square footage, bedrooms, and location | Fraud detection, medical diagnosis, churn prediction, spam email detection |
Method | Definition | Key Concepts | Applications |
---|---|---|---|
Maximum Likelihood Estimation (MLE) | Finds parameter values that maximize the likelihood of observing the given data |
|
|
Maximum A Posteriori (MAP) | Bayesian estimation that maximizes posterior probability including prior beliefs |
|
|
Method of Moments | Equates population moments with sample moments to estimate parameters |
|
|
Least Squares Estimation | Minimizes sum of squared residuals between observed and predicted values |
|
|