Stats Midterm Study Guide

Table of contents

  1. Unit 1: Introduction to Statistics & Exploratory Data Analysis
  2. Unit 2: Probability & Bayes’ Theorem
  3. Unit 3: Random Variables & Probability Distributions
  4. Unit 4: Statistical Estimation & Confidence Intervals
  5. Unit 5: Decision Making & Hypothesis Testing
  6. Quick Reference Sheet (Cheatsheet)

1. Unit 1: Introduction to Statistics & Exploratory Data Analysis

1.1 Core concepts: Population vs. sample

Statistics involves using data from a sample to make inferences about a larger population 1.

  • Population: This is the complete set of all elements, individuals, or measurements under investigation, denoted by NN.
  • Sample: This is a representative subset drawn from the population, denoted by nn.
  • Parameter: This is a fixed numerical characteristic of a population, such as the population mean (μ\mu) or population standard deviation (σ\sigma), which is usually unknown.
  • Statistic: This is a numerical value computed directly from sample data, such as the sample mean (xˉ\bar{x}) or sample standard deviation (ss), and it varies from sample to sample 1.

1.2 Types of data 2

Data can be broadly classified into qualitative (categorical) and quantitative (numerical) types, each with distinct characteristics 2.

Data TypeDescriptionExamples
Qualitative (Categorical)Non-numerical characteristics or labels['Part type', 'Defect code', 'Pass/fail status']
Quantitative (Numerical) - DiscreteValues obtained by counting with distinct, separated integer points['Number of defective items (0, 1, 2,...)']
Quantitative (Numerical) - ContinuousValues obtained by measurement on a continuous scale; can take any real value within an interval['Length', 'Voltage', 'Processing time (12.4 s, 12.45 s)']

1.3 Measures of central tendency & dispersion

Measures of central tendency describe the center of a data set, while measures of dispersion describe its spread 3.

  • Sample mean (xˉ\bar{x}): This is the sum of all data points divided by the number of data points. xˉ=1n∑i=1nxi=x1+x2+⋯+xnn\bar{x} = \frac{1}{n}\sum_{i=1}^{n}x_i = \frac{x_1 + x_2 + \dots + x_n}{n}
  • Median: This is the middle value when data is sorted in ascending order.
  • If nn is odd, the median is at position n+12\frac{n+1}{2}.
  • If nn is even, it is the average of the two middle values at positions n2\frac{n}{2} and n2+1\frac{n}{2} + 1.
  • Mode: This is the observation that appears most frequently in the data set.
  • Sample variance (s2s^2): This measures the average of the squared differences from the mean. s2=1n−1∑i=1n(xi−xˉ)2=∑xi2−(∑xi)2/nn−1s^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i - \bar{x})^2 = \frac{\sum x_i^2 - (\sum x_i)^2/n}{n-1}
  • Sample standard deviation (ss): This is the square root of the sample variance, indicating the typical distance of data points from the mean. s=s2s = \sqrt{s^2}
  • Interquartile range (IQR): This measures the spread of the middle 50% of the data 3.
  • IQR: It is calculated as the difference between the third quartile (Q3Q_3) and the first quartile (Q1Q_1).
  • Outliers: Values outside the lower fence (Q1−1.5×IQRQ_1 - 1.5 \times \text{IQR}) and upper fence (Q3+1.5×IQRQ_3 + 1.5 \times \text{IQR}) are classified as outliers.

📝 For concrete test cubes with compressive strengths of 20 MPa, 22 MPa, 26 MPa, 24 MPa, and 28 MPa, the sample mean is calculated as xˉ=20+22+26+24+285=1205=24.0 MPa\bar{x} = \frac{20+22+26+24+28}{5} = \frac{120}{5} = 24.0 \text{ MPa}. The sum of squared deviations is 40, leading to a sample variance s2=405−1=10.0 MPa2s^2 = \frac{40}{5-1} = 10.0 \text{ MPa}^2, and a standard deviation s=10.0≈3.16 MPas = \sqrt{10.0} \approx 3.16 \text{ MPa} 4.

