ps1007 #1 Introductory Statistics: Descriptive and Inferential Concepts

Foundations of Statistics and Data Classification

  • Definition and Scope of Statistics:

    • Statistics is the science dealing with the collection, analysis, and presentation of data.

    • A variable is any characteristic, number, or quantity that can be measured or counted (e.g., gender, preferred newspaper, or blood pressure changes).

  • Data Collection and Tabular Organization:

    • Data collection can occur through observational methods (such as surveys and questionnaires) or experimental methods (such as clinical drug trials testing the effect of two distinct pharmaceuticals on blood pressure).

    • In a standard tabular survey layout:

    • Each column corresponds to a specific variable (e.g., Column 1 = Gender, Column 2 = Preferred Newspaper).

    • Each row represents an individual respondent or observation (e.g., Row 1: Male, New York Post; Row 2: Female, USA Today).

    • Observational datasets often involve sending questionnaires and waiting a defined period (e.g., two weeks) before assembling responses into a data matrix.

  • Data Typology:

    • Data is divided into two primary overarching classes: categorical data and numerical data.

    • Categorical Data: Represents qualitative characteristics or groups.

    • Nominal Categorical Data: Categories possess no intrinsic or mathematical ordering. The sample space encompasses all possible distinct outcomes without rank. For example, asking which National Basketball Association (NBA) team Steph Curry plays for produces a sample space of {Atlanta Hawks, Boston Celtics, …, Golden State Warriors}. The order of presentation is arbitrary.

    • Ordinal Categorical Data: Categories have a natural, logical sequence or relative rank, but the intervals between categories are not numerically quantifiable. For example, basketball player positions (Guard, Forward, Center; or Point Guard, Shooting Guard, etc.) represent ordinal data: Guards play in the back court, Forwards play closer to the ring, and Centers play underneath the ring, which also corresponds to an increasing progression in physical height from shortest to tallest.

    • Numerical Data: Represents quantifiable measurements or counts.

    • Discrete Numerical Data: Values can only assume specific, distinct, isolated points along an axis, typically non-negative integers. Intermediate fractional values are impossible. For example, counting how many free throws Steph Curry misses in a game can yield 00, 11, 22, or 33, but cannot yield 1.51.5 or 2.32.3.

    • Continuous Numerical Data: Values can take on any real value along a continuous scale and can theoretically be subdivided into infinite decimal places. For example, Steph Curry's height may be documented as 191 cm191\,\text{cm}, but true physical height can be 191.3 cm191.3\,\text{cm}, 191.217 cm191.217\,\text{cm}, or further decimal subdivisions. In practical measurement, continuous variables are often rounded and recorded discretely (e.g., whole centimeters or whole inches, ignoring fractions such as 6 ft 312 in6\text{ ft } 3\frac{1}{2}\text{ in} versus 6 ft 323 in6\text{ ft } 3\frac{2}{3}\text{ in}), yet the underlying construct remains continuous.

  • Proportions and Percentages:

    • Percentages and proportions express the identical mathematical relationship: a proportion is scaled from 00 to 11, whereas a percentage scales that proportion out of 100100.

    • Individual underlying events generate nominal categorical outcomes (e.g., each three-point shot attempt results in a binary nominal outcome: "made" or "missed").

    • A proportion aggregates these binary nominal events into a single numerical summary statistic. For instance, in the 2018–19 season, Steph Curry attempted 128128 three-point shots and made 6161, yielding a shooting proportion of 0.47660.4766 (47.66%47.66\%).

    • Whether a proportion constitutes discrete or continuous data depends on context: while computed from discrete counts, long-run proportions can theoretically take infinite decimal values along the interval [0,1][0, 1].

