Biostat - Notes on Data Types, Description, and p-values
Description before inference
The speaker emphasizes that the science part of data analysis begins with describing what you have before making any inference.
You must describe the data you collected and examine what you observe prior to drawing conclusions or performing statistical tests.
Data types: categorical vs quantitative
Categorical data
Definition: data that represent categories or groups rather than numeric quantities.
Often described with counts, percentages, and modes rather than means.
Subtypes: nominal (no inherent order) and ordinal (ordered categories).
Quantitative data
Definition: numerical measurements that express quantity.
Subtypes: discrete (countable values) and continuous (any value within a range).
In the transcript, examples are given to illustrate these types:
Categorical data examples (often responses are words):
Race
Gender
State of birth
Country of birth
Model of car
Quantitative data example:
Height (e.g., how tall you are)
Data collection and response formats from the transcript
For categorical questions, respondents often provide word answers (text labels).
For quantitative questions, responses are numeric (e.g., inches, centimeters, or other units).
P-values and statistical inference
The speaker references the p-value as part of data analysis when a computer program crunches the data.
Concept: a small p-value indicates evidence against the null hypothesis, making the observed data appear unlikely under the null.
Formal definitions (to connect to the practical idea):
General idea: the p-value is the probability of obtaining data as extreme as observed, assuming the null hypothesis is true.
For a two-sided test with a test statistic T and observed value tobs:
p-value=P(∣T∣≥∣t</em>obs∣∣H0)
In many standard tests (e.g., tests for proportions or means), the p-value is computed by comparing the observed statistic to a reference distribution under the null hypothesis.
Practical conventions (explicit or implied):
A common significance level is α=0.05; if p≤α, the result is considered statistically significant and the null hypothesis is rejected.
Note: a small p-value does not imply large practical importance; it depends on sample size and effect size.
Large samples can yield small p-values for trivial effects; conversely, meaningful effects in small samples might not reach significance.
Illustrative formulas for common tests
Proportion test (example):
Test statistic (z-form) for testing H<em>0:p=p</em>0 with sample proportion p^ and sample size n: z=np</em>0(1−p0)p^−p<em>0
Corresponding two-sided p-value: p-value=P(∣Z∣≥∣z∣) where Z∼N(0,1) under H0.
General two-sided p-value form (abstract): p-value=P(∣T∣≥∣t<em>obs∣∣H</em>0)
How data type informs analysis options
Descriptive summaries depend on data type:
Categorical: frequencies, relative frequencies, bar charts, contingency tables.
Quantitative: measures of central tendency (mean, median, mode) and dispersion (range, variance, standard deviation, IQR), histograms, box plots.
Choice of statistical test depends on data type and distribution assumptions:
Categorical data lead to chi-square tests, Fisher exact test, logistic regression, etc.
Quantitative data lead to t-tests, ANOVA, regression, nonparametric alternatives when assumptions fail.
Ethical, philosophical, and practical implications
Ethical considerations when collecting demographic data (race, gender, birthplace, etc.):
Privacy and confidentiality
Informed consent and data protection
Potential for bias or misuse of data in reporting or decision-making
Practical implications:
Always describe data first to avoid overreaching conclusions
Be mindful of sample size, measurement units, and data quality when interpreting p-values
Report both statistical significance (p-values) and practical significance (effect sizes, context)
Connections to broader principles and real-world relevance
Links to foundational principles:
Measurement and data quality affect all subsequent inference
Understanding the type of data guides appropriate descriptive statistics and inferential tests
Statistical evidence must be interpreted in the context of study design, sample size, and practical importance
Real-world relevance:
Surveys routinely collect categorical data (demographics) and quantitative data (heights, incomes, scores)
Proper interpretation of p-values is crucial in research, policy, and science to avoid over- or underestimating effects
Quick reference: key takeaways
Before inferring anything, describe the data you have.
Categorical data: nominal/ordinal categories, answers like race, gender, location, car model.
Quantitative data: numerical measurements, like height.
Small p-values indicate evidence against the null hypothesis, but are influenced by sample size and may not imply practical importance.
Use p-value=P(∣T∣≥∣t<em>obs∣∣H</em>0) for two-sided tests; for a proportion test, a typical form is z=np</em>0(1−p0)p^−p<em>0 with the corresponding p-value from Z∼N(0,1).
Always connect statistical findings to real-world meaning and ethical considerations.