📝 For microchip resistances (in Ω\Omega) of 98, 102, 100, 105, 99, 101, 103, 150, sorted data is 98, 99, 100, 101, 102, 103, 105, 150. The median is 101+1022=101.5Ω\frac{101+102}{2} = 101.5 \Omega. Q1Q_1 is 99+1002=99.5Ω\frac{99+100}{2} = 99.5 \Omega, and Q3Q_3 is 103+1052=104.0Ω\frac{103+105}{2} = 104.0 \Omega. The IQR is 104.0−99.5=4.5Ω104.0 - 99.5 = 4.5 \Omega. The upper fence is 104.0+1.5(4.5)=110.75Ω104.0 + 1.5(4.5) = 110.75 \Omega. Since 150 Ω\Omega is greater than 110.75 Ω\Omega, it is an outlier 5 6.

2. Unit 2: Probability & Bayes’ Theorem

2.1 Essential Probability Rules

Essential probability rules define how to calculate probabilities for various event relationships, forming the foundation for more complex analyses.

  • Complement Rule: The probability of an event not occurring is 1 minus the probability of it occurring. P(Ac)=1−P(A)P(A^c) = 1 - P(A)
  • General Addition Rule: The probability of either event A or event B occurring is the sum of their individual probabilities minus the probability of both occurring. P(A∪B)=P(A)+P(B)−P(A∩B)P(A \cup B) = P(A) + P(B) - P(A \cap B)
  • Conditional Probability: The probability of event A occurring given that event B has already occurred. P(A∣B)=P(A∩B)P(B)P(A|B) = \frac{P(A \cap B)}{P(B)}
  • General Multiplication Rule: The probability of both event A and event B occurring can be expressed using conditional probabilities. P(A∩B)=P(B)×P(A∣B)=P(A)×P(B∣A)P(A \cap B) = P(B) \times P(A|B) = P(A) \times P(B|A)
  • Independence: Two events are independent if the occurrence of one does not affect the probability of the other.
ConditionImplication
P(A∩B)=P(A)×P(B)P(A \cap B) = P(A) \times P(B)Events A and B are independent
P(A∣B)=P(A)P(A\vert B) = P(A)Events A and B are independent
  • Mutually exclusive events: These are events that cannot occur at the same time, meaning their intersection probability is zero.
ConditionAddition Rule Simplification
P(A∩B)=0P(A \cap B) = 0P(A∪B)=P(A)+P(B)P(A \cup B) = P(A) + P(B)

📝 In an engineering firm, the probability of a project finishing on time (P(T)P(T)) is 0.60, and staying within budget (P(B)P(B)) is 0.70. The probability of both (P(T∩B)P(T \cap B)) is 0.45. To find the probability of a project finishing on time or within budget (P(T∪B)P(T \cup B)), use the General Addition Rule: P(T∪B)=0.60+0.70−0.45=0.85P(T \cup B) = 0.60 + 0.70 - 0.45 = 0.85. To check for independence, compare P(T∩B)P(T \cap B) with P(T)×P(B)P(T) \times P(B). Since 0.45≠(0.60×0.70=0.42)0.45 \neq (0.60 \times 0.70 = 0.42), the events are not independent 7 8.

2.2 Law of Total Probability & Bayes’ Theorem

The Law of Total Probability and Bayes' Theorem are crucial for calculating probabilities when events are partitioned or when updating probabilities based on new information.

  • Law of Total Probability: This law calculates the total probability of an event A by summing the probabilities of A occurring under each condition of a partition of the sample space. A partition B1,B2,…,BkB_1, B_2, \dots, B_k means these events are mutually exclusive and collectively exhaustive. P(A)=∑i=1kP(Bi)×P(A∣Bi)P(A) = \sum_{i=1}^{k} P(B_i) \times P(A|B_i)
  • Bayes’ Theorem: This theorem calculates the posterior probability of an event BjB_j given that event A has occurred, using prior probabilities and conditional probabilities. It is particularly useful for updating beliefs or probabilities as new evidence becomes available. P(Bj∣A)=P(Bj)×P(A∣Bj)∑i=1kP(Bi)×P(A∣Bi)P(B_j|A) = \frac{P(B_j) \times P(A|B_j)}{\sum_{i=1}^{k} P(B_i) \times P(A|B_i)}

