Rmarkdown-formulas

Formulas in Rmarkdown

Proportions

Standard error for proportion

$$se = \sqrt{ \frac{\pi (1-\pi)}{n} }$$

\[se = \sqrt{ \frac{\pi (1-\pi)}{n} }\]

Confidence interval for proportion

$$\hat\pi \pm z se$$

\[\hat\pi \pm z se\]

Standard error of difference between two proportions

$$ se_d = \sqrt{ \frac{\hat\pi_1 (1 - \hat\pi_1)}{n_1} + \frac{\hat\pi_2 (1 - \hat\pi_2)}{n_2} }$$

\[ se_d = \sqrt{ \frac{\hat\pi_1 (1 - \hat\pi_1)}{n_1} + \frac{\hat\pi_2 (1 - \hat\pi_2)}{n_2} }\]

Confidence interval difference between two proportions

$$\hat\pi_1 - \hat\pi_2  \pm  z se_d$$

\[\hat\pi_1 - \hat\pi_2 \pm z se_d\]

Means

Standard error for mean

$$se = s/sqrt{n}$$

Confidence interval for mean

$$\bar y \pm t se$$

\[\bar y \pm t se\]

Standard error of difference between two means

$$ se_d = \sqrt{ \frac{s_1^2}{n_1} + \frac{s_2^2}{n_2} }$$

\[ se_d = \sqrt{ \frac{s_1^2}{n_1} + \frac{s_2^2}{n_2} }\]

Confidence interval for difference between two means

$$\bar y_1 - \bar y_2  \pm  t se_d$$

\[\bar y_1 - \bar y_2 \pm t se_d\]