Descriptive Statistics: Measures of Central Tendency and Dispersion

  • Role of Descriptive Statistics:

    • Descriptive statistics aims to describe, summarize, and display a collected dataset in a meaningful, informative manner.

    • Descriptive statistics is strictly limited to characterizing the sample data at hand; it does not draw conclusions or generalize findings to a broader population.

    • Four core components of descriptive statistics include measures of central tendency, measures of dispersion, frequency/contingency tables, and graphical charts.

  • Measures of Central Tendency:

    • Measures of central tendency provide a single representative value that identifies the central location around which data points cluster.

    • Arithmetic Mean (xˉ\bar{x}):

    • Defined as the sum of all individual observations divided by the total number of observations (nn):       xˉ=1n∑i=1nxi\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i

    • Example: For the test scores of five students, summing the individual scores and dividing by 55 results in a mean test score of 86.686.6.

    • Sensitivity to Outliers: The mean is not robust; extreme values or outliers exert a disproportionate influence, pulling the mean toward the extreme tail.

    • Median:

    • Defined as the middle numerical value when all observations are arranged in ascending order.

    • Calculation rule:

      • If the dataset has an odd number of observations, the median is the single value located precisely in the middle position.

      • If the dataset has an even number of observations, the median is the arithmetic mean of the two central values.

    • Robustness to Outliers: The median is resistant to extreme values. In a lineup of individuals ordered by height, altering the height of the tallest individual has no effect on the identity or value of the middle observation.

    • Mode:

    • Defined as the value or category that appears with the highest frequency in a dataset.

    • Example: In an employee transportation survey of 3030 workers where 1414 travel by car, 66 by bicycle, 55 by walking, and 55 by public transport, the mode is car (1414 occurrences).

  • Measures of Dispersion:

    • Measures of dispersion describe the variability, spread, or scattering of data points around their central value.

    • Range:

    • The simplest measure of dispersion, calculated as the mathematical difference between the maximum and minimum values in the dataset:       Range=xmax⁡−xmin⁡\text{Range} = x_{\max} - x_{\min}

    • Interquartile Range (IQRIQR):

    • Represents the spread of the middle 50%50\% of the data.

    • Calculated as the difference between the third quartile (Q3Q_3, the 75th75\text{th} percentile) and the first quartile (Q1Q_1, the 25th25\text{th} percentile):       IQR=Q3−Q1IQR = Q_3 - Q_1

    • Exactly 25%25\% of observations fall below Q1Q_1, 25%25\% fall above Q3Q_3, and the middle 50%50\% reside within the interquartile range.

    • Variance and Standard Deviation:

    • The standard deviation measures the average distance (deviation) of data points from their arithmetic mean. For example, patient height measurements might exhibit an average deviation of 11.5 cm11.5\,\text{cm} from the mean.

    • Computationally, standard deviation is the quadratic mean of distances from the mean.

    • Variance is defined mathematically as the squared standard deviation (σ2\sigma^2 or s2s^2).

    • Two formulas exist for standard deviation based on the scope of data:

      • Population Standard Deviation (σ\sigma): Used when data covers the entire target population:         σ=1n∑i=1n(xi−xˉ)2\sigma = \sqrt{\frac{1}{n}\sum_{i=1}^{n}(x_i - \bar{x})^2}

      • Sample Standard Deviation (ss): Used when estimating the population parameter from sample survey data or clinical trials, incorporating Bessel's correction to remove bias:         s=1n−1∑i=1n(xi−xˉ)2s = \sqrt{\frac{1}{n-1}\sum_{i=1}^{n}(x_i - \bar{x})^2}

  • Comparison of Central Tendency versus Dispersion:

    • In clinical measurements (such as blood pressure across a patient cohort), central tendency identifies the benchmark central level around which readings concentrate.

    • Measures of dispersion indicate whether individual readings are tightly clustered around the central point or widely dispersed.

Tabular and Graphical Representations of Data

  • Frequency Tables:

    • A frequency table displays how often each distinct category or value occurs in a single categorical variable.

    • Example: A commuter survey administered to 3030 employees recording transport modes (car, bicycle, walk, public transport) produces counts such as 1414 for car, demonstrating directly that car is the most common transit mode.

    • Tables can display raw counts (frequencies) and relative frequencies (percentages).

  • Contingency Tables (Cross-Tabulations):

    • A contingency table analyzes and compares the bivariate relationship between two categorical variables.

    • Row headers represent the categories of one variable, while column headers represent the categories of the second variable.

    • Intersection cells contain the joint frequency of observations matching that specific category pair.

    • Example: A company operating two production sites (Detroit and Cleveland) evaluates transport mode by location. A cell showing that the combination of "Car" and "Detroit" was recorded 66 times establishes the bivariate distribution across facilities.

  • Graphical Visualization Techniques:

    • Software platforms like DataTab (datadepth.net) automatically identify measurement scales (levels of measurement) and generate corresponding charts.

    • Visualizations by data structure:

    • Single Categorical Variable: Displayed via vertical or horizontal bar charts (plotting raw frequencies or percentages) and pie charts.

    • Two Categorical Variables: Displayed via contingency tables, grouped bar charts, or stacked bar charts.

    • Continuous Variable Grouped by Categorical Variable: Visualized through bar charts where bar heights display group means, accompanied by error bars showing dispersion.

    • Continuous Distributions: Evaluated through histograms, box plots, violin plots, and rainbow plots to depict skewness, spread, and quartile boundaries.