📝 An electronics facility receives microcontrollers from Supplier A (70%) and Supplier B (30%). Supplier A has a 2% defect rate, and Supplier B has a 6% defect rate. If a randomly picked microcontroller is defective, the probability it came from Supplier B (P(B∣D)P(B|D)) is calculated using Bayes' Theorem. First, find the total probability of a defective part (P(D)P(D)): P(D)=(0.70)(0.02)+(0.30)(0.06)=0.014+0.018=0.032P(D) = (0.70)(0.02) + (0.30)(0.06) = 0.014 + 0.018 = 0.032. Then, apply Bayes' Theorem: P(B∣D)=(0.30)(0.06)0.032=0.0180.032=0.5625P(B|D) = \frac{(0.30)(0.06)}{0.032} = \frac{0.018}{0.032} = 0.5625 7 9.

3. Unit 3: Random Variables & Probability Distributions

3.1 Discrete Probability Distributions & Expected Values

Discrete probability distributions describe the probabilities of distinct outcomes for a random variable, where the sum of all probabilities must equal one and each individual probability must be between zero and one 10.

  • Conditions for a discrete probability distribution:
  • The sum of all probabilities P(x)P(x) for all possible values of xx must be 1: ∑p(x)=1\sum p(x) = 1.
  • Each individual probability must be between 0 and 1, inclusive: 0≤p(x)≤10 \le p(x) \le 1.
  • Expected value (E[X]E[X] or μ\mu): This represents the long-run average value of a random variable. It is calculated by summing the product of each outcome and its probability: E[X]=μ=∑x⋅p(x)E[X] = \mu = \sum x \cdot p(x).
  • Variance (Var(X)\text{Var}(X) or σ2\sigma^2): This measures the spread or dispersion of the distribution around its expected value. It can be calculated as the expected value of the squared differences from the mean or using a shortcut formula: Var(X)=σ2=∑(x−μ)2p(x)=E[X2]−(E[X])2\text{Var}(X) = \sigma^2 = \sum (x - \mu)^2 p(x) = E[X^2] - (E[X])^2 10.

📝 For a system technician inspecting servers, the number of crashed hard drives (XX) per rack has probabilities P(X=0)=0.70P(X=0)=0.70, P(X=1)=0.20P(X=1)=0.20, and P(X=2)=0.10P(X=2)=0.10.

  1. Expected Value: E[X]=(0)(0.70)+(1)(0.20)+(2)(0.10)=0.40E[X] = (0)(0.70) + (1)(0.20) + (2)(0.10) = 0.40.
  2. E[X2]E[X^2]: E[X2]=(02)(0.70)+(12)(0.20)+(22)(0.10)=0.60E[X^2] = (0^2)(0.70) + (1^2)(0.20) + (2^2)(0.10) = 0.60.
  3. Variance: Var(X)=0.60−(0.40)2=0.60−0.16=0.44\text{Var}(X) = 0.60 - (0.40)^2 = 0.60 - 0.16 = 0.44 11.

3.2 Binomial Distribution: X∼Binomial(n,p)X \sim \text{Binomial}(n, p)

The binomial distribution models the number of successes in a fixed number of independent Bernoulli trials, where each trial has only two possible outcomes (success or failure) and the probability of success remains constant 10.

  • Probability Mass Function (PMF): P(X=k)=(nk)pk(1−p)n−kP(X=k) = \binom{n}{k} p^k (1-p)^{n-k}, where (nk)=n!k!(n−k)!\binom{n}{k} = \frac{n!}{k!(n-k)!}.
  • Parameters:
  • nn: The number of trials.
  • pp: The probability of success on a single trial.
  • Mean (μ\mu): μ=np\mu = np.
  • Variance (σ2\sigma^2): σ2=np(1−p)\sigma^2 = np(1-p).
  • Standard Deviation (σ\sigma): σ=np(1−p)\sigma = \sqrt{np(1-p)} 10.

📝 A production line has a defect probability (pp) of 0.05 per part. If 4 independent parts (n=4n=4) are inspected, the probability that exactly 1 part (k=1k=1) is defective is calculated as: P(X=1)=(41)(0.05)1(0.95)4−1=4⋅(0.05)⋅(0.95)3≈0.1715P(X=1) = \binom{4}{1} (0.05)^1 (0.95)^{4-1} = 4 \cdot (0.05) \cdot (0.95)^3 \approx 0.1715 12.

3.3 Poisson Distribution: X∼Poisson(λ)X \sim \text{Poisson}(\lambda)

