# Data Analysis and Statistics

Source: https://cca.twango.dev/Algebra-2-Honors/lectures/statistics

# Data Analysis and Statistics

## Normal distributions

A normal distribution is symmetric and bell-shaped, with mean $\mu$ and standard deviation $\sigma>0$. The standard normal distribution has mean $0$ and standard deviation $1$.

$$
z=\frac{x-\mu}{\sigma},\qquad x=\mu+z\sigma.
$$

For a normal distribution, approximately 68%, 95%, and 99.7% of observations fall within one, two, and three standard deviations of the mean.

On **one side** of the mean, the approximate bands are:

| Band | Area |
| --- | --- |
| Mean to $1\sigma$ | 34% |
| $1\sigma$ to $2\sigma$ | 13.5% |
| $2\sigma$ to $3\sigma$ | 2.35% |
| Beyond $3\sigma$ | 0.15% |

![[../assets/distribution-shapes.svg|Illustrative symmetric, left-skewed, and right-skewed distributions with mean and median positions]]

These are explanatory examples, not measured data or a claim that every symmetric
distribution is normal. The dashed red line marks the mean and the dotted green
line marks the median. [[../assets/distribution-shapes.jpg|Original comparison]].

In typical skewed distributions, the mean is pulled toward the long tail: mean below median for left skew, above median for right skew. This is a useful tendency rather than a theorem about every possible data set.

> [!note] Review corrections
> A symmetric histogram does not by itself prove normality. The 34%, 13.5%, 2.35%, and 0.15% entries are separate one-sided bands, not cumulative intervals labeled $\mu\pm z\sigma$.

## Populations and samples

- **Population:** the whole group of interest.
- **Sample:** a subset observed or measured.
- **Parameter:** a numerical population characteristic.
- **Statistic:** a numerical sample characteristic.
- **Sample space:** possible outcomes of a probability experiment; it is not another name for a statistical sample.

## Sampling methods

| Method | How it works |
| --- | --- |
| Simple random | Every sample of the specified size has an equal selection probability |
| Self-selected | Individuals volunteer |
| Systematic | Use a rule, such as every $k$th member, usually after a random start |
| Stratified | Divide into strata, then sample within every stratum |
| Cluster | Randomly select clusters, then observe all members of those selected clusters in the basic design |
| Convenience | Select easy-to-reach individuals |

**Bias** is systematic distortion. Random selection reduces selection bias, but does not guarantee that every realized sample perfectly resembles the population. Biased questions can lead respondents, be too sensitive, omit necessary context, or ask several things at once.

## Collecting data

- **Experiment:** impose a treatment and measure a response.
- **Observational study:** observe without assigning treatments.
- **Survey:** ask about characteristics of a population.
- **Simulation:** use a model to reproduce aspects of a situation.

A controlled experiment compares treatment and control conditions. **Random assignment** assigns subjects to treatments; **random sampling** selects subjects from a population. They serve different purposes.

A control group can receive no treatment, a placebo, or a standard treatment, depending on the design. A **placebo** resembles a treatment without its active component. Replication repeats a study or experiment to assess consistency; repetition alone does not remove systematic bias.

Well-designed randomized experiments support causal conclusions. An observed association alone does not establish causation.

## Descriptive and inferential statistics

Descriptive statistics organize, summarize, and display observed data. Inferential statistics use sample data to reason about a population, with uncertainty.

A **margin of error** is the half-width of a confidence interval under a specified model, confidence level, and sampling method. It is not a guaranteed maximum difference between sample and population values.

> [!warning] Scope of the original margin-of-error shortcut
> $1/\sqrt n$ is a rough worst-case 95% margin for a proportion from a sufficiently large independent random sample. It is not a universal formula for every statistic or confidence level. A normal-approximation proportion margin is $z^*\sqrt{\hat p(1-\hat p)/n}$; with $z^*\approx1.96$ and $\hat p=1/2$, it is about $0.98/\sqrt n$.

The original resampling recipe randomly rearranges indexed observations. This describes a **permutation** procedure. Bootstrap resampling instead draws observations **with replacement**; the simulation must match the question being investigated.

Related: [[probability|Probability]], [[../final-notes|Final review]], and [[../notes|Course notes]].