Probability Distributions and Sampling Theory

  • Probability Density Functions (PDF):

    • A Probability Density Function models continuous variables across a population. It describes the relative likelihood of selecting an individual observation at any given value along the continuum.

    • NBA Player Height Case Study (2018–19 Season):

    • Smallest player: Isaiah Thomas at 5 ft 9 in5\text{ ft } 9\text{ in}.

    • Tallest player: Boban Marjanović at 7 ft 3 in7\text{ ft } 3\text{ in}.

    • The bulk of the player population clusters near the center at 6 ft 5 in6\text{ ft } 5\text{ in} or 6 ft 6 in6\text{ ft } 6\text{ in}, meaning the probability of randomly drawing a player of average height is substantially higher than drawing an extreme at 5 ft 9 in5\text{ ft } 9\text{ in} or 7 ft 3 in7\text{ ft } 3\text{ in}.

  • Distribution Shapes:

    • Normal Distribution (Bell Curve): A symmetrical distribution where the mean, median, and mode coincide at the center. The bulk of observations concentrate around the midpoint, and probabilities taper smoothly and symmetrically toward both tails.

    • Uniform Distribution: A rectangular distribution indicating an equal probability across all values across the entire range (e.g., an unrealistic scenario where players at 5 ft 9 in5\text{ ft } 9\text{ in}, 6 ft 6 in6\text{ ft } 6\text{ in}, and 7 ft 3 in7\text{ ft } 3\text{ in} exist in equal proportions).

    • Bimodal Distribution: A distribution displaying two distinct peaks (two local modes).

    • Skewed Distribution: An asymmetric distribution with an elongated tail on one side:

    • Left-Skewed (Negatively Skewed): The elongated tail points toward lower values on the left, while the bulk of observations clusters at the higher end.

    • Right-Skewed (Positively Skewed): The elongated tail points toward higher values on the right, with observations clustering at the lower end.

  • Sampling Distributions and Sample Size Dynamics:

    • A sampling distribution represents the theoretical probability distribution of a calculated sample statistic (such as the sample mean) obtained from repeated random samples of size nn.

    • Individual Draw versus Sample Mean of n=10n = 10:

    • Drawing an individual player at random can yield an extreme value such as Isaiah Thomas at 5 ft 9 in5\text{ ft } 9\text{ in}.

    • Drawing a random sample of n=10n = 10 players and calculating their mean height makes an average of 5 ft 9 in5\text{ ft } 9\text{ in} extraordinarily improbable. Even if an extreme individual is drawn, subsequent selections from the bulk of the population pull the group average back toward the population center.

    • Mathematical Implications:

    • The sampling distribution of the mean shares the identical mean as the underlying population distribution.

    • The sampling distribution has a substantially smaller variance and standard error ("skinnier" curve) than the population distribution.

    • As sample size nn increases, the probability of observing extreme sample statistics diminishes, reducing uncertainty.