The Poisson distribution describes the number of events occurring in a fixed interval of time or space, given a known average rate of occurrence (λ\lambda) and that these events occur independently 10.

  • Probability Mass Function (PMF): P(X=k)=λke−λk!P(X=k) = \frac{\lambda^k e^{-\lambda}}{k!}.
  • Parameters:
  • λ\lambda: The average rate of events in the given interval.
  • Mean (μ\mu): μ=λ\mu = \lambda.
  • Variance (σ2\sigma^2): σ2=λ\sigma^2 = \lambda.
  • Standard Deviation (σ\sigma): σ=λ\sigma = \sqrt{\lambda} 10.

📝 A web server receives an average of λ=3\lambda=3 error requests per hour. The probability of receiving exactly k=2k=2 error requests in a given hour is: P(X=2)=32e−32!=9⋅e−32≈0.2241P(X=2) = \frac{3^2 e^{-3}}{2!} = \frac{9 \cdot e^{-3}}{2} \approx 0.2241 14.

3.4 Continuous Normal Distribution & Central Limit Theorem

The normal distribution is a continuous probability distribution that is symmetric around its mean, often referred to as the "bell curve". The Central Limit Theorem (CLT) states that the sampling distribution of the sample mean approaches a normal distribution as the sample size increases, regardless of the shape of the population distribution 10 16.

  • Standardization (Z-score): To compare values from different normal distributions, a raw score XX can be converted into a Z-score, which represents the number of standard deviations a value is from the mean: Z=X−μσZ = \frac{X - \mu}{\sigma}.
  • Central Limit Theorem (CLT):
  • Condition: The sample size nn must be greater than or equal to 30 (n≥30n \ge 30).
  • Distribution of Sample Mean (Xˉ\bar{X}): The sample mean Xˉ\bar{X} is approximately normally distributed with a mean equal to the population mean (μ\mu) and a variance equal to the population variance divided by the sample size (σ2/n\sigma^2/n).
  • Standardization for Sample Mean: The Z-score for a sample mean xˉ\bar{x} is calculated as Z=xˉ−μσ/nZ = \frac{\bar{x} - \mu}{\sigma/\sqrt{n}} 10.
ConceptFormula
Z-score for individual valueZ=X−μσZ = \frac{X - \mu}{\sigma}
Z-score for sample meanZ=xˉ−μσ/nZ = \frac{\bar{x} - \mu}{\sigma/\sqrt{n}}

📝 The operational lifespan of a capacitor is normally distributed with μ=1000\mu=1000 hours and σ=80\sigma=80 hours. To find the probability that a single capacitor lasts longer than 1120 hours:

  1. Compute Z-score: Z=1120−100080=1.50Z = \frac{1120 - 1000}{80} = 1.50.
  2. Find probability: P(X>1120)=P(Z>1.50)=1−P(Z<1.50)=1−0.9332=0.0668P(X > 1120) = P(Z > 1.50) = 1 - P(Z < 1.50) = 1 - 0.9332 = 0.0668 16.

4. Unit 4: Statistical Estimation & Confidence Intervals

4.1 Confidence interval formulations

Confidence intervals provide a range within which a population parameter, such as a mean or proportion, is likely to fall. The specific formula used depends on whether the population standard deviation is known and the type of parameter being estimated 18.

ParameterFormula
Mean (σ\sigma Known)xˉ±zα/2(σn)\bar{x} \pm z_{\alpha/2} (\frac{\sigma}{\sqrt{n}})
Mean (σ\sigma Unknown, Student's tt)xˉ±tα/2,n−1(sn)\bar{x} \pm t_{\alpha/2, n-1} (\frac{s}{\sqrt{n}})
Proportion (np^≥10,n(1−p^)≥10n\hat{p} \ge 10, n(1-\hat{p}) \ge 10)p^±zα/2p^(1−p^)n\hat{p} \pm z_{\alpha/2}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}

