Table of Contents
- 1. Introduction
- 2. Population vs Sample
- 3. Types of Data
- 4. Levels of Measurement
- 5. Descriptive Statistics
- 6. Measures of Central Tendency
- 7. Measures of Dispersion
- 8. Percentiles and Quartiles
- 9. Outliers
- 10. Skewness
- 11. Kurtosis
- 12. Covariance
- 13. Correlation
- 14. Sampling
- 15. Sampling Distribution
- 16. Central Limit Theorem
- 17. Confidence Interval
- 18. Statistical Inference
- 19. Hypothesis Testing
- 20. P-value
- 21. Type I & Type II Errors
- 22. Statistical Tests
- 23. Feature Scaling
- 24. Standardization
- 25. Normalization
- 26. Z-Score
- 27. Missing Data
- 28. Cheat Sheet
1. Introduction
Statistics is the science of collecting, organizing, analyzing, interpreting, and presenting data. In AI and Machine Learning, statistics helps to:- Understand datasets
- Discover patterns
- Build predictive models
- Evaluate model performance
- Make data-driven decisions
2. Population vs Sample
Example
Population3. Types of Data
Numerical Data
Numeric values used for calculations. Examples- Age
- Height
- Weight
- Salary
Continuous Data
Can take any value. ExampleDiscrete Data
Countable values. ExampleCategorical Data
Represents categories. Examples- Gender
- Department
- Blood Group
- Country
4. Levels of Measurement
5. Descriptive Statistics
Descriptive statistics summarize a dataset. Common measures include:- Mean
- Median
- Mode
- Variance
- Standard Deviation
- Range
- Quartiles
6. Measures of Central Tendency
Mean
Average of all observations.Formula
Python
Median
Middle value after sorting. PythonMode
Most frequently occurring value. Python7. Measures of Dispersion
Shows how spread out the data is.Range
Formula PythonVariance
Average squared deviation from the mean. Population Variance Sample Variance PythonStandard Deviation
Square root of variance. Formula Python- High SD → More variation
- Low SD → Less variation
8. Percentiles and Quartiles
Percentile
Indicates the percentage of observations below a value. ExampleQuartiles
Interquartile Range (IQR)
Python9. Outliers
Outliers are observations that are significantly different from the rest.IQR Rule
Lower Bound Upper Bound Values outside these limits are considered outliers.10. Skewness
Measures asymmetry of data.
Python
11. Kurtosis
Measures tail heaviness.- High Kurtosis → More Outliers
- Low Kurtosis → Fewer Outliers
12. Covariance
Measures whether two variables move together. Positive Covariance13. Correlation
Measures strength and direction of a relationship. Range
Python
14. Sampling
Sampling is selecting a subset from a population. Methods- Simple Random Sampling
- Stratified Sampling
- Cluster Sampling
- Systematic Sampling
15. Sampling Distribution
Distribution of a sample statistic. Used in- Confidence Interval
- Hypothesis Testing
16. Central Limit Theorem
If sample size is sufficiently large, then the sampling distribution of the mean becomes approximately normal. Why important?- Enables hypothesis testing
- Basis for confidence intervals
- Foundation of statistical inference
17. Confidence Interval
Range likely to contain the population parameter. 95% Confidence Interval Interpretation18. Statistical Inference
Drawing conclusions about a population using sample data. Includes- Confidence Interval
- Hypothesis Testing
19. Hypothesis Testing
Null Hypothesis
Alternative Hypothesis
20. P-value
Probability of obtaining the observed result assuming H₀ is true. Decision Rule21. Type I & Type II Errors
Type I Error
False Positive Reject a true null hypothesis.Type II Error
False Negative Fail to reject a false null hypothesis.22. Statistical Tests
23. Feature Scaling
Scaling ensures features have comparable ranges. Example
Benefits
- Faster convergence
- Better optimization
- Improved ML accuracy
24. Standardization
Transforms data to- Mean = 0
- Standard Deviation = 1
25. Normalization
Scales values between 0 and 1. Formula Python26. Z-Score
Measures distance from the mean. Formula Interpretation
Python
27. Missing Data
Common approaches- Remove Rows
- Remove Columns
- Mean Imputation
- Median Imputation
- Mode Imputation