Statistical Parameters, Estimation, and Confidence Intervals

  • Parameters versus Sample Statistics:

    • Population Parameters: Fixed, unknowable constant values that describe an entire population. They are conventionally designated by Greek letters.

    • Sample Statistics: Empirical values calculated from sample data that serve as point estimates for unknown population parameters. They are conventionally designated by Roman letters.

    • Canonical Notation Mapping:

    • General parameter: Population = θ\theta

    • Mean: Population parameter = μ\mu, Sample statistic = xˉ\bar{x}

    • Standard deviation: Population parameter = σ\sigma, Sample statistic = ss

    • Proportion: Population parameter = π\pi (or θ\theta), Sample statistic = pp

    • Correlation coefficient: Population parameter = ρ\rho, Sample statistic = rr

    • Regression gradient/slope: Population parameter = β\beta, Sample statistic = bb

  • Point Estimation and Parameter Uncertainty:

    • An empirical sample statistic serves as the primary point estimate for an unknown parameter θ\theta.

    • Because any sample exhibits random sampling variation, the sample statistic will fluctuate above or below the true parameter across repeated samples.

  • Confidence Intervals (95%95\% Confidence Intervals):

    • A 95%95\% confidence interval establishes an estimated range constructed symmetrically around the sample point estimate such that, under repeated sampling, 95%95\% of such constructed intervals contain the true population parameter θ\theta.

    • Comparative Case Study (Steph Curry versus Meyers Leonard, 2018–19 Season, 12–13 Games In):

    • Steph Curry: Recorded 6161 successful three-point shots out of 128128 attempts (p=0.4766p = 0.4766). With a large sample size (n=128n = 128), his sampling variance is small, producing a narrow 95%95\% confidence interval tightly bound around 0.47660.4766.

    • Meyers Leonard: Recorded 99 successful three-point shots out of 1515 attempts (p=0.600p = 0.600). Although his point estimate (0.6000.600) exceeds Curry's (0.47660.4766), his small sample size (n=15n = 15) generates a wide 95%95\% confidence interval.

    • Analytical Deduction: Because Leonard's confidence interval spans a wide range that extends below Curry's interval, the higher point estimate of 0.6000.600 does not provide statistical certainty that Leonard's true long-term parameter θ\theta exceeds Curry's.