📝 To construct a 95% confidence interval for the population mean tensile strength of steel cables, given a sample mean of 850 N from 64 cables and a known population standard deviation of 40 N, the critical z-value is 1.960. The standard error is 40/64=5.040/\sqrt{64} = 5.0 N, leading to a margin of error of 1.960×5.0=9.81.960 \times 5.0 = 9.8 N. The interval is 850±9.8850 \pm 9.8, or [840.2 N, 859.8 N 19.

4.2 CI for mean (sigma unknown, Student's t)

When the population standard deviation (σ\sigma) is unknown, the Student's t-distribution is used to construct confidence intervals for the mean. This approach requires calculating degrees of freedom (df=n−1df = n-1) and finding the appropriate t-critical value 20.

  • Degrees of freedom (dfdf): This is calculated as the sample size minus one (n−1n-1).
  • Critical t-value: This value is obtained from a t-distribution table based on the desired confidence level (α\alpha) and the degrees of freedom.
  • Standard error: Calculated as the sample standard deviation (ss) divided by the square root of the sample size (n\sqrt{n}).
  • Margin of error (MEME): The product of the critical t-value and the standard error.
  • Confidence interval: The sample mean (xˉ\bar{x}) plus or minus the margin of error.

📝 For 9 water samples with a mean dissolved oxygen level of 7.20 mg/L and a sample standard deviation of 0.60 mg/L, a 99% confidence interval requires df=8df = 8. The critical t-value for α/2=0.005\alpha/2 = 0.005 and df=8df = 8 is 3.355. The standard error is 0.60/9=0.200.60/\sqrt{9} = 0.20 mg/L, resulting in a margin of error of 3.355×0.20=0.6713.355 \times 0.20 = 0.671 mg/L. The interval is 7.20±0.6717.20 \pm 0.671, or [6.529 mg/L, 7.871 mg/L 20.

4.3 CI for population proportion

A confidence interval for a population proportion (pp) is constructed using the sample proportion (p^\hat{p}) and the z-distribution, provided that np^≥10n\hat{p} \ge 10 and n(1−p^)≥10n(1-\hat{p}) \ge 10 21.

  • Point estimate (p^\hat{p}): The number of successes divided by the sample size.
  • Critical z-value: Determined by the desired confidence level.
  • Standard error: Calculated using the formula p^(1−p^)n\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}.
  • Margin of error (MEME): The product of the critical z-value and the standard error.
  • Confidence interval: The point estimate (p^\hat{p}) plus or minus the margin of error.

📝 A sample of 400 smartphones showed 48 with display blemishes. The point estimate p^=48/400=0.12\hat{p} = 48/400 = 0.12. For a 90% confidence interval, the critical z-value is 1.645. The standard error is (0.12)(0.88)/400≈0.01625\sqrt{(0.12)(0.88)/400} \approx 0.01625. The margin of error is 1.645×0.01625≈0.02671.645 \times 0.01625 \approx 0.0267. The interval is 0.12±0.02670.12 \pm 0.0267, or [0.0933, 0.1467 21.

4.4 Sample size determination

Determining the appropriate sample size (nn) is crucial for ensuring that a study has sufficient power to estimate a population parameter with a desired margin of error (EE) and confidence level 18.

ParameterFormulaNotes
Meann=(zα/2⋅σE)2n = (\frac{z_{\alpha/2} \cdot \sigma}{E})^2Requires an estimate of σ\sigma
Proportionn=(zα/2E)2p^(1−p^)n = (\frac{z_{\alpha/2}}{E})^2 \hat{p}(1-\hat{p})Use p^=0.50\hat{p} = 0.50 if no prior estimate is available

📝 To estimate mean blood recovery time within E=0.5E = 0.5 days with 95% confidence, given σ=2.1\sigma = 2.1 days, the required sample size is n=(1.960⋅2.10.5)2≈67.77n = (\frac{1.960 \cdot 2.1}{0.5})^2 \approx 67.77. Always round up, so n=68n = 68 patients. For estimating a proportion of users within E=0.03E = 0.03 with 95% confidence and no prior estimate of pp, use p^=0.5\hat{p} = 0.5. The required sample size is n=(1.9600.03)2(0.25)≈1067.11n = (\frac{1.960}{0.03})^2 (0.25) \approx 1067.11. Always round up, so n=1068n = 1068 users 22.

5. Unit 5: Decision Making & Hypothesis Testing

5.1 Hypothesis Testing Framework 23

Hypothesis testing is a statistical method used to make decisions about a population based on sample data. It involves a structured five-step process to evaluate claims or theories 23.

  • Hypotheses: The process begins by stating a null hypothesis (H0H_0), which represents the status quo or a statement of no effect, and an alternative hypothesis (HaH_a), which is the claim to be tested.
  • Significance level (α\alpha): This is the probability of rejecting the null hypothesis when it is actually true, typically set at 0.05, 0.01, or 0.10.
  • Test statistic: A value calculated from sample data to evaluate the hypotheses. The choice of test statistic depends on the type of data and whether the population standard deviation is known.
  • Rejection region or p-value: The rejection region defines the range of test statistic values that lead to rejecting H0H_0. Alternatively, the p-value is the probability of observing a test statistic as extreme as, or more extreme than, the one calculated, assuming H0H_0 is true.
  • Decision rule: If the test statistic falls within the rejection region, or if the p-value is less than or equal to α\alpha, the null hypothesis is rejected. Otherwise, there is insufficient evidence to reject H0H_0 23.
Test TypeFormulaDegrees of Freedom (df)
One-Sample Z-Test (mean, σ\sigma known)Z=xˉ−μ0σ/nZ = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}—
One-Sample t-Test (mean, σ\sigma unknown)t=xˉ−μ0s/nt = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}n−1n-1
One-Sample Proportion Z-TestZ=p^−p0p0(1−p0)/nZ = \frac{\hat{p} - p_0}{\sqrt{p_0(1-p_0)/n}}—

5.2 One-Sample Z-Test for a Mean (σ\sigma Known)

This test is used to evaluate a hypothesis about a population mean when the population standard deviation (σ\sigma) is known. The calculated Z-statistic is compared to a critical value to make a decision 24.

📝 A bottling machine is designed to dispense 500 mL with σ=15\sigma = 15 mL. A sample of 36 bottles has a mean of 505 mL. To test if the machine is overfilling at α=0.05\alpha = 0.05:

  • H0:μ≤500H_0: \mu \le 500 mL vs. Ha:μ>500H_a: \mu > 500 mL (right-tailed).
  • Critical Z-value for α=0.05\alpha = 0.05 (right-tailed) is +1.645+1.645.
  • Standard error: σxˉ=1536=2.5\sigma_{\bar{x}} = \frac{15}{\sqrt{36}} = 2.5 mL.
  • Test statistic: Zcalc=505−5002.5=+2.00Z_{calc} = \frac{505 - 500}{2.5} = +2.00.
  • Decision: Since Zcalc=2.00>1.645Z_{calc} = 2.00 > 1.645, reject H0H_0. There is sufficient evidence that the machine is overfilling 24.

5.3 One-Sample t-Test for a Mean (σ\sigma Unknown)

The one-sample t-test is applied when the population standard deviation (σ\sigma) is unknown and must be estimated from the sample standard deviation (ss). The test uses a t-distribution, which requires degrees of freedom (df=n−1df = n-1) 25.

📝 A supplier claims steel rods have a mean breaking force of at least 800 N. A sample of 16 rods has xˉ=785\bar{x} = 785 N and s=30s = 30 N. To test the claim at α=0.01\alpha = 0.01:

  • H0:μ≥800H_0: \mu \ge 800 N vs. Ha:μ<800H_a: \mu < 800 N (left-tailed).
  • Degrees of freedom: df=16−1=15df = 16 - 1 = 15.
  • Critical t-value for α=0.01\alpha = 0.01 (left-tailed, df=15df=15) is −2.602-2.602.
  • Standard error: SE=3016=7.5SE = \frac{30}{\sqrt{16}} = 7.5 N.
  • Test statistic: tcalc=785−8007.5=−2.00t_{calc} = \frac{785 - 800}{7.5} = -2.00.
  • Decision: Since tcalc=−2.00>−2.602t_{calc} = -2.00 > -2.602, fail to reject H0H_0. There is insufficient evidence to dispute the supplier's claim 25.

5.4 One-Sample Proportion Z-Test

This test is used to evaluate a hypothesis about a population proportion (pp). It compares a sample proportion (p^\hat{p}) to a hypothesized population proportion (p0p_0) using a Z-statistic 26.

📝 A website claims no more than 5% of users abandon carts (p≤0.05p \le 0.05). A sample of 400 sessions finds 32 abandoned carts. To test this claim at α=0.05\alpha = 0.05:

  • H0:p≤0.05H_0: p \le 0.05 vs. Ha:p>0.05H_a: p > 0.05 (right-tailed).
  • Sample proportion: p^=32400=0.08\hat{p} = \frac{32}{400} = 0.08.
  • Critical Z-value for α=0.05\alpha = 0.05 (right-tailed) is +1.645+1.645.
  • Standard error (under H0H_0): σ0=0.05(1−0.05)400≈0.010897\sigma_0 = \sqrt{\frac{0.05(1-0.05)}{400}} \approx 0.010897.
  • Test statistic: Zcalc=0.08−0.050.010897≈+2.75Z_{calc} = \frac{0.08 - 0.05}{0.010897} \approx +2.75.
  • Decision: Since Zcalc=2.75>1.645Z_{calc} = 2.75 > 1.645, reject H0H_0. There is overwhelming evidence that the true abandonment rate exceeds 5% 26.

6. Quick Reference Sheet (Cheatsheet)

6.1 Descriptive statistics

Descriptive statistics summarize and describe the main features of a dataset, including measures of central tendency and variability.

  • Sample mean (xˉ\bar{x}): the average of all data points in a sample, calculated as 1n∑xi\frac{1}{n}\sum x_i.
  • Sample variance (s2s^2): measures the average squared deviation from the mean, calculated as 1n−1∑(xi−xˉ)2\frac{1}{n-1}\sum(x_i - \bar{x})^2.
  • Sample standard deviation (ss): the square root of the sample variance, indicating the typical distance of data points from the mean.
  • z-Score: standardizes a data point by expressing it in terms of standard deviations from the mean, calculated as x−μσ\frac{x - \mu}{\sigma}.
  • Interquartile range (IQR): the range between the first quartile (Q1Q_1) and the third quartile (Q3Q_3), calculated as Q3−Q1Q_3 - Q_1.
  • Outlier fences: define the boundaries for identifying outliers in a dataset.
  • Lower fence (LF): Q1−1.5(IQR)Q_1 - 1.5(\text{IQR}).
  • Upper fence (UF): Q3+1.5(IQR)Q_3 + 1.5(\text{IQR}) 27.

📝 If Q1=10Q_1 = 10 and Q3=20Q_3 = 20, then IQR = 20−10=1020 - 10 = 10. The lower fence is 10−1.5(10)=−510 - 1.5(10) = -5, and the upper fence is 20+1.5(10)=3520 + 1.5(10) = 35. Any data point outside [−5,35][-5, 35] is an outlier.

6.2 Probability rules

Probability rules govern how probabilities are calculated and combined for events.

  • Complement rule: the probability of an event not occurring is 1 minus the probability of it occurring: P(Ac)=1−P(A)P(A^c) = 1 - P(A).
  • Addition rule: calculates the probability of either of two events occurring: P(A∪B)=P(A)+P(B)−P(A∩B)P(A \cup B) = P(A) + P(B) - P(A \cap B).
  • Conditional probability: the probability of event A occurring given that event B has already occurred: P(A∣B)=P(A∩B)P(B)P(A|B) = \frac{P(A \cap B)}{P(B)}.
  • Multiplication rule: calculates the probability of two events both occurring: P(A∩B)=P(A)⋅P(B∣A)=P(B)⋅P(A∣B)P(A \cap B) = P(A) \cdot P(B|A) = P(B) \cdot P(A|B).
  • Independence test: two events A and B are independent if the probability of their intersection equals the product of their individual probabilities: P(A∩B)=P(A)⋅P(B)P(A \cap B) = P(A) \cdot P(B).
  • Bayes' theorem: updates the probability of a hypothesis based on new evidence: P(Bj∣A)=P(Bj)P(A∣Bj)∑iP(Bi)P(A∣Bi)P(B_j|A) = \frac{P(B_j)P(A|B_j)}{\sum_i P(B_i)P(A|B_i)} 27.

6.3 Discrete and continuous distributions 28

This section covers key concepts for discrete and continuous probability distributions, including expected value, variance, and specific distribution types.

  • Discrete expected value (μ\mu): the weighted average of all possible outcomes in a discrete distribution: E[X]=∑xp(x)E[X] = \sum x p(x).
  • Discrete variance (σ2\sigma^2): measures the spread of a discrete distribution: ∑(x−μ)2p(x)=E[X2]−μ2\sum (x - \mu)^2 p(x) = E[X^2] - \mu^2.
  • Empirical rule: describes the percentage of data falling within certain standard deviations from the mean in a normal distribution.
  • 68% of data falls within μ±1σ\mu \pm 1\sigma.
  • 95% of data falls within μ±2σ\mu \pm 2\sigma.
  • 99.7% of data falls within μ±3σ\mu \pm 3\sigma.
  • Sampling distribution of the mean (CLT): states that for a sufficiently large sample size, the sampling distribution of the mean will be approximately normal, with μxˉ=μ\mu_{\bar{x}} = \mu and σxˉ=σn\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}} 28.
