#set document(title: "9.6 Chapter 9 Formulas", author: "Rachel Webb") #set page(width: 8.5in, height: auto, margin: 1in) #import "@preview/cetz:0.5.2" #set text(font: ("STIX Two Text", "Libertinus Serif", "New Computer Modern"), size: 10.5pt, lang: "en") #show math.equation: set text(font: ("STIX Two Math", "New Computer Modern Math")) #set par(justify: true, leading: 0.62em, spacing: 0.9em) #set enum(spacing: 1.1em) // room between list items so tall inline fractions don't collide #set list(spacing: 1.1em) #set table(stroke: 0.5pt + rgb("#c7ccd3")) #let BLUE = rgb("#183B6F") // brand navy — section bars + example/solution labels (white on navy 11.09:1) #let ORANGE = rgb("#A94509") // brand primary-700 — AA-safe deep orange for TEXT (5.93:1 on white; raw brand #F37021 is 2.94:1 and must never carry text) #let RED = rgb("#DC2626") // brand error-600 #let GREEN = rgb("#059669") // brand success-600 (decoration only; small green text uses green-text #007942) #show heading.where(level: 1): it => block(width: 100%, above: 0pt, below: 16pt, fill: gradient.linear(BLUE, rgb("#2C5AA0")), inset: (x: 14pt, y: 12pt), radius: 3pt, text(fill: white, weight: "bold", size: 19pt, it.body)) #show heading.where(level: 2): it => block(width: 100%, above: 18pt, below: 10pt, fill: BLUE, inset: (x: 10pt, y: 6pt), radius: 2pt, text(fill: white, weight: "bold", size: 12pt, it.body)) #show heading.where(level: 3): it => text(fill: ORANGE, weight: "bold", size: 12.5pt, it.body) #show heading.where(level: 4): it => text(fill: BLUE, weight: "bold", size: 10.5pt, it.body) #let examplebox(label, title, body) = block(width: 100%, breakable: true, fill: rgb("#EFF1F5"), stroke: 0.5pt + rgb("#CFDDF0"), radius: 4pt, inset: 10pt, above: 12pt, below: 12pt)[ #block(below: 6pt)[#box(fill: BLUE, inset: (x: 6pt, y: 2pt), radius: 2pt, text(fill: white, weight: "bold", size: 8.5pt, label)) #h(0.4em) #strong[#title]] #body] // rail = decorative left rule (raw brand token); labelcolor = AA-safe label text shade #let notebox(label, rail, labelcolor, tint, body) = block(width: 100%, breakable: true, fill: tint, stroke: (left: 3pt + rail), inset: (left: 10pt, rest: 8pt), radius: (right: 4pt), above: 11pt, below: 11pt)[ #text(fill: labelcolor, weight: "bold", size: 7.5pt, tracking: 0.5pt)[#upper(label)] #linebreak() #body] #let solutionbox(body) = block(above: 4pt, below: 8pt)[ #text(fill: BLUE, weight: "bold", size: 8.5pt)[Solution] #linebreak() #body] #let figph(msg) = block(width: 100%, height: 60pt, fill: rgb("#f6f7f9"), stroke: (paint: rgb("#c7ccd3"), dash: "dashed"), radius: 4pt, inset: 10pt)[ #align(center + horizon, text(fill: rgb("#889"), style: "italic", size: 9pt, msg))] // Standardize inlined figure sizes: measure the natural CeTZ canvas, then scale to a // consistent envelope (aspect-aware; see build_typst.py FIG_* constants). Unlike the // print preamble, dimensions are FLOORED: in an editor a user can trim a figure to a // degenerate 1-D shape (a bare line), and w/h or tw/w would then divide by zero. #let _STD_W = 3.5 #let _WIDE_W = 5.6 #let _MAX_H = 3.4 #let _ASPECT_WIDE = 2.2 #let _UPSCALE_MAX = 1.15 #let stdfig(body) = context { let m = measure(body) let w = calc.max(m.width / 1in, 0.01) let h = calc.max(m.height / 1in, 0.01) let tw = if w / h > _ASPECT_WIDE { _WIDE_W } else { _STD_W } let s = calc.min(tw / w, _MAX_H / h, _UPSCALE_MAX) align(center, box(scale(x: s * 100%, y: s * 100%, reflow: true, body))) } #show figure: set block(breakable: false) #set figure(gap: 8pt) #show figure.caption: set text(size: 8.5pt, fill: rgb("#555")) == 9.6#h(0.6em)Chapter 9 Formulas #figure(table( columns: 2, align: left, inset: 6pt, table.header([#strong[Hypothesis Test for 2 Dependent Means] #math.equation(block: false, alt: "H sub 0 : μ sub D equals 0")[$H_(0) : μ_(D) = 0$] #math.equation(block: false, alt: "H sub 1 : μ sub D not equal to 0")[$H_(1) : μ_(D) ≠ 0$] #math.equation(block: false, alt: "t equals the fraction D bar minus μ sub D over open parenthesis the fraction S sub D over the square root of n close parenthesis")[$t = frac(overline(D) − μ_(D), ( frac(S_(D), sqrt(n)) ))$] TI-84: T-Test], [#strong[Confidence Interval for 2 Dependent Means] #math.equation(block: false, alt: "D bar ± t sub α / 2 open parenthesis the fraction s sub D over the square root of n close parenthesis")[$overline(D) ± t_(α / 2) ( frac(s_(D), sqrt(n)) )$] TI-84: TInterval]), [#strong[Hypothesis Test for 2 Independent Means] Z-Test: \\(\\begin{aligned} #linebreak() \\mathrm{H}\_{0}: \\mu\_{1} &=\\mu\_{2} \\\\ #linebreak() \\mathrm{H}\_{1}: \\mu\_{1} & \\neq \\mu\_{2} #linebreak() \\end{aligned}\\) #math.equation(block: false, alt: "z equals the fraction open parenthesis x bar sub 1 minus x bar sub 2 close parenthesis minus open parenthesis μ sub 1 minus μ sub 2 close parenthesis sub 0 over the square root of open parenthesis the fraction σ sub 1 squared over n sub 1 plus the fraction σ sub 2 squared over n sub 2 close parenthesis")[$z = frac(( overline(x)_(1) − overline(x)_(2) ) − attach(( μ_(1) − μ_(2) ), b: 0), sqrt(( frac(σ_(1)^(2), n_(1)) + frac(σ_(2)^(2), n_(2)) )))$] TI-84: 2-SampZTest], [#strong[Confidence Interval for 2 Independent Means Z]-#strong[Interval] #linebreak() \\(\\left(\\bar{x}\_{1}-\\bar{x}\_{2}\\right) \\pm z\_{\\alpha / 2} \\sqrt{\\left(\\frac{\\sigma\_{1}^{2}}{n\_{1}}+\\frac{\\sigma\_{2}^{2}}{n\_{2}}\\right)} #linebreak() \\) #linebreak() TI-84: 2-SampZInt], [#strong[Hypothesis Test for 2 Independent Means] \\(\\begin{aligned} #linebreak() &\\mathrm{H}\_{0}: \\mu\_{1}=\\mu\_{2} \\\\ #linebreak() &\\mathrm{H}\_{1}: \\mu\_{1} \\neq \\mu\_{2} #linebreak() \\end{aligned}\\) #strong[T-Test: Assume variances are unequal] #math.equation(block: false, alt: "t equals the fraction open parenthesis x bar sub 1 minus x bar sub 2 close parenthesis minus open parenthesis μ sub 1 minus μ sub 2 close parenthesis sub 0 over the square root of open parenthesis the fraction s sub 1 squared over n sub 1 plus the fraction s sub 2 squared over n sub 2 close parenthesis")[$t = frac(( overline(x)_(1) − overline(x)_(2) ) − attach(( μ_(1) − μ_(2) ), b: 0), sqrt(( frac(s_(1)^(2), n_(1)) + frac(s_(2)^(2), n_(2)) )))$] TI-84: 2-SampTTest #math.equation(block: false, alt: "d f equals the fraction open parenthesis the fraction s sub 1 squared over n sub 1 plus the fraction s sub 2 squared over n sub 2 close parenthesis squared over open parenthesis open parenthesis the fraction s sub 1 squared over n sub 1 close parenthesis squared open parenthesis the fraction 1 over n sub 1 minus 1 close parenthesis plus open parenthesis the fraction s sub 2 squared over n sub 2 close parenthesis squared open parenthesis the fraction 1 over n sub 2 minus 1 close parenthesis close parenthesis")[$d f = frac(attach(( frac(s_(1)^(2), n_(1)) + frac(s_(2)^(2), n_(2)) ), t: 2), ( attach(( frac(s_(1)^(2), n_(1)) ), t: 2) ( frac(1, n_(1) − 1) ) + attach(( frac(s_(2)^(2), n_(2)) ), t: 2) ( frac(1, n_(2) − 1) ) ))$] #strong[T-Test: Assume variances are equal] \\(\\begin{aligned} #linebreak() &t=\\frac{\\left(\\bar{x}\_{1}-\\bar{x}\_{2}\\right)-\\left(\\mu\_{1}-\\mu\_{2}\\right)}{\\sqrt{\\left(\\frac{\\left(n\_{1}-1\\right) s\_{1}^{2}+\\left(n\_{2}-1\\right) s\_{2}^{2}}{\\left(n\_{1}+n\_{2}-2\\right)}\\right)\\left(\\frac{1}{n\_{1}}+\\frac{1}{n\_{2}}\\right)}} \\\\ #linebreak() &d f=\\mathrm{n}\_{1}-\\mathrm{n}\_{2}-2 #linebreak() \\end{aligned}\\)], [#strong[Confidence Interval for 2 Independent Means] #math.equation(block: false, alt: "open parenthesis x bar sub 1 minus x bar sub 2 close parenthesis ± t sub α / 2 the square root of open parenthesis the fraction s sub 1 squared over n sub 1 plus the fraction s sub 2 squared over n sub 2 close parenthesis")[$( overline(x)_(1) − overline(x)_(2) ) ± t_(α / 2) sqrt(( frac(s_(1)^(2), n_(1)) + frac(s_(2)^(2), n_(2)) ))$] TI-84: 2-SampTInt #math.equation(block: false, alt: "d f equals the fraction open parenthesis the fraction s sub 1 squared over n sub 1 plus the fraction s sub 2 squared over n sub 2 close parenthesis squared over open parenthesis open parenthesis the fraction s sub 1 squared over n sub 1 close parenthesis squared open parenthesis the fraction 1 over n sub 1 minus 1 close parenthesis plus open parenthesis the fraction s sub 2 squared over n sub 2 close parenthesis squared open parenthesis the fraction 1 over n sub 2 minus 1 close parenthesis close parenthesis")[$d f = frac(attach(( frac(s_(1)^(2), n_(1)) + frac(s_(2)^(2), n_(2)) ), t: 2), ( attach(( frac(s_(1)^(2), n_(1)) ), t: 2) ( frac(1, n_(1) − 1) ) + attach(( frac(s_(2)^(2), n_(2)) ), t: 2) ( frac(1, n_(2) − 1) ) ))$] #strong[T-Interval: Assume variances are equal] \\(\\begin{aligned} #linebreak() &\\left(\\bar{x}\_{1}-\\bar{x}\_{2}\\right) \\pm t\_{\\alpha / 2} \\sqrt{\\left(\\left(\\frac{\\left(n\_{1}-1\\right) s\_{1}^{2}+\\left(n\_{2}-1\\right) s\_{2}^{2}}{\\left(n\_{1}+n\_{2}-2\\right)}\\right)\\left(\\frac{1}{n\_{1}}+\\frac{1}{n\_{2}}\\right)\\right)} \\\\ #linebreak() &d f=\\mathrm{n}\_{1}-\\mathrm{n}\_{2}-2 #linebreak() \\end{aligned}\\)], [#strong[Hypothesis Test for 2 Proportions] \\(\\begin{aligned} #linebreak() &\\mathrm{H}\_{0}: p\_{1}=p\_{2} \\\\ #linebreak() &\\mathrm{H}\_{1}: p\_{1} \\neq p\_{2} #linebreak() \\end{aligned}\\) #math.equation(block: false, alt: "Z equals the fraction open parenthesis p hat sub 1 minus p hat sub 2 close parenthesis minus open parenthesis p sub 1 minus p sub 2 close parenthesis over the square root of open parenthesis p hat times q hat open parenthesis the fraction 1 over n sub 1 plus the fraction 1 over n sub 2 close parenthesis close parenthesis")[$Z = frac(( hat(p)_(1) − hat(p)_(2) ) − ( p_(1) − p_(2) ), sqrt(( hat(p) · hat(q) ( frac(1, n_(1)) + frac(1, n_(2)) ) )))$] #math.equation(block: false, alt: "p hat equals the fraction open parenthesis x sub 1 plus x sub 2 close parenthesis over open parenthesis n sub 1 plus n sub 2 close parenthesis equals the fraction open parenthesis p hat sub 1 times n sub 1 plus p hat sub 2 times n sub 2 close parenthesis over open parenthesis n sub 1 plus n sub 2 close parenthesis")[$hat(p) = frac(( x_(1) + x_(2) ), ( n_(1) + n_(2) )) = frac(( hat(p)_(1) · n_(1) + hat(p)_(2) · n_(2) ), ( n_(1) + n_(2) ))$] #math.equation(block: false, alt: "q hat equals 1 minus p hat p hat sub 1 equals the fraction x sub 1 over n sub 1 p hat sub 2 equals the fraction x sub 2 over n sub 2")[$hat(q) = 1 − hat(p) #h(1em) hat(p)_(1) = frac(x_(1), n_(1)) hat(p)_(2) = frac(x_(2), n_(2))$] TI-84: 2-PropZInt], [#strong[Confidence Interval for 2 Proportions] #math.equation(block: false, alt: "open parenthesis p hat sub 1 minus p hat sub 2 close parenthesis ± z sub the fraction α over 2 the square root of open parenthesis the fraction p hat sub 1 q hat sub 1 over n sub 1 plus the fraction p hat sub 2 q hat sub 2 over n sub 2 close parenthesis")[$( hat(p)_(1) − hat(p)_(2) ) ± z_(frac(α, 2)) sqrt(( frac(hat(p)_(1) hat(q)_(1), n_(1)) + frac(hat(p)_(2) hat(q)_(2), n_(2)) ))$] #math.equation(block: false, alt: "p hat sub 1 equals the fraction x sub 1 over n sub 1 p hat sub 2 equals the fraction x sub 2 over n sub 2")[$hat(p)_(1) = frac(x_(1), n_(1)) #h(1em) hat(p)_(2) = frac(x_(2), n_(2))$] #math.equation(block: false, alt: "q hat sub 1 equals 1 minus p hat sub 1 q hat sub 2 equals 1 minus p hat sub 2")[$hat(q)_(1) = 1 − hat(p)_(1) #h(1em) hat(q)_(2) = 1 − hat(p)_(2)$] TI-84: 2-PropZInt], [#strong[Hypothesis Test for 2 Variances] \\(\\begin{aligned} #linebreak() &H\_{0}: \\sigma\_{1}^{2}=\\sigma\_{2}^{2} \\\\ #linebreak() &H\_{1}: \\sigma\_{1}^{2} \\neq \\sigma\_{2}^{2} #linebreak() \\end{aligned} \\quad F=\\frac{s\_{1}^{2}}{s\_{2}^{2}}\\) #math.equation(block: false, alt: "d f N equals n sub 1 minus 1 , d f D equals n sub 2 minus 1")[$d f " " upright(N) = n_(1) − 1 , d f D = n_(2) − 1$] TI-84: 2-SampFTest], [#strong[Hypothesis Test for 2 Standard Deviations] \\(\\begin{aligned} #linebreak() &H\_{0}: \\sigma\_{1}=\\sigma\_{2} \\\\ #linebreak() &H\_{1}: \\sigma\_{1} \\neq \\sigma\_{2} #linebreak() \\end{aligned} \\quad F=\\frac{s\_{1}^{2}}{s\_{2}^{2}}\\) #math.equation(block: false, alt: "d f N equals n sub 1 minus 1 , d f D equals n sub 2 minus 1")[$d f " " upright(N) = n_(1) − 1 , d f D = n_(2) − 1$] TI-84: 2-SampFTest], )) The following flow chart in Figure 9-18 can help you decide which formula to use. Start on the left, ask yourself is the question about proportions (%), means (averages), standard deviations or variances? Are there 1 or 2 samples? Was the population standard deviation given? Are the samples dependent or independent? Are you asked to test a claim? If yes then use the test statistic (TS) formula. Are you asked to find a confidence interval? If yes then use the confidence interval (CI) formula. In each box is the null hypothesis and the corresponding TI calculator shortcut key. #figure(figph[Decision flowchart for choosing a hypothesis test, each box giving the null hypothesis, test statistic and confidence interval formulas, and the TI calculator command. Proportions: one sample uses 1-PropZTest, two samples use 2-PropZTest or 2-PropZInt with a pooled proportion. Means: one sample uses the Z-test when σ is known or the t-test with df = n - 1 when unknown; dependent (paired) samples use a t-test on the differences with df = n - 1; independent samples use 2-SampZTest when σ's are known, otherwise 2-SampTTest or 2-SampTInt with pooled (df = n1 + n2 - 2) or unpooled df formulas. Two variances or standard deviations: 2-SampFTest with F = s1²/s2², Ndf = n1 - 1, Ddf = n2 - 1.], alt: "Decision flowchart for choosing a hypothesis test, each box giving the null hypothesis, test statistic and confidence interval formulas, and the TI calculator command. Proportions: one sample uses 1-PropZTest, two samples use 2-PropZTest or 2-PropZInt with a pooled proportion. Means: one sample uses the Z-test when σ is known or the t-test with df = n - 1 when unknown; dependent (paired) samples use a t-test on the differences with df = n - 1; independent samples use 2-SampZTest when σ's are known, otherwise 2-SampTTest or 2-SampTInt with pooled (df = n1 + n2 - 2) or unpooled df formulas. Two variances or standard deviations: 2-SampFTest with F = s1²/s2², Ndf = n1 - 1, Ddf = n2 - 1.", caption: none) Figure 9-18 Download a .pdf version of the flowchart at: #link("http://MostlyHarmlessStatistics.com")[http://MostlyHarmlessStatistics.com]. The same steps are used in hypothesis testing for a one sample test. Use technology to find the p-value or critical value. A clue with many of these questions of whether the samples are dependent is the term “paired” is used, or the same person was being measured before and after some applied experiment or treatment. The p-value will always be a positive number between 0 and 1. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ The same three methods to hypothesis testing, critical value method, p-value method and the confidence interval method are also used in this section. The p-value method is used more often than the other methods. The rejection rule for the three methods are: - P-value method: reject H#sub[0] when the p-value ≤ #math.equation(block: false, alt: "α")[$α$]. - Critical value method: reject H#sub[0] when the test statistic is in the critical tail(s). - Confidence Interval method, reject H#sub[0] when the hypothesized value (0) found in H#sub[0] is outside the bounds of the confidence interval. The most important step in any method you use is setting up your null and alternative hypotheses. ]