Inferential Statistics and Classical Hypothesis Testing

  • Core Purpose of Inferential Statistics:

    • Inferential statistics allows researchers to draw rigorous mathematical inferences and make educated deductions about an entire population based on empirical data observed in a sample.

    • Definition of Population versus Sample:

    • Population: The comprehensive group of interest (e.g., all adults in the United States, or all patients diagnosed with hypertension in the United States).

    • Sample: A representative subset chosen from the population (e.g., 150150 adults randomly selected from across the United States).

  • Philosophical and Procedural Architecture of Hypothesis Testing:

    • Step 1: The Research / Alternative Hypothesis (H1H_1 or HaH_a):

    • Represents the substantive claim or effect for which evidence is being sought (e.g., a pharmaceutical compound alters blood pressure, or Meyers Leonard's true shooting proportion exceeds 50%50\%: θ>0.5\theta > 0.5).

    • Classical hypothesis testing cannot validate the alternative hypothesis directly; instead, it tests whether empirical evidence warrants rejecting its logical opposite.

    • Step 2: The Null Hypothesis (H0H_0):

    • Posits the baseline condition of no effect, no difference, or the reverse condition in the population (e.g., θ≤0.5\theta \le 0.5, or θ=0.5\theta = 0.5; or that average blood pressure is identical between medicated and non-medicated groups).

    • Conservative Presumption: Statisticians maintain a conservative posture analogous to the judicial presumption of innocence. A defendant is presumed innocent until evidence establishes guilt beyond a reasonable doubt; similarly, H0H_0 is maintained until sample data is sufficiently extreme to justify its rejection.

    • Step 3: Calculating Sample Deviation Under the Null Model:

    • A probability distribution is constructed under the strict condition that H0H_0 is true.

    • Meyers Leonard Binomial Setup (n=15n = 15, assuming H0:θ=0.5H_0: \theta = 0.5):

      • The expected number of successful shots is 15×0.5=7.515 \times 0.5 = 7.5.

      • Getting 77 or 88 successes has the highest probability of occurrence.

      • Getting 66 or 99 successes is less likely, and extreme counts such as 1414 or 1515 are improbable under H0H_0.

  • The p-value and Rejection Regions:

    • Definition of the p-value: The probability of obtaining a sample result as extreme as, or more extreme than, the observed sample result, assuming that the null hypothesis is strictly true.

    • Level of Significance (α\alpha):

    • A predetermined probability threshold defining the rejection region, conventionally set at α=0.05\alpha = 0.05 (5%5\%).

    • The rejection region occupies the extreme tail(s) comprising the critical 5%5\% area of the null probability distribution.

    • Empirical Evaluation of Meyers Leonard (99 of 1515 Makes):

    • Leonard's observed statistic of 99 successes occupies the top 30.4%30.4\% of the null distribution (p=0.304p = 0.304).

    • Because p=0.304>0.05p = 0.304 > 0.05, the test statistic does not enter the upper 5%5\% rejection region.

    • Conclusion: The sample provides insufficient evidence to reject the null hypothesis. An outcome of 99 out of 1515 shots is entirely consistent with random variation from a true 50%50\% shooter.

    • If Leonard had scored 1212 out of 1515, the resulting test statistic would yield a small p-value entering the rejection region, justifying rejection of H0H_0.

    • Mathematical Relationship Between p-value and α\alpha:

    • If p<αp < \alpha (p<0.05p < 0.05), the sample statistic falls inside the rejection region, yielding a statistically significant result and leading to the rejection of H0H_0.

    • If p≥αp \ge \alpha (p≥0.05p \ge 0.05), the sample statistic falls outside the rejection region, failing to reject H0H_0.

  • Cardinal Linguistic and Methodological Rules:

    • Never Say "Prove": A hypothesis test never proves that an alternative hypothesis is true, nor does it prove that a null hypothesis is true. It merely quantifies whether the observed data is probable or improbable under the null model.

    • Never Say "Accept the Null Hypothesis": When sample evidence is insufficient, the correct decision is "fail to reject" or "do not reject" H0H_0. In a courtroom, a verdict of "not guilty" does not declare the defendant innocent; it establishes only that guilt was not proven beyond reasonable doubt.

  • Decision Errors in Hypothesis Testing:

    • Type I Error (α\alpha):

    • Occurs when a true null hypothesis is incorrectly rejected (a false positive).

    • Reality: The null hypothesis is true (e.g., a drug has zero clinical effect on blood pressure).

    • Decision: The sample randomly deviates far from the expected mean by coincidence, leading the researcher to mistakenly conclude the drug works.

    • Type II Error (β\beta):

    • Occurs when a false null hypothesis is not rejected (a false negative).

    • Reality: The null hypothesis is false (e.g., the drug actually lowers blood pressure).

    • Decision: The sample randomly fails to exhibit a sufficient effect size, leading the researcher to mistakenly fail to reject H0H_0.

Research Integrity, Automated Computation, and P-Hacking

  • Automated Computational Platforms (DataTab / datadepth.net):

    • When data is loaded into computational tools, the software determines measurement scales and recommends suitable inferential tests:

    • Categorical versus categorical variables: Evaluated via the Chi-Square Test.

    • Categorical grouping variable versus continuous dependent variable across multiple groups: Evaluated via Analysis of Variance (ANOVA).

    • Software enables the evaluation of distribution assumptions to decide between parametric tests (which assume specific underlying distributions like normality) and non-parametric tests (which do not).

  • Methodological Standards in Scientific Research:

    • Sound Research Design: The researcher deduces a theoretical hypothesis a priori (e.g., theorizing specifically that red wine consumption alters cancer risk), collects targeted data, and executes a single hypothesis test. If p<0.05p < 0.05, the result provides legitimate empirical evidence supporting the effect.

    • Flawed Research Design (P-Hacking / Data Dredging): The researcher gathers large datasets containing extensive variables (e.g., surveying cancer patients on smoking, red wine, dietary habits, exercise, proximity to main roads) without an a priori hypothesis, conducts tests across all possible variable pairs, and cherry-picks only those comparisons that yield p<0.05p < 0.05 for publication.

  • The Mathematical Mechanism of P-Hacking:

    • A significance threshold of α=0.05\alpha = 0.05 accepts a 5%5\% probability (1 in 201\text{ in } 20) of committing a Type I error purely through random sampling noise.

    • If an investigator tests 1010 independent relationships, the probability of obtaining at least one spuriously significant result increases markedly.

    • If an investigator tests 2020 independent relationships where no true effects exist, the expected number of false positive outcomes is:     20×0.05=120 \times 0.05 = 1

    • By running multiple exploratory tests and presenting the single significant result as an intentional target, p-hacking invalidates scientific rigor by marketing random sampling variation as substantive discovery.