So far we have assumed that we know $\mu$ and $\sigma$ for our population. But usually we don't know them. We have samples and we need to use them to see
Till now we were using $\sigma$ to find standard error. But we cannot do that as we don't have $\sigma$. So we have a different distribution that is more error prone. It is t-distribution
Basically the number of actual choices that you could make excluding the ones that are forced due to constraints.
For a sample taken from a population our choice of sample is constrained by the population itself. We cannot pick something that isn't there. If we a good sample (large enough, completely representative of the population and chosen by a sound methodology) then we could at most choose n - 1 points. The last point would be chosen for us (by our methodology of taking good sample rather than someone choosing it for us).
Hence, our effective sample size is (n - 1)
We have t table at https://s3.amazonaws.com/udacity-hosted-downloads/t-table.jpg
$t = \frac{\bar{x} - \mu_o} {S / \sqrt{n}}$
Here the $\mu_o$ is the mean of the population to which we are comparing the sample with mean $\bar{x}$ coming from a different population. The denominator represents the error that we expect between population mean and $\mu_o$ by chance
Details here. Needs subscription
p-value is probability above/below the t-statistic. We can calculate p-values here
Cohen's d $= \frac{M - \mu_o}{S}$
$r^2 = \frac{t^2}{t^2 + df}$
$Margin of error = t_{critical} * SEM$
Fact for out case - "US families spent an average of $151 per week on food in 2012"
So $\mu = 151$
$H_o : \mu_{program} \ge 151$
$H_A : \mu_{program} < 151$
So we are doing one-tailed t-test in -ve direction
After the program it was found that $\bar{X} = 126$ the mean difference = 126 - 151 = - 25
t-statisitc = (126 - 151) / 10 = -2.50