DistributionProbability Mass FunctionMeanVariance/Std. Dev.
BinomialP(X=k)=(nk)pk(1−p)n−kP(X=k) = \binom{n}{k}p^k(1-p)^{n-k}μ=np\mu = npσ=np(1−p)\sigma = \sqrt{np(1-p)}
PoissonP(X=k)=λke−λk!P(X=k) = \frac{\lambda^k e^{-\lambda}}{k!}μ=λ\mu = \lambdaσ2=λ\sigma^2 = \lambda

6.4 Confidence intervals

Confidence intervals provide a range of values within which a population parameter is likely to lie, based on a sample statistic.

  • General structure: a point estimate plus or minus the product of a critical value and the standard error.
  • Point estimate: the sample statistic used to estimate the population parameter.
  • Critical value: a value from a distribution (e.g., z or t) that corresponds to the desired confidence level.
  • Standard error: the standard deviation of the sampling distribution of the point estimate.
ParameterFormula for Confidence Interval
Mean (σ\sigma Known)xˉ±zα/2(σn)\bar{x} \pm z_{\alpha/2} \left(\frac{\sigma}{\sqrt{n}}\right)
Mean (σ\sigma Unknown)xˉ±tα/2,n−1(sn)\bar{x} \pm t_{\alpha/2, n-1} \left(\frac{s}{\sqrt{n}}\right)
Proportionp^±zα/2p^(1−p^)n\hat{p} \pm z_{\alpha/2} \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}
ParameterFormula for Sample Size
Meann=(zα/2⋅σE)2n = \left(\frac{z_{\alpha/2} \cdot \sigma}{E}\right)^2
Proportionn=(zα/2E)2p^(1−p^)n = \left(\frac{z_{\alpha/2}}{E}\right)^2 \hat{p}(1-\hat{p}) (use 0.25 if p^\hat{p} unknown)
  • Common critical z-values:
  • 90% Confidence: z0.05=1.645z_{0.05} = 1.645.
  • 95% Confidence: z0.025=1.960z_{0.025} = 1.960.
  • 99% Confidence: z0.005=2.576z_{0.005} = 2.576 29.

