{"id":1512,"date":"2021-07-16T13:32:44","date_gmt":"2021-07-16T17:32:44","guid":{"rendered":"https:\/\/openbooks.macewan.ca\/rcommander\/back-matter\/__unknown__\/"},"modified":"2025-04-25T18:16:38","modified_gmt":"2025-04-25T22:16:38","slug":"formula-sheet","status":"publish","type":"back-matter","link":"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/formula-sheet\/","title":{"raw":"Appendix A: Formula Sheet","rendered":"Appendix A: Formula Sheet"},"content":{"raw":"<div class=\"__UNKNOWN__\">\r\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Important Notations<\/strong><\/p>\r\n\r\n<table class=\"grid\" style=\"height: 174px; width: 100%;\" border=\"0.5pt solid windowtext\">\r\n<thead>\r\n<tr class=\"shaded\" style=\"height: 29px;\">\r\n<td class=\"border\" style=\"height: 29px;\">Measures<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">Population<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">Sample<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"TableGrid-R\" style=\"height: 29px;\">\r\n<td class=\"border\" style=\"height: 29px;\">Sample Size<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]N[\/latex]<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]n[\/latex]<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 29px;\">\r\n<td class=\"border\" style=\"height: 29px;\">Mean<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]\\mu[\/latex]<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]\\bar{\\mu}[\/latex]<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 29px;\">\r\n<td class=\"border\" style=\"height: 29px;\">Standard Deviation<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]\\sigma[\/latex]<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]s[\/latex]<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 29px;\">\r\n<td class=\"border\" style=\"height: 29px;\">Proportion<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]p[\/latex]<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]\\hat{p}[\/latex]<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 30px;\">\r\n<td class=\"border\" style=\"height: 29px;\">Slope<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]\\beta_1[\/latex]<\/td>\r\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]b_1[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Descriptive Measures<\/strong><\/p>\r\n\r\n<ul>\r\n \t<li>Five-number summary: minimum, [latex]Q_1[\/latex], [latex]Q_2[\/latex], [latex]Q_3[\/latex], and maximum<\/li>\r\n \t<li>Outliers: [latex]\\text{lowerlimit}=Q_1-1.5 \\times IQR;[\/latex] \u00a0[latex]\\text{upperlimit}=Q_3+1.5 \\times IQR;[\/latex] [latex]IQR=Q_3-Q_1 [\/latex]<\/li>\r\n \t<li>Sample mean: [latex]\\frac{x_1 + x_2 + \\dots + x_n}{n} = \\frac{\\sum x_i}{n}[\/latex]<\/li>\r\n \t<li>Sample standard deviation:\u00a0[latex]s = \\sqrt{ \\frac{\\sum (x_i - \\bar{x})^2 }{n-1} } = \\sqrt{ \\frac{ \\left( \\sum x_i^2 \\right) - \\frac{ \\left( \\sum x_i \\right)^2 }{n} }{n-1} }[\/latex]<\/li>\r\n<\/ul>\r\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Probability Concepts<\/strong><\/p>\r\n\r\n<ul>\r\n \t<li><strong class=\"import-Strong\">Equal-likely outcome model: Probability of event<\/strong> <strong class=\"import-Strong\"><em>E\r\n<\/em><\/strong>\r\n<p align=\"center\">[latex]P(E)= \\frac{\\text{\\# of sample points in event E}}{\\text{\\# of sample points in sample space S} } = \\frac{\\text{\\# of ways event E can occur}}{\\text{\\# of possible outcomes}}= \\frac{f}{N}[\/latex]<\/p>\r\n<\/li>\r\n \t<li>Complement rule: [latex]P(not \\: E)=1-P(E)[\/latex]<\/li>\r\n \t<li>Special addition rule: [latex]P(A \\: or \\: B)=P(A)+P(B)[\/latex]\u00a0if events [latex]A[\/latex]\u00a0and [latex]B[\/latex]\u00a0are mutually exclusive. More generally, if events [latex]A,B,C, \\dots[\/latex]\u00a0are mutually exclusive, then [latex]P(A \\: or \\: B \\: or \\: C \\: or \\: \\dots)=P(A)+P(B)+P(C) + \\dots [\/latex]<\/li>\r\n \t<li>General addition rule: [latex]P(A \\:or \\: B)=P(A)+P(B)-P(A \\: \\&amp; \\: B)[\/latex]<\/li>\r\n \t<li>Conditional probability of [latex]A[\/latex]\u00a0<span style=\"text-align: initial; font-size: 1em;\">given <\/span>[latex]B[\/latex]: [latex]P(A|B)=\\frac{P(A \\: \\&amp; \\: B)}{P(B)}[\/latex]\u00a0for [latex]P(B) \\: \\gt \\: 0[\/latex]<\/li>\r\n \t<li>General multiplication rule: [latex]P(A \\: \\&amp; \\:B)=P(B)P(A|B)=P(A)P(B|A)[\/latex]<\/li>\r\n \t<li>Special multiplication rule: [latex]P(A \\: \\&amp; \\: B)=P(A)P(B)[\/latex] if events [latex]A[\/latex] and [latex]B[\/latex] are independent. More generally, if events [latex]A,B,C, \\dots [\/latex] are independent, [latex]P(A \\: \\&amp; \\: B \\: \\&amp; \\: C \\: \\&amp; \\: \\dots) =P(A) \\times P(B) \\times P(C) \\times \\dots [\/latex]<\/li>\r\n \t<li>Two events [latex]A[\/latex]\u00a0and [latex]B[\/latex]\u00a0<span style=\"text-align: initial; font-size: 1em;\">are <\/span><strong style=\"text-align: initial; font-size: 1em;\">independent<\/strong><span style=\"text-align: initial; font-size: 1em;\"> if <\/span><strong style=\"text-align: initial; font-size: 1em;\">ANY<\/strong><span style=\"text-align: initial; font-size: 1em;\"> of the following is true:\r\n<\/span>\r\n<p align=\"center\">[latex]P(A|B)=P(A)[\/latex]\u00a0OR [latex]P(B|A)=P(B)[\/latex]\u00a0OR [latex]P(A \\: \\&amp; \\: B)=P(A) \\times P(B)[\/latex]<\/p>\r\n<\/li>\r\n<\/ul>\r\n<ul>\r\n \t<li>Permutation: [latex]nP_r = \\frac{n!}{(n-r)!}[\/latex]<\/li>\r\n \t<li>Combination: [latex]nC_r = \\frac{n!}{r!(n-r)!}[\/latex]<\/li>\r\n<\/ul>\r\n<p class=\"import-Normal\"><strong class=\"import-Strong\">Discrete Random Variables<\/strong><\/p>\r\n\r\n<ul>\r\n \t<li>The mean (expected value) of a discrete random variable [latex]X: \\mu= \\sum xP(X=x)[\/latex]<\/li>\r\n \t<li>Standard deviation of [latex]X: \\sigma= \\sqrt{\\sum (x- \\mu)^2 P(X=x)} = \\sqrt{\\sum x^2 P(X=x)-\\mu^2}[\/latex]<\/li>\r\n<\/ul>\r\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Binomial Distribution<\/strong><\/p>\r\nAmong [latex]n[\/latex]\u00a0independent Bernoulli trials with probability of success [latex]p[\/latex], let [latex]X[\/latex]\u00a0be the number of successes. The probability of observing [latex]x[\/latex]\u00a0successes is:\r\n<p style=\"text-align: center;\">[latex]P(X=x)={n\u00a0\\choose x} p^x (1-p)^{n-x}=nC_x p^x(1-p)^{n-x}, x=0,1, \\dots , n[\/latex]<\/p>\r\nThe mean and standard deviation of a Binomial distribution are [latex]\\mu = np[\/latex], [latex]\\sigma = \\sqrt{np(1-p)}[\/latex], respectively.\r\n<p class=\"import-Subtitle\"><strong>Normal Distribution<\/strong><\/p>\r\n\r\n<ul>\r\n \t<li>If random variable [latex]X \\sim N(\\mu, \\sigma)[\/latex], then the standardized variable [latex]Z=\\frac{X-\\mu}{\\sigma} \\sim N(0,1)[\/latex].<\/li>\r\n \t<li>Given an [latex]x[\/latex]\u00a0value, its\u00a0z-score is [latex]z=\\frac{x-\\mu}{\\sigma}[\/latex]<\/li>\r\n \t<li>Given the\u00a0z-score, find the [latex]x[\/latex]\u00a0value: [latex]x=\\mu+z \\times \\sigma [\/latex].<\/li>\r\n \t<li>If sample mean [latex]\\bar{X} \\sim N(\\mu_{\\bar{X}}=\\mu, \\sigma_{\\bar{X}}= \\frac{\\sigma}{\\sqrt{n}})[\/latex], the standardized variable [latex]Z=\\frac{\\bar{X}-\\mu_{\\bar{X}}}{\\sigma_{\\bar{X}}}= \\frac{\\bar{X} - \\mu}{\\sigma \/ \\sqrt{n}} \\sim N(0,1)[\/latex].<\/li>\r\n<\/ul>\r\n<p class=\"import-Subtitle\"><strong>Sampling Distributions<\/strong><\/p>\r\n\r\n<ul>\r\n \t<li>Mean and standard deviation of the sample mean [latex]\\bar{X}: \\mu_{\\scriptsize \\bar{X}}= \\mu, \\sigma_{\\scriptsize \\bar{X}} = \\frac{\\sigma}{\\sqrt{n}}[\/latex]<\/li>\r\n \t<li>Mean and standard deviation of a sample proportion [latex]\\hat{p}: \u00a0\\mu_{\\scriptsize \\hat{p}} = p; \\sigma_{\\scriptsize \\hat{p}} =\\sqrt{ \\frac{p(1-p)}{n}}[\/latex]<\/li>\r\n \t<li>Mean and standard deviation of [latex]\\bar{X}_1 - \\bar{X}_2: \\mu_{\\scriptsize \\bar{X}_1 - \\bar{X}_2} = \\mu_1 - \\mu_2; \\sigma_{\\scriptsize \\bar{X}_1 - \\bar{X}_2} = \\sqrt{ \\frac{\\sigma_1^2}{n_1} + \\frac{\\sigma_2^2}{n_2}}[\/latex]<\/li>\r\n \t<li>Mean and standard deviation of [latex]\\hat{p}_1\u00a0 - \\hat{p}_2: \\mu_{\\scriptsize \\hat{p}_1\u00a0 - \\hat{p}_2} = p_1 - p_2; \\sigma_{\\scriptsize \\hat{p}_1\u00a0 - \\hat{p}_2} = \\sqrt{ \\frac{p_1(1-p_1)}{n_1} + \\frac{p_2(1-p_2)}{n_2}}[\/latex]<\/li>\r\n<\/ul>\r\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Confidence Intervals and Hypothesis Tests<\/strong><\/p>\r\n\r\n<table class=\"grid\" style=\"height: 524px; width: 100%;\">\r\n<thead>\r\n<tr class=\"shaded\" style=\"height: 30px;\">\r\n<td style=\"width: 84.484375px; height: 30px;\">Parameter<\/td>\r\n<td style=\"width: 80.5625px; height: 30px;\">Estimate<\/td>\r\n<td style=\"width: 152.859375px; height: 30px;\">Test Statistic<\/td>\r\n<td style=\"width: 304.359375px; height: 30px;\">\r\n<div>[latex](1 - \\alpha) \\times 100 \\%[\/latex]\u00a0<span style=\"font-family: inherit; font-size: inherit;\">Confidence Interval<\/span><\/div><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"TableGrid-R\" style=\"height: 45px;\">\r\n<td style=\"width: 84.484375px; height: 45px;\">[latex]\\mu[\/latex]<\/td>\r\n<td style=\"width: 80.5625px; height: 45px;\">[latex]\\bar{x}[\/latex]<\/td>\r\n<td style=\"width: 152.859375px; height: 45px;\">[latex]t_o = \\frac{\\bar{x} - \\mu_0}{\\left( \\frac{s}{\\sqrt{n}} \\right)}[\/latex]<\/td>\r\n<td style=\"width: 304.359375px; height: 45px;\">\r\n<div>[latex]\\bar{x} \\pm t_{\\alpha \/ 2} \\frac{s}{\\sqrt{n}}[\/latex]\u00a0with\u00a0[latex]df=n-1[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 45px;\">\r\n<td style=\"width: 84.484375px; height: 45px;\">[latex]p[\/latex]<\/td>\r\n<td style=\"width: 80.5625px; height: 45px;\">[latex]\\hat{p}[\/latex]<\/td>\r\n<td style=\"width: 152.859375px; height: 45px;\">[latex]z_o = \\frac{\\hat{p} - p_0}{\\sqrt{\\frac{p_0(1 - p_0)}{n}}}[\/latex]<\/td>\r\n<td style=\"width: 304.359375px; height: 45px;\">[latex]\\hat{p} \\pm z_{\\alpha \/ 2} \\sqrt{\\frac{\\hat{p}(1 - \\hat{p})}{n}} , \\hat{p} = \\frac{x}{n}[\/latex]<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 134px;\">\r\n<td style=\"width: 84.484375px; height: 134px;\">[latex]\\mu_1 - \\mu_2[\/latex]<\/td>\r\n<td style=\"width: 80.5625px; height: 134px;\">[latex]\\bar{x}_1 - \\bar{x}_2[\/latex]<\/td>\r\n<td style=\"width: 152.859375px; height: 134px;\">[latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{\\sqrt{\\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}}[\/latex]<\/td>\r\n<td style=\"width: 304.359375px; height: 134px;\">[latex](\\bar{x}_1 - \\bar{x}_2) \\pm t_{\\alpha \/ 2} \\sqrt{\\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}[\/latex]\u00a0with\r\n<div>[latex]df = \\frac{\\left( \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}\u00a0\\right)^2}{ \\left( \\frac{1}{n_1 - 1} \\right) \\left( \\frac{s_1^2}{n_1} \\right)^2 + \\left( \\frac{1}{n_2 - 1} \\right) \\left( \\frac{s_2^2}{n_2} \\right)^2}[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 60px;\">\r\n<td style=\"width: 84.484375px; height: 60px;\">[latex]\\mu_1 - \\mu_2[\/latex]<\/td>\r\n<td style=\"width: 80.5625px; height: 60px;\">[latex]\\bar{x}_1 - \\bar{x}_2[\/latex]<\/td>\r\n<td style=\"width: 152.859375px; height: 60px;\">[latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{ s_p \\sqrt{\\frac{1}{n_1} + \\frac{1}{n_2}}}[\/latex]<\/td>\r\n<td style=\"width: 304.359375px; height: 60px;\">[latex](\\bar{x}_1 - \\bar{x}_2) \\pm t_{\\alpha \/ 2} s_p \\sqrt{\\frac{1}{n_1} + \\frac{1}{n_2}}[\/latex]\u00a0with\u00a0[latex]df=n_1+n_2-2[\/latex]<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 75px;\">\r\n<td style=\"width: 84.484375px; height: 75px;\">[latex]\\mu_1 - \\mu_2[\/latex]<\/td>\r\n<td style=\"width: 80.5625px; height: 75px;\">[latex]\\bar{d}[\/latex]<\/td>\r\n<td style=\"width: 152.859375px; height: 75px;\">[latex]t_o = \\frac{\\bar{d} - \\delta_0}{\\left( \\frac{s_d}{\\sqrt{n}} \\right)}[\/latex]<\/td>\r\n<td style=\"width: 304.359375px; height: 75px;\">\r\n<div>[latex]\\bar{d} \\pm t_{\\alpha \/ 2} \\frac{s_d}{\\sqrt{n}}[\/latex]\u00a0with [latex]df=n-1[\/latex], [latex]n\u00a0=[\/latex] # of pairs\r\n[latex]\\bar{d} = \\frac{\\sum d_i}{n}, s_d = \\sqrt{\\frac{\\left( \\sum d_i^2 \\right) - \\frac{\\left( \\sum d_i \\right)^2}{n} }{n-1}}[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 90px;\">\r\n<td style=\"width: 84.484375px; height: 90px;\">[latex]p_1-p_2[\/latex]<\/td>\r\n<td style=\"width: 80.5625px; height: 90px;\">[latex]\\hat{p}_1 - \\hat{p}_2[\/latex]<\/td>\r\n<td style=\"width: 152.859375px; height: 90px;\">[latex]z_o = \\frac{\\hat{p}_1 - \\hat{p}_2}{\\sqrt{\\hat{p}_p (1 - \\hat{p}_p)} \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2} }}[\/latex]<\/td>\r\n<td style=\"width: 304.359375px; height: 90px;\">[latex](\\hat{p}_1 - \\hat{p}_2) \\pm z_{\\alpha \/ 2} \\sqrt{\\frac{\\hat{p}_1 (1 - \\hat{p}_1)}{n_1} + \\frac{\\hat{p}_2 (1 - \\hat{p}_2)}{n_2}}[\/latex]\r\n[latex]\\hat{p}_p = \\frac{x_1 + x_2}{n_1 + n_2}, \\hat{p}_1 = \\frac{x_1}{n_1}, \\hat{p}_2 = \\frac{x_2}{n_2}[\/latex]<\/td>\r\n<\/tr>\r\n<tr class=\"TableGrid-R\" style=\"height: 45px;\">\r\n<td style=\"width: 84.484375px; height: 45px;\">[latex]\\beta_1[\/latex]<\/td>\r\n<td style=\"width: 80.5625px; height: 45px;\">[latex]b_1[\/latex]<\/td>\r\n<td style=\"width: 152.859375px; height: 45px;\">[latex]t_o = \\frac{b_1}{\\left( \\frac{s_e}{\\sqrt{S_{xx}}} \\right)}[\/latex]<\/td>\r\n<td style=\"width: 304.359375px; height: 45px;\">\r\n<div>[latex]b_1 \\pm t_{\\alpha \/ 2} \\frac{s_e}{\\sqrt{S_{xx}}}[\/latex]\u00a0with\u00a0[latex]df=n-2[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Margin of Error and Sample Size Calculation<\/strong><\/p>\r\n\r\n<ul>\r\n \t<li>Margin of error for the estimate of [latex]\\mu: E = z_{\\alpha \/ 2} \\frac{\\sigma}{\\sqrt{n}}[\/latex]<\/li>\r\n \t<li>Sample size calculation for [latex]\\mu : = \\left( \\frac{\\sigma \\times z_{\\alpha \/ 2}}{E} \\right)^2[\/latex]\u00a0round up to the nearest integer<\/li>\r\n \t<li>Margin of error for the estimate of [latex]p: E = z_{\\alpha \/ 2} \\sqrt{ \\frac{\\hat{p}(1 - \\hat{p})}{n} }[\/latex]<\/li>\r\n \t<li>Sample size calculation for [latex]p[\/latex]\u00a0without guessing [latex]\\hat{p}: n \\leq 0.05 (1 - 0.05) \\left( \\frac{z_{\\alpha \/ 2}}{E} \\right)^2 = 0.25 \\left( \\frac{z_{\\alpha \/ 2}}{E} \\right)^2[\/latex]<\/li>\r\n \t<li>Sample size calculation for [latex]p[\/latex] with guessing [latex]\\hat{p}: n = p_g (1 - p_g) \\left( \\frac{z_{\\alpha \/ 2}}{E} \\right)^2[\/latex] round up<\/li>\r\n<\/ul>\r\n<p class=\"import-Subtitle\"><strong>Chi-Square Test<\/strong><\/p>\r\n\r\n<ul>\r\n \t<li>Chi-square goodness-of-fit test for one categorical\/discrete variable:\r\n<ul>\r\n \t<li>Expected frequency: [latex]E=np[\/latex]<\/li>\r\n \t<li>Test statistic: [latex]\\chi_o^2 = \\sum_{\\text{all cells}} \\frac{(O - E)^2}{E}[\/latex]\u00a0with [latex]df=k-1[\/latex], where [latex]k[\/latex]\u00a0is number of possible values of the variable<\/li>\r\n<\/ul>\r\n<\/li>\r\n \t<li>Chi-square independence (or homogeneity) test of two variables:\r\n<ul>\r\n \t<li>Expected frequency: [latex]E=\\frac{\\text{(rth row total)} \\times \\text{(cth column total)}}{n}[\/latex]<\/li>\r\n \t<li>Test statistic: [latex]\\chi_o^2 = \\sum_{\\text{all cells}} \\frac{(O - E)^2}{E}[\/latex]\u00a0with [latex]df=(r-1) \\times (c-1)[\/latex]\u00a0where [latex]r[\/latex]\u00a0is the number of rows and [latex]c[\/latex]\u00a0is number of columns of the cells.<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p class=\"import-Subtitle\"><strong>Regression Analysis<\/strong><\/p>\r\n\r\n<ul>\r\n \t<li>Sums of squares\r\n<p align=\"center\">[latex]S_{xy}= \\sum x_i y_i - \\frac{\\left( \\sum x_i \\right) \\left( \\sum y_i \\right) }{n}; S_{xx} = x_i^2 - \\frac{\\left( \\sum x_i \\right)^2}{n}; S_{yy} = \\sum y_i^2 - \\frac{\\left( \\sum y_i \\right)^2}{n}[\/latex]<\/p>\r\n<\/li>\r\n \t<li>The least-squares straight line: [latex]\\hat{y} = b_0 + b_1 x[\/latex]\u00a0, where [latex]b_1 = \\frac{S_{xy}}{S_{xx}}[\/latex]\u00a0and [latex]b_0 = \\bar{y} - b_1 \\bar{x} = \\frac{\\sum y_i}{n} \u00a0- b_1 \\frac{\\sum x_i}{n}[\/latex]<\/li>\r\n \t<li>Total sum of squares: [latex]SST = \\sum (y_i - \\bar{y})^2 = S_{yy}[\/latex]<\/li>\r\n \t<li>Regression sum of squares: [latex]SSR = \\sum (\\hat{y} - \\bar{y})^2 = r^2 S_{yy} = \\frac{S_{xy}^2}{S_{xx}}[\/latex]<\/li>\r\n \t<li>Error sum of squares: [latex]SSE = \\sum (y_i - \\hat{y}_i)^2 = \\sum e_i^2 = SST - SSR = S_{yy} - \\frac{S_{xy}^2}{S_{xx}}[\/latex]<\/li>\r\n \t<li>Regression identify: [latex]SST=SSE+SSR[\/latex]<\/li>\r\n \t<li>Residual: [latex]e_i \u00a0= y_i -\\hat{y}_i = y_i - (b_0 + b_1 x_i)[\/latex]<\/li>\r\n \t<li>Correlation coefficient: [latex]r = \\frac{S_{xy}}{\\sqrt{S_{xx} \\times S_{yy}}}[\/latex]<\/li>\r\n \t<li>Coefficient of determination: [latex]R^2=r^2= \\frac{S_{xy}^2}{S_{xx} \\times S_{yy}}=\\frac{SSR}{SST}[\/latex]<\/li>\r\n \t<li>Standard error of the estimate: [latex]s_e = \\sqrt{ \\frac{\\sum (e_i - \\bar{e})^2}{n-2} } = \\sqrt{ \\frac{\\sum e_i^2}{n-2}} = \\sqrt{\\frac{SSE}{n-2}}[\/latex]<\/li>\r\n \t<li>Test statistic for [latex]\\beta_1: t_o = \\frac{b_1}{\\left( \\frac{s_e}{\\sqrt{S_{xx}}} \\right)}[\/latex] with [latex]df=n-2[\/latex]<\/li>\r\n \t<li>A [latex](1 - \\alpha) \\times 100 \\% [\/latex] confidnece interval for [latex]\\beta_1: b_1 \\pm t_{\\alpha \/ 2} \\frac{s_e}{\\sqrt{S_{xx}}}[\/latex] with [latex]df = n-2[\/latex]<\/li>\r\n \t<li>A [latex](1 - \\alpha) \\times 100 \\% [\/latex] confidence interval for\u00a0the conditional mean [latex]\\mu_p[\/latex]\u00a0is\r\n<p align=\"center\">[latex]\\hat{\\mu}_p \\pm t_{\\alpha \/ 2} \\times SE(\\hat{\\mu}_p) = (b_0 + b_1 x_p) \\pm t_{\\alpha \/ 2} \\times s_e \\sqrt{\\frac{(x_p - \\bar{x})^2}{S_{xx}} + \\frac{1}{n}}[\/latex]\u00a0with [latex]df=n-2[\/latex]<\/p>\r\n<\/li>\r\n<\/ul>\r\n<div>\r\n<ul>\r\n \t<li>A [latex](1 - \\alpha) \\times 100 \\% [\/latex] confidence interval for a single response [latex]y_p[\/latex]\u00a0is\r\n<p align=\"center\">[latex]\\hat{y}_p \\pm t_{\\alpha \/ 2} \\times SE(\\hat{y}_p) = (b_0 + b_1 x_p) \\pm t_{\\alpha \/ 2} \\times s_e \\sqrt{\\frac{(x_p - \\bar{x})^2}{S_{xx}} + \\frac{1}{n} + 1}[\/latex]\u00a0with [latex]df=n-2[\/latex]<\/p>\r\n<\/li>\r\n<\/ul>\r\n<\/div>\r\n<p class=\"import-Subtitle\"><strong>Analysis of Variance (One-Way ANOVA F Test)<\/strong><\/p>\r\nCompare [latex]k[\/latex]\u00a0population means: [latex]\\mu_1, \\mu_2 , \\dots , \\mu_k[\/latex]. Denote sample sizes as [latex]n_1,n_2, \\dots ,n_k[\/latex], sample means as [latex]\\bar{x}_1, \\bar{x}_2, \\dots , \\bar{x}_k[\/latex] and sample standard deviations as [latex]s_1,s_2, \\dots ,s_k[\/latex]. Let [latex]n=n_1 + n_2 + \\dots + n_k[\/latex] and [latex]\\bar{x} = \\frac{\\sum x_{ij}}{n}[\/latex] where [latex]x_{ij}[\/latex] is the jth observation of sample [latex]i[\/latex].\r\n<ul>\r\n \t<li>Test statistic:\u00a0[latex]F_o = \\frac{SSTR \/ (k-1)}{SSE \/ (n-k)} = \\frac{MSTR}{MSE}[\/latex]\u00a0with [latex]df_n=k-1[\/latex]\u00a0and [latex]df_d=n-k[\/latex]<\/li>\r\n \t<li>Total sum of squares:\u00a0[latex]SST = \\sum (x_{ij} - \\bar{x})^2 = \\sum x_{ij}^2 - \\frac{\\left( \\sum x_{ij} \\right)^2}{n}[\/latex]<\/li>\r\n \t<li>Treatment sum of squares:\u00a0<span style=\"font-size: 1em;\">[latex]SSTR = \\sum_{i=1}^k n_i (\\bar{x}_i - \\bar{x})^2[\/latex]<\/span><\/li>\r\n \t<li>Error sum of squares:\u00a0<span style=\"font-size: 1em;\">[latex]SSE = \\sum (x_{ij} - \\bar{x}_i)^2 = \\sum_{i=1}^k (n_i -1)s_i^2 = SST - SSTR[\/latex]<\/span><\/li>\r\n \t<li>ANOVA identity: [latex]SST=SSE+SSTR[\/latex]<\/li>\r\n<\/ul>\r\n<\/div>","rendered":"<div class=\"__UNKNOWN__\">\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Important Notations<\/strong><\/p>\n<table class=\"grid\" style=\"height: 174px; width: 100%;\">\n<thead>\n<tr class=\"shaded\" style=\"height: 29px;\">\n<td class=\"border\" style=\"height: 29px;\">Measures<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">Population<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">Sample<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"TableGrid-R\" style=\"height: 29px;\">\n<td class=\"border\" style=\"height: 29px;\">Sample Size<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]N[\/latex]<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]n[\/latex]<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 29px;\">\n<td class=\"border\" style=\"height: 29px;\">Mean<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]\\mu[\/latex]<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]\\bar{\\mu}[\/latex]<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 29px;\">\n<td class=\"border\" style=\"height: 29px;\">Standard Deviation<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]\\sigma[\/latex]<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]s[\/latex]<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 29px;\">\n<td class=\"border\" style=\"height: 29px;\">Proportion<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]p[\/latex]<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]\\hat{p}[\/latex]<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 30px;\">\n<td class=\"border\" style=\"height: 29px;\">Slope<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]\\beta_1[\/latex]<\/td>\n<td class=\"border\" style=\"text-align: center; height: 29px;\">[latex]b_1[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Descriptive Measures<\/strong><\/p>\n<ul>\n<li>Five-number summary: minimum, [latex]Q_1[\/latex], [latex]Q_2[\/latex], [latex]Q_3[\/latex], and maximum<\/li>\n<li>Outliers: [latex]\\text{lowerlimit}=Q_1-1.5 \\times IQR;[\/latex] \u00a0[latex]\\text{upperlimit}=Q_3+1.5 \\times IQR;[\/latex] [latex]IQR=Q_3-Q_1[\/latex]<\/li>\n<li>Sample mean: [latex]\\frac{x_1 + x_2 + \\dots + x_n}{n} = \\frac{\\sum x_i}{n}[\/latex]<\/li>\n<li>Sample standard deviation:\u00a0[latex]s = \\sqrt{ \\frac{\\sum (x_i - \\bar{x})^2 }{n-1} } = \\sqrt{ \\frac{ \\left( \\sum x_i^2 \\right) - \\frac{ \\left( \\sum x_i \\right)^2 }{n} }{n-1} }[\/latex]<\/li>\n<\/ul>\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Probability Concepts<\/strong><\/p>\n<ul>\n<li><strong class=\"import-Strong\">Equal-likely outcome model: Probability of event<\/strong> <strong class=\"import-Strong\"><em>E<br \/>\n<\/em><\/strong><\/p>\n<p style=\"text-align: center;\">[latex]P(E)= \\frac{\\text{\\# of sample points in event E}}{\\text{\\# of sample points in sample space S} } = \\frac{\\text{\\# of ways event E can occur}}{\\text{\\# of possible outcomes}}= \\frac{f}{N}[\/latex]<\/p>\n<\/li>\n<li>Complement rule: [latex]P(not \\: E)=1-P(E)[\/latex]<\/li>\n<li>Special addition rule: [latex]P(A \\: or \\: B)=P(A)+P(B)[\/latex]\u00a0if events [latex]A[\/latex]\u00a0and [latex]B[\/latex]\u00a0are mutually exclusive. More generally, if events [latex]A,B,C, \\dots[\/latex]\u00a0are mutually exclusive, then [latex]P(A \\: or \\: B \\: or \\: C \\: or \\: \\dots)=P(A)+P(B)+P(C) + \\dots[\/latex]<\/li>\n<li>General addition rule: [latex]P(A \\:or \\: B)=P(A)+P(B)-P(A \\: \\& \\: B)[\/latex]<\/li>\n<li>Conditional probability of [latex]A[\/latex]\u00a0<span style=\"text-align: initial; font-size: 1em;\">given <\/span>[latex]B[\/latex]: [latex]P(A|B)=\\frac{P(A \\: \\& \\: B)}{P(B)}[\/latex]\u00a0for [latex]P(B) \\: \\gt \\: 0[\/latex]<\/li>\n<li>General multiplication rule: [latex]P(A \\: \\& \\:B)=P(B)P(A|B)=P(A)P(B|A)[\/latex]<\/li>\n<li>Special multiplication rule: [latex]P(A \\: \\& \\: B)=P(A)P(B)[\/latex] if events [latex]A[\/latex] and [latex]B[\/latex] are independent. More generally, if events [latex]A,B,C, \\dots[\/latex] are independent, [latex]P(A \\: \\& \\: B \\: \\& \\: C \\: \\& \\: \\dots) =P(A) \\times P(B) \\times P(C) \\times \\dots[\/latex]<\/li>\n<li>Two events [latex]A[\/latex]\u00a0and [latex]B[\/latex]\u00a0<span style=\"text-align: initial; font-size: 1em;\">are <\/span><strong style=\"text-align: initial; font-size: 1em;\">independent<\/strong><span style=\"text-align: initial; font-size: 1em;\"> if <\/span><strong style=\"text-align: initial; font-size: 1em;\">ANY<\/strong><span style=\"text-align: initial; font-size: 1em;\"> of the following is true:<br \/>\n<\/span><\/p>\n<p style=\"text-align: center;\">[latex]P(A|B)=P(A)[\/latex]\u00a0OR [latex]P(B|A)=P(B)[\/latex]\u00a0OR [latex]P(A \\: \\& \\: B)=P(A) \\times P(B)[\/latex]<\/p>\n<\/li>\n<\/ul>\n<ul>\n<li>Permutation: [latex]nP_r = \\frac{n!}{(n-r)!}[\/latex]<\/li>\n<li>Combination: [latex]nC_r = \\frac{n!}{r!(n-r)!}[\/latex]<\/li>\n<\/ul>\n<p class=\"import-Normal\"><strong class=\"import-Strong\">Discrete Random Variables<\/strong><\/p>\n<ul>\n<li>The mean (expected value) of a discrete random variable [latex]X: \\mu= \\sum xP(X=x)[\/latex]<\/li>\n<li>Standard deviation of [latex]X: \\sigma= \\sqrt{\\sum (x- \\mu)^2 P(X=x)} = \\sqrt{\\sum x^2 P(X=x)-\\mu^2}[\/latex]<\/li>\n<\/ul>\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Binomial Distribution<\/strong><\/p>\n<p>Among [latex]n[\/latex]\u00a0independent Bernoulli trials with probability of success [latex]p[\/latex], let [latex]X[\/latex]\u00a0be the number of successes. The probability of observing [latex]x[\/latex]\u00a0successes is:<\/p>\n<p style=\"text-align: center;\">[latex]P(X=x)={n\u00a0\\choose x} p^x (1-p)^{n-x}=nC_x p^x(1-p)^{n-x}, x=0,1, \\dots , n[\/latex]<\/p>\n<p>The mean and standard deviation of a Binomial distribution are [latex]\\mu = np[\/latex], [latex]\\sigma = \\sqrt{np(1-p)}[\/latex], respectively.<\/p>\n<p class=\"import-Subtitle\"><strong>Normal Distribution<\/strong><\/p>\n<ul>\n<li>If random variable [latex]X \\sim N(\\mu, \\sigma)[\/latex], then the standardized variable [latex]Z=\\frac{X-\\mu}{\\sigma} \\sim N(0,1)[\/latex].<\/li>\n<li>Given an [latex]x[\/latex]\u00a0value, its\u00a0z-score is [latex]z=\\frac{x-\\mu}{\\sigma}[\/latex]<\/li>\n<li>Given the\u00a0z-score, find the [latex]x[\/latex]\u00a0value: [latex]x=\\mu+z \\times \\sigma[\/latex].<\/li>\n<li>If sample mean [latex]\\bar{X} \\sim N(\\mu_{\\bar{X}}=\\mu, \\sigma_{\\bar{X}}= \\frac{\\sigma}{\\sqrt{n}})[\/latex], the standardized variable [latex]Z=\\frac{\\bar{X}-\\mu_{\\bar{X}}}{\\sigma_{\\bar{X}}}= \\frac{\\bar{X} - \\mu}{\\sigma \/ \\sqrt{n}} \\sim N(0,1)[\/latex].<\/li>\n<\/ul>\n<p class=\"import-Subtitle\"><strong>Sampling Distributions<\/strong><\/p>\n<ul>\n<li>Mean and standard deviation of the sample mean [latex]\\bar{X}: \\mu_{\\scriptsize \\bar{X}}= \\mu, \\sigma_{\\scriptsize \\bar{X}} = \\frac{\\sigma}{\\sqrt{n}}[\/latex]<\/li>\n<li>Mean and standard deviation of a sample proportion [latex]\\hat{p}: \u00a0\\mu_{\\scriptsize \\hat{p}} = p; \\sigma_{\\scriptsize \\hat{p}} =\\sqrt{ \\frac{p(1-p)}{n}}[\/latex]<\/li>\n<li>Mean and standard deviation of [latex]\\bar{X}_1 - \\bar{X}_2: \\mu_{\\scriptsize \\bar{X}_1 - \\bar{X}_2} = \\mu_1 - \\mu_2; \\sigma_{\\scriptsize \\bar{X}_1 - \\bar{X}_2} = \\sqrt{ \\frac{\\sigma_1^2}{n_1} + \\frac{\\sigma_2^2}{n_2}}[\/latex]<\/li>\n<li>Mean and standard deviation of [latex]\\hat{p}_1\u00a0 - \\hat{p}_2: \\mu_{\\scriptsize \\hat{p}_1\u00a0 - \\hat{p}_2} = p_1 - p_2; \\sigma_{\\scriptsize \\hat{p}_1\u00a0 - \\hat{p}_2} = \\sqrt{ \\frac{p_1(1-p_1)}{n_1} + \\frac{p_2(1-p_2)}{n_2}}[\/latex]<\/li>\n<\/ul>\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Confidence Intervals and Hypothesis Tests<\/strong><\/p>\n<table class=\"grid\" style=\"height: 524px; width: 100%;\">\n<thead>\n<tr class=\"shaded\" style=\"height: 30px;\">\n<td style=\"width: 84.484375px; height: 30px;\">Parameter<\/td>\n<td style=\"width: 80.5625px; height: 30px;\">Estimate<\/td>\n<td style=\"width: 152.859375px; height: 30px;\">Test Statistic<\/td>\n<td style=\"width: 304.359375px; height: 30px;\">\n<div>[latex](1 - \\alpha) \\times 100 \\%[\/latex]\u00a0<span style=\"font-family: inherit; font-size: inherit;\">Confidence Interval<\/span><\/div>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"TableGrid-R\" style=\"height: 45px;\">\n<td style=\"width: 84.484375px; height: 45px;\">[latex]\\mu[\/latex]<\/td>\n<td style=\"width: 80.5625px; height: 45px;\">[latex]\\bar{x}[\/latex]<\/td>\n<td style=\"width: 152.859375px; height: 45px;\">[latex]t_o = \\frac{\\bar{x} - \\mu_0}{\\left( \\frac{s}{\\sqrt{n}} \\right)}[\/latex]<\/td>\n<td style=\"width: 304.359375px; height: 45px;\">\n<div>[latex]\\bar{x} \\pm t_{\\alpha \/ 2} \\frac{s}{\\sqrt{n}}[\/latex]\u00a0with\u00a0[latex]df=n-1[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 45px;\">\n<td style=\"width: 84.484375px; height: 45px;\">[latex]p[\/latex]<\/td>\n<td style=\"width: 80.5625px; height: 45px;\">[latex]\\hat{p}[\/latex]<\/td>\n<td style=\"width: 152.859375px; height: 45px;\">[latex]z_o = \\frac{\\hat{p} - p_0}{\\sqrt{\\frac{p_0(1 - p_0)}{n}}}[\/latex]<\/td>\n<td style=\"width: 304.359375px; height: 45px;\">[latex]\\hat{p} \\pm z_{\\alpha \/ 2} \\sqrt{\\frac{\\hat{p}(1 - \\hat{p})}{n}} , \\hat{p} = \\frac{x}{n}[\/latex]<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 134px;\">\n<td style=\"width: 84.484375px; height: 134px;\">[latex]\\mu_1 - \\mu_2[\/latex]<\/td>\n<td style=\"width: 80.5625px; height: 134px;\">[latex]\\bar{x}_1 - \\bar{x}_2[\/latex]<\/td>\n<td style=\"width: 152.859375px; height: 134px;\">[latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{\\sqrt{\\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}}[\/latex]<\/td>\n<td style=\"width: 304.359375px; height: 134px;\">[latex](\\bar{x}_1 - \\bar{x}_2) \\pm t_{\\alpha \/ 2} \\sqrt{\\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}[\/latex]\u00a0with<\/p>\n<div>[latex]df = \\frac{\\left( \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}\u00a0\\right)^2}{ \\left( \\frac{1}{n_1 - 1} \\right) \\left( \\frac{s_1^2}{n_1} \\right)^2 + \\left( \\frac{1}{n_2 - 1} \\right) \\left( \\frac{s_2^2}{n_2} \\right)^2}[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 60px;\">\n<td style=\"width: 84.484375px; height: 60px;\">[latex]\\mu_1 - \\mu_2[\/latex]<\/td>\n<td style=\"width: 80.5625px; height: 60px;\">[latex]\\bar{x}_1 - \\bar{x}_2[\/latex]<\/td>\n<td style=\"width: 152.859375px; height: 60px;\">[latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{ s_p \\sqrt{\\frac{1}{n_1} + \\frac{1}{n_2}}}[\/latex]<\/td>\n<td style=\"width: 304.359375px; height: 60px;\">[latex](\\bar{x}_1 - \\bar{x}_2) \\pm t_{\\alpha \/ 2} s_p \\sqrt{\\frac{1}{n_1} + \\frac{1}{n_2}}[\/latex]\u00a0with\u00a0[latex]df=n_1+n_2-2[\/latex]<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 75px;\">\n<td style=\"width: 84.484375px; height: 75px;\">[latex]\\mu_1 - \\mu_2[\/latex]<\/td>\n<td style=\"width: 80.5625px; height: 75px;\">[latex]\\bar{d}[\/latex]<\/td>\n<td style=\"width: 152.859375px; height: 75px;\">[latex]t_o = \\frac{\\bar{d} - \\delta_0}{\\left( \\frac{s_d}{\\sqrt{n}} \\right)}[\/latex]<\/td>\n<td style=\"width: 304.359375px; height: 75px;\">\n<div>[latex]\\bar{d} \\pm t_{\\alpha \/ 2} \\frac{s_d}{\\sqrt{n}}[\/latex]\u00a0with [latex]df=n-1[\/latex], [latex]n\u00a0=[\/latex] # of pairs<br \/>\n[latex]\\bar{d} = \\frac{\\sum d_i}{n}, s_d = \\sqrt{\\frac{\\left( \\sum d_i^2 \\right) - \\frac{\\left( \\sum d_i \\right)^2}{n} }{n-1}}[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 90px;\">\n<td style=\"width: 84.484375px; height: 90px;\">[latex]p_1-p_2[\/latex]<\/td>\n<td style=\"width: 80.5625px; height: 90px;\">[latex]\\hat{p}_1 - \\hat{p}_2[\/latex]<\/td>\n<td style=\"width: 152.859375px; height: 90px;\">[latex]z_o = \\frac{\\hat{p}_1 - \\hat{p}_2}{\\sqrt{\\hat{p}_p (1 - \\hat{p}_p)} \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2} }}[\/latex]<\/td>\n<td style=\"width: 304.359375px; height: 90px;\">[latex](\\hat{p}_1 - \\hat{p}_2) \\pm z_{\\alpha \/ 2} \\sqrt{\\frac{\\hat{p}_1 (1 - \\hat{p}_1)}{n_1} + \\frac{\\hat{p}_2 (1 - \\hat{p}_2)}{n_2}}[\/latex]<br \/>\n[latex]\\hat{p}_p = \\frac{x_1 + x_2}{n_1 + n_2}, \\hat{p}_1 = \\frac{x_1}{n_1}, \\hat{p}_2 = \\frac{x_2}{n_2}[\/latex]<\/td>\n<\/tr>\n<tr class=\"TableGrid-R\" style=\"height: 45px;\">\n<td style=\"width: 84.484375px; height: 45px;\">[latex]\\beta_1[\/latex]<\/td>\n<td style=\"width: 80.5625px; height: 45px;\">[latex]b_1[\/latex]<\/td>\n<td style=\"width: 152.859375px; height: 45px;\">[latex]t_o = \\frac{b_1}{\\left( \\frac{s_e}{\\sqrt{S_{xx}}} \\right)}[\/latex]<\/td>\n<td style=\"width: 304.359375px; height: 45px;\">\n<div>[latex]b_1 \\pm t_{\\alpha \/ 2} \\frac{s_e}{\\sqrt{S_{xx}}}[\/latex]\u00a0with\u00a0[latex]df=n-2[\/latex]<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"import-Subtitle\"><strong class=\"import-Strong\">Margin of Error and Sample Size Calculation<\/strong><\/p>\n<ul>\n<li>Margin of error for the estimate of [latex]\\mu: E = z_{\\alpha \/ 2} \\frac{\\sigma}{\\sqrt{n}}[\/latex]<\/li>\n<li>Sample size calculation for [latex]\\mu : = \\left( \\frac{\\sigma \\times z_{\\alpha \/ 2}}{E} \\right)^2[\/latex]\u00a0round up to the nearest integer<\/li>\n<li>Margin of error for the estimate of [latex]p: E = z_{\\alpha \/ 2} \\sqrt{ \\frac{\\hat{p}(1 - \\hat{p})}{n} }[\/latex]<\/li>\n<li>Sample size calculation for [latex]p[\/latex]\u00a0without guessing [latex]\\hat{p}: n \\leq 0.05 (1 - 0.05) \\left( \\frac{z_{\\alpha \/ 2}}{E} \\right)^2 = 0.25 \\left( \\frac{z_{\\alpha \/ 2}}{E} \\right)^2[\/latex]<\/li>\n<li>Sample size calculation for [latex]p[\/latex] with guessing [latex]\\hat{p}: n = p_g (1 - p_g) \\left( \\frac{z_{\\alpha \/ 2}}{E} \\right)^2[\/latex] round up<\/li>\n<\/ul>\n<p class=\"import-Subtitle\"><strong>Chi-Square Test<\/strong><\/p>\n<ul>\n<li>Chi-square goodness-of-fit test for one categorical\/discrete variable:\n<ul>\n<li>Expected frequency: [latex]E=np[\/latex]<\/li>\n<li>Test statistic: [latex]\\chi_o^2 = \\sum_{\\text{all cells}} \\frac{(O - E)^2}{E}[\/latex]\u00a0with [latex]df=k-1[\/latex], where [latex]k[\/latex]\u00a0is number of possible values of the variable<\/li>\n<\/ul>\n<\/li>\n<li>Chi-square independence (or homogeneity) test of two variables:\n<ul>\n<li>Expected frequency: [latex]E=\\frac{\\text{(rth row total)} \\times \\text{(cth column total)}}{n}[\/latex]<\/li>\n<li>Test statistic: [latex]\\chi_o^2 = \\sum_{\\text{all cells}} \\frac{(O - E)^2}{E}[\/latex]\u00a0with [latex]df=(r-1) \\times (c-1)[\/latex]\u00a0where [latex]r[\/latex]\u00a0is the number of rows and [latex]c[\/latex]\u00a0is number of columns of the cells.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"import-Subtitle\"><strong>Regression Analysis<\/strong><\/p>\n<ul>\n<li>Sums of squares\n<p style=\"text-align: center;\">[latex]S_{xy}= \\sum x_i y_i - \\frac{\\left( \\sum x_i \\right) \\left( \\sum y_i \\right) }{n}; S_{xx} = x_i^2 - \\frac{\\left( \\sum x_i \\right)^2}{n}; S_{yy} = \\sum y_i^2 - \\frac{\\left( \\sum y_i \\right)^2}{n}[\/latex]<\/p>\n<\/li>\n<li>The least-squares straight line: [latex]\\hat{y} = b_0 + b_1 x[\/latex]\u00a0, where [latex]b_1 = \\frac{S_{xy}}{S_{xx}}[\/latex]\u00a0and [latex]b_0 = \\bar{y} - b_1 \\bar{x} = \\frac{\\sum y_i}{n} \u00a0- b_1 \\frac{\\sum x_i}{n}[\/latex]<\/li>\n<li>Total sum of squares: [latex]SST = \\sum (y_i - \\bar{y})^2 = S_{yy}[\/latex]<\/li>\n<li>Regression sum of squares: [latex]SSR = \\sum (\\hat{y} - \\bar{y})^2 = r^2 S_{yy} = \\frac{S_{xy}^2}{S_{xx}}[\/latex]<\/li>\n<li>Error sum of squares: [latex]SSE = \\sum (y_i - \\hat{y}_i)^2 = \\sum e_i^2 = SST - SSR = S_{yy} - \\frac{S_{xy}^2}{S_{xx}}[\/latex]<\/li>\n<li>Regression identify: [latex]SST=SSE+SSR[\/latex]<\/li>\n<li>Residual: [latex]e_i \u00a0= y_i -\\hat{y}_i = y_i - (b_0 + b_1 x_i)[\/latex]<\/li>\n<li>Correlation coefficient: [latex]r = \\frac{S_{xy}}{\\sqrt{S_{xx} \\times S_{yy}}}[\/latex]<\/li>\n<li>Coefficient of determination: [latex]R^2=r^2= \\frac{S_{xy}^2}{S_{xx} \\times S_{yy}}=\\frac{SSR}{SST}[\/latex]<\/li>\n<li>Standard error of the estimate: [latex]s_e = \\sqrt{ \\frac{\\sum (e_i - \\bar{e})^2}{n-2} } = \\sqrt{ \\frac{\\sum e_i^2}{n-2}} = \\sqrt{\\frac{SSE}{n-2}}[\/latex]<\/li>\n<li>Test statistic for [latex]\\beta_1: t_o = \\frac{b_1}{\\left( \\frac{s_e}{\\sqrt{S_{xx}}} \\right)}[\/latex] with [latex]df=n-2[\/latex]<\/li>\n<li>A [latex](1 - \\alpha) \\times 100 \\%[\/latex] confidnece interval for [latex]\\beta_1: b_1 \\pm t_{\\alpha \/ 2} \\frac{s_e}{\\sqrt{S_{xx}}}[\/latex] with [latex]df = n-2[\/latex]<\/li>\n<li>A [latex](1 - \\alpha) \\times 100 \\%[\/latex] confidence interval for\u00a0the conditional mean [latex]\\mu_p[\/latex]\u00a0is\n<p style=\"text-align: center;\">[latex]\\hat{\\mu}_p \\pm t_{\\alpha \/ 2} \\times SE(\\hat{\\mu}_p) = (b_0 + b_1 x_p) \\pm t_{\\alpha \/ 2} \\times s_e \\sqrt{\\frac{(x_p - \\bar{x})^2}{S_{xx}} + \\frac{1}{n}}[\/latex]\u00a0with [latex]df=n-2[\/latex]<\/p>\n<\/li>\n<\/ul>\n<div>\n<ul>\n<li>A [latex](1 - \\alpha) \\times 100 \\%[\/latex] confidence interval for a single response [latex]y_p[\/latex]\u00a0is\n<p style=\"text-align: center;\">[latex]\\hat{y}_p \\pm t_{\\alpha \/ 2} \\times SE(\\hat{y}_p) = (b_0 + b_1 x_p) \\pm t_{\\alpha \/ 2} \\times s_e \\sqrt{\\frac{(x_p - \\bar{x})^2}{S_{xx}} + \\frac{1}{n} + 1}[\/latex]\u00a0with [latex]df=n-2[\/latex]<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<p class=\"import-Subtitle\"><strong>Analysis of Variance (One-Way ANOVA F Test)<\/strong><\/p>\n<p>Compare [latex]k[\/latex]\u00a0population means: [latex]\\mu_1, \\mu_2 , \\dots , \\mu_k[\/latex]. Denote sample sizes as [latex]n_1,n_2, \\dots ,n_k[\/latex], sample means as [latex]\\bar{x}_1, \\bar{x}_2, \\dots , \\bar{x}_k[\/latex] and sample standard deviations as [latex]s_1,s_2, \\dots ,s_k[\/latex]. Let [latex]n=n_1 + n_2 + \\dots + n_k[\/latex] and [latex]\\bar{x} = \\frac{\\sum x_{ij}}{n}[\/latex] where [latex]x_{ij}[\/latex] is the jth observation of sample [latex]i[\/latex].<\/p>\n<ul>\n<li>Test statistic:\u00a0[latex]F_o = \\frac{SSTR \/ (k-1)}{SSE \/ (n-k)} = \\frac{MSTR}{MSE}[\/latex]\u00a0with [latex]df_n=k-1[\/latex]\u00a0and [latex]df_d=n-k[\/latex]<\/li>\n<li>Total sum of squares:\u00a0[latex]SST = \\sum (x_{ij} - \\bar{x})^2 = \\sum x_{ij}^2 - \\frac{\\left( \\sum x_{ij} \\right)^2}{n}[\/latex]<\/li>\n<li>Treatment sum of squares:\u00a0<span style=\"font-size: 1em;\">[latex]SSTR = \\sum_{i=1}^k n_i (\\bar{x}_i - \\bar{x})^2[\/latex]<\/span><\/li>\n<li>Error sum of squares:\u00a0<span style=\"font-size: 1em;\">[latex]SSE = \\sum (x_{ij} - \\bar{x}_i)^2 = \\sum_{i=1}^k (n_i -1)s_i^2 = SST - SSTR[\/latex]<\/span><\/li>\n<li>ANOVA identity: [latex]SST=SSE+SSTR[\/latex]<\/li>\n<\/ul>\n<\/div>\n","protected":false},"author":19,"menu_order":1,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"back-matter-type":[44],"contributor":[],"license":[],"class_list":["post-1512","back-matter","type-back-matter","status-publish","hentry","back-matter-type-resources"],"_links":{"self":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/back-matter\/1512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/back-matter"}],"about":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/types\/back-matter"}],"author":[{"embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/users\/19"}],"version-history":[{"count":28,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/back-matter\/1512\/revisions"}],"predecessor-version":[{"id":5427,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/back-matter\/1512\/revisions\/5427"}],"metadata":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/back-matter\/1512\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/media?parent=1512"}],"wp:term":[{"taxonomy":"back-matter-type","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/back-matter-type?post=1512"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/contributor?post=1512"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/license?post=1512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}