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 , , , or , but cannot yield or .
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 , but true physical height can be , , 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 versus ), yet the underlying construct remains continuous.
Proportions and Percentages:
Percentages and proportions express the identical mathematical relationship: a proportion is scaled from to , whereas a percentage scales that proportion out of .
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 three-point shots and made , yielding a shooting proportion of ().
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 .
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 ():
Defined as the sum of all individual observations divided by the total number of observations ():
Example: For the test scores of five students, summing the individual scores and dividing by results in a mean test score of .
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 workers where travel by car, by bicycle, by walking, and by public transport, the mode is car ( 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:
Interquartile Range ():
Represents the spread of the middle of the data.
Calculated as the difference between the third quartile (, the percentile) and the first quartile (, the percentile):
Exactly of observations fall below , fall above , and the middle 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 from the mean.
Computationally, standard deviation is the quadratic mean of distances from the mean.
Variance is defined mathematically as the squared standard deviation ( or ).
Two formulas exist for standard deviation based on the scope of data:
Population Standard Deviation (): Used when data covers the entire target population:
Sample Standard Deviation (): Used when estimating the population parameter from sample survey data or clinical trials, incorporating Bessel's correction to remove bias:
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 employees recording transport modes (car, bicycle, walk, public transport) produces counts such as 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 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 .
Tallest player: Boban Marjanović at .
The bulk of the player population clusters near the center at or , meaning the probability of randomly drawing a player of average height is substantially higher than drawing an extreme at or .
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 , , and 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 .
Individual Draw versus Sample Mean of :
Drawing an individual player at random can yield an extreme value such as Isaiah Thomas at .
Drawing a random sample of players and calculating their mean height makes an average of 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 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 =
Mean: Population parameter = , Sample statistic =
Standard deviation: Population parameter = , Sample statistic =
Proportion: Population parameter = (or ), Sample statistic =
Correlation coefficient: Population parameter = , Sample statistic =
Regression gradient/slope: Population parameter = , Sample statistic =
Point Estimation and Parameter Uncertainty:
An empirical sample statistic serves as the primary point estimate for an unknown parameter .
Because any sample exhibits random sampling variation, the sample statistic will fluctuate above or below the true parameter across repeated samples.
Confidence Intervals ( Confidence Intervals):
A confidence interval establishes an estimated range constructed symmetrically around the sample point estimate such that, under repeated sampling, of such constructed intervals contain the true population parameter .
Comparative Case Study (Steph Curry versus Meyers Leonard, 2018–19 Season, 12–13 Games In):
Steph Curry: Recorded successful three-point shots out of attempts (). With a large sample size (), his sampling variance is small, producing a narrow confidence interval tightly bound around .
Meyers Leonard: Recorded successful three-point shots out of attempts (). Although his point estimate () exceeds Curry's (), his small sample size () generates a wide confidence interval.
Analytical Deduction: Because Leonard's confidence interval spans a wide range that extends below Curry's interval, the higher point estimate of does not provide statistical certainty that Leonard's true long-term parameter 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., adults randomly selected from across the United States).
Philosophical and Procedural Architecture of Hypothesis Testing:
Step 1: The Research / Alternative Hypothesis ( or ):
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 : ).
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 ():
Posits the baseline condition of no effect, no difference, or the reverse condition in the population (e.g., , or ; 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, 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 is true.
Meyers Leonard Binomial Setup (, assuming ):
The expected number of successful shots is .
Getting or successes has the highest probability of occurrence.
Getting or successes is less likely, and extreme counts such as or are improbable under .
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 ():
A predetermined probability threshold defining the rejection region, conventionally set at ().
The rejection region occupies the extreme tail(s) comprising the critical area of the null probability distribution.
Empirical Evaluation of Meyers Leonard ( of Makes):
Leonard's observed statistic of successes occupies the top of the null distribution ().
Because , the test statistic does not enter the upper rejection region.
Conclusion: The sample provides insufficient evidence to reject the null hypothesis. An outcome of out of shots is entirely consistent with random variation from a true shooter.
If Leonard had scored out of , the resulting test statistic would yield a small p-value entering the rejection region, justifying rejection of .
Mathematical Relationship Between p-value and :
If (), the sample statistic falls inside the rejection region, yielding a statistically significant result and leading to the rejection of .
If (), the sample statistic falls outside the rejection region, failing to reject .
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" . 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 ():
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 ():
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 .
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 , 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 for publication.
The Mathematical Mechanism of P-Hacking:
A significance threshold of accepts a probability () of committing a Type I error purely through random sampling noise.
If an investigator tests independent relationships, the probability of obtaining at least one spuriously significant result increases markedly.
If an investigator tests independent relationships where no true effects exist, the expected number of false positive outcomes is:
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.