6.5 Hypothesis testing reference

Hypothesis testing is a statistical method used to make decisions about a population based on sample data.

  • Hypothesis formats: define the null (H0H_0) and alternative (HaH_a) hypotheses.
  • Two-tailed: H0:θ=θ0H_0: \theta = \theta_0 vs. Ha:θ≠θ0H_a: \theta \neq \theta_0.
  • Right-tailed: H0:θ≤θ0H_0: \theta \le \theta_0 vs. Ha:θ>θ0H_a: \theta > \theta_0.
  • Left-tailed: H0:θ≥θ0H_0: \theta \ge \theta_0 vs. Ha:θ<θ0H_a: \theta < \theta_0.
  • Decision rule: determines whether to reject the null hypothesis.
  • Reject H0H_0 if the p-value is less than or equal to the significance level (α\alpha).
  • Reject H0H_0 if the test statistic falls into the rejection region.
ParameterTest Statistic Formula
Mean (σ\sigma known)Z=xˉ−μ0σ/nZ = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}
Mean (σ\sigma unknown)t=xˉ−μ0s/nt = \frac{\bar{x} - \mu_0}{s/\sqrt{n}} with df=n−1df = n-1
ProportionZ=p^−p0p0(1−p0)/nZ = \frac{\hat{p} - p_0}{\sqrt{p_0(1-p_0)/n}} (using hypothesized p0p_0)
  • Errors in hypothesis testing:
  • Type I error (α\alpha): rejecting H0H_0 when it is actually true (a false alarm).
  • Type II error (β\beta): failing to reject H0H_0 when it is false (a missed detection).
  • Power: the probability of correctly rejecting H0H_0 when it is false, calculated as 1−β1 - \beta 30.

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

See also