1---2name: statistical-analysis3description: Statistical methods and tests, hypothesis testing, A/B testing frameworks, time series analysis, and experimental design4---5
6# Statistical Analysis
7
8## Statistical Methods and Tests
9
10### Descriptive Statistics
11- **Measures of Central Tendency**: Mean, median, mode
12- **Measures of Dispersion**: Variance, standard deviation, range, interquartile range
13- **Distribution Shape**: Skewness, kurtosis
14- **Correlation**: Pearson, Spearman, Kendall correlation coefficients
15- **Covariance**: Measure of joint variability
16
17### Probability Distributions
18- **Normal Distribution**: Bell curve, symmetric, defined by mean and standard deviation
19- **Binomial Distribution**: Number of successes in n independent trials
20- **Poisson Distribution**: Number of events in fixed interval
21- **Exponential Distribution**: Time between events in Poisson process
22- **Chi-Square Distribution**: Sum of squared normal variables
23
24### Inferential Statistics
25- **Confidence Intervals**: Range of values likely to contain population parameter
26- **Hypothesis Testing**: Formal procedure for testing claims about populations
27- **p-values**: Probability of observing results as extreme as current, assuming null hypothesis
28- **Statistical Power**: Probability of correctly rejecting false null hypothesis
29- **Effect Size**: Magnitude of difference or relationship
30
31## Hypothesis Testing
32
33### Hypothesis Structure
34- **Null Hypothesis (H0)**: Default assumption, no effect or difference
35- **Alternative Hypothesis (H1)**: Claim to be tested, effect or difference exists
36- **Type I Error**: Rejecting true null hypothesis (false positive)
37- **Type II Error**: Failing to reject false null hypothesis (false negative)
38- **Significance Level (α)**: Threshold for rejecting null hypothesis (typically 0.05)
39
40### Common Statistical Tests
41- **t-test**: Compare means between two groups
42 - One-sample t-test: Compare sample mean to known value
43 - Independent t-test: Compare means of two independent groups
44 - Paired t-test: Compare means of paired samples
45- **ANOVA**: Compare means across multiple groups
46 - One-way ANOVA: Single factor
47 - Two-way ANOVA: Two factors with interaction
48- **Chi-Square Test**: Test independence between categorical variables
49- **Mann-Whitney U Test**: Non-parametric alternative to t-test
50- **Kruskal-Wallis Test**: Non-parametric alternative to ANOVA
51
52### Multiple Testing Correction
53- **Bonferroni Correction**: Divide α by number of tests
54- **False Discovery Rate (FDR)**: Control proportion of false positives
55- **Benjamini-Hochberg**: Adaptive FDR control
56
57## A/B Testing Frameworks
58
59### Experimental Design
60- **Control Group**: Receives current version or no treatment
61- **Treatment Group**: Receives new version or treatment
62- **Random Assignment**: Randomly assign subjects to groups
63- **Sample Size Calculation**: Determine required sample size for desired power
64- **Stratification**: Balance groups on important covariates
65
66### Metrics Selection
67- **Primary Metric**: Main measure of success
68- **Secondary Metrics**: Additional measures of interest
69- **Guardrail Metrics**: Ensure no negative impact on important KPIs
70- **Binary Metrics**: Conversion, click-through rate
71- **Continuous Metrics**: Revenue, time on page
72
73### Statistical Significance
74- **Two-tailed Test**: Test for difference in either direction
75- **One-tailed Test**: Test for difference in specific direction
76- **Confidence Intervals**: Provide range of plausible values
77- **Minimum Detectable Effect (MDE)**: Smallest effect detectable with given power
78
79### Common Pitfalls
80- **Peeking**: Checking results before experiment ends
81- **Simpson's Paradox**: Trend appears in groups but disappears when combined
82- **Novelty Effect**: Temporary effect due to newness
83- **Selection Bias**: Non-random assignment to groups
84
85## Time Series Analysis
86
87### Time Series Components
88- **Trend**: Long-term increase or decrease
89- **Seasonality**: Regular, predictable patterns
90- **Cyclical**: Irregular, long-term cycles
91- **Irregular/Noise**: Random fluctuations
92
93### Stationarity
94- **Definition**: Statistical properties constant over time
95- **Tests**: Augmented Dickey-Fuller (ADF), KPSS test
96- **Transformations**: Differencing, log transformation
97- **Importance**: Required for many time series models
98
99### Forecasting Methods
100- **Naive Forecast**: Use last observed value
101- **Moving Average**: Average of last n values
102- **Exponential Smoothing**: Weighted average with decreasing weights
103- **ARIMA**: AutoRegressive Integrated Moving Average
104- **Prophet**: Facebook's forecasting tool for business time series
105- **Neural Networks**: LSTM, GRU for complex patterns
106
107### Seasonal Decomposition
108- **Additive Model**: Y = Trend + Seasonal + Residual
109- **Multiplicative Model**: Y = Trend × Seasonal × Residual
110- **STL Decomposition**: Seasonal-Trend decomposition using LOESS
111
112## Experimental Design
113
114### Design Principles
115- **Randomization**: Random assignment to treatment groups
116- **Replication**: Repeat experiment multiple times
117- **Blocking**: Group similar experimental units together
118- **Factorial Design**: Test multiple factors simultaneously
119- **Control Groups**: Baseline for comparison
120
121### Sample Size Determination
122- **Power Analysis**: Calculate required sample size
123- **Effect Size**: Expected magnitude of effect
124- **Significance Level**: Acceptable Type I error rate
125- **Power**: Desired probability of detecting effect (typically 0.8)
126
127### Experimental Validity
128- **Internal Validity**: Causal relationship between treatment and outcome
129- **External Validity**: Generalizability to other populations/settings
130- **Construct Validity**: Measurement accurately reflects concept
131- **Statistical Conclusion Validity**: Appropriate statistical methods
132
133### Common Designs
134- **Completely Randomized Design**: Random assignment to groups
135- **Randomized Block Design**: Block on nuisance variables
136- **Factorial Design**: Multiple factors with all combinations
137- **Crossover Design**: Subjects receive multiple treatments
138- **Split-Plot Design**: Hierarchical randomization