From: Nicholas Vincent Date: Thu, 29 Oct 2020 05:30:31 +0000 (-0500) Subject: move + cleanup Useful Formulas section X-Git-Url: https://code.communitydata.science/stats_class_2020.git/commitdiff_plain/d3c229da53f72ea2c4374b9985d80a18c91c4e24 move + cleanup Useful Formulas section --- diff --git a/assessment/interactive_assessment.rmd b/assessment/interactive_assessment.rmd index 8d8df13..0c8c64b 100644 --- a/assessment/interactive_assessment.rmd +++ b/assessment/interactive_assessment.rmd @@ -106,6 +106,46 @@ quiz( ``` +## Useful Formulas +Sample Mean (sample statistic): +$\bar{x}=\frac{\sum_{i=1}^n x_i}{n}$ + +Standard deviation: +$s=\sqrt{\frac{\sum_{i=1}^n (x_i-\bar{x})^2}{n-1}}$ + +Variance: +$var = s^2$ + +Useful probability axioms: + +Complement: +$\mbox{Pr}(A^c)=1-\mbox{Pr}(A)$ + +Probability of two *independent* events both happening: +Pr(A and B) = Pr(A) $\times$ Pr(B) + +Probability of one of two events happening: +Pr(A or B) = Pr(A) + Pr(B) - Pr(A and B) + +Conditional probability: +$\mbox{Pr}(A|B)=\frac{\mbox{Pr(A and B)}}{\mbox{Pr(B)}}$ + +Population mean (population statistic): +$\mu = \sum_{i=1}^{n}x\mbox{Pr}(x)$ + +Z-score: +$z=\frac{x-\mu}{\sigma}$ + +Standard errors: + +$SE=\frac{\sigma}{\sqrt{n}}$ + +$SE_{proportion}=\sqrt{\frac{p(1-p)}{n}}$ + +Identifying outliers using Interquartile Range (IRQ): +$Q_1 - 1.5 \times IQR, \quad Q_3 + 1.5 \times IQR$ + + ## Section 2: Writing and Debugging R Code ### Debugging a Function @@ -506,37 +546,6 @@ quiz( -## Useful Formulas -Sample Mean (sample statistic): -$\bar{x}=\frac{\sum_{i=1}^n x_i}{n}$ | -Standard deviation: -$s=\sqrt{\frac{\sum_{i=1}^n (x_i-\bar{x})^2}{n-1}}$ | -Variance: -$var = s^2$ - -Useful probability axioms: -$\mbox{Pr}(A^c)=1-\mbox{Pr}(A)$ | Pr(A and B) = Pr(A) $\times$ Pr(B) | Pr(A or B) = Pr(A) + Pr(B) - Pr(A and B) - -$\mbox{Pr}(A|B)=\frac{\mbox{Pr(A and B)}}{\mbox{Pr(B)}}$\\ - -Population mean (population statistic): -$\mu = \sum_{i=1}^{n}x\mbox{Pr}(x)$ - -Z-score: -$z=\frac{x-\mu}{\sigma}$ - -$x=\mu + z\sigma$\\ - -$\mbox{P}(x)=\frac{n!}{x!(n-x)!}p^x(1-p)^{n-x}$ - ~for~ $x=0,1,2,...,n$ - -$\mu=np$, $\sigma=\sqrt{np(1-p)}$\\ - -$\sigma_{\bar{x}}=\frac{\sigma}{\sqrt{n}}$ - -$\sigma_{\hat{p}}=\sqrt{\frac{p(1-p)}{n}}$ - -$Q_1 - 1.5 \times IQR, \quad Q_3 + 1.5 \times IQR$