# t-distribution

When the sample size is too small to use Centeral Limit Thorem, we need to use t-distributions.

They are always centered at zero.

They have a single parameter, **degrees of freedom** (*df*).

```
plot(Normal(0,1), label="Normal(0,1)")
plot!(TDist(2), label="TDist(2)")
plot!(TDist(5), label="TDist(5)")
plot!(TDist(10), label="TDist(10)")
xlims!(-4,4)
```

The p value is still calculated as the area under the t-distribution.

```
using Rmath
2*pt(4.94,9, false)
```

```
0.0008022393577614288
```