#set document(title: "7.4 Z-Interval for a Mean", 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")) == 7.4#h(0.6em)Z-Interval for a Mean Suppose you want to estimate the mean weight of newborn infants, or you want to estimate the mean salary of college graduates. A confidence interval for the mean would be the way to estimate these means. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ A 100(1 - #math.equation(block: false, alt: "α")[$α$] )% confidence interval for a population mean μ: (σ known) Choose a simple random sample of size n from a population having unknown mean μ. The 100(1 - #math.equation(block: false, alt: "α")[$α$])% confidence interval estimate for μ is given by, #math.equation(block: false, alt: "x bar ± z sub α / 2 open parenthesis the fraction σ over the square root of n close parenthesis")[$overline(x) ± z_(α / 2) ( frac(σ, sqrt(n)) )$]. ] The point estimate for μ is #math.equation(block: false, alt: "x bar")[$limits(x)^(―)$], and the margin of error is #math.equation(block: false, alt: "z sub α / 2 open parenthesis the fraction σ over the square root of n close parenthesis")[$z_(α / 2) ( frac(σ, sqrt(n)) )$]. Where #math.equation(block: false, alt: "z sub the fraction α over 2")[$z_(frac(α, 2))$] is the value on the standard normal curve with area 1 – #math.equation(block: false, alt: "α")[$α$] between the critical values –z#sub[#math.equation(block: false, alt: "α")[$α$]]#sub[/2] and +z#sub[#math.equation(block: false, alt: "α")[$α$]]#sub[/2], as shown below in Figure 7-2. #figure(figph[Standard normal curve drawn in red with a small shaded region in each tail labeled Area = α/2, the middle labeled Area = 1 − α, and axis values −z α/2, 0, and +z α/2.], alt: "Standard normal curve drawn in red with a small shaded region in each tail labeled Area = α/2, the middle labeled Area = 1 − α, and axis values −z α/2, 0, and +z α/2.", caption: [Figure 7-2]) Note: In the notation, z#sub[#math.equation(block: false, alt: "α")[$α$]]#sub[/2] the #math.equation(block: false, alt: "α")[$α$]/2 represents the area in each of the tails, see Figure 7-2. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ The confidence interval can be expressed as an inequality or an interval of values. #math.equation(block: true, alt: "x bar minus z sub α / 2 times the fraction σ over the square root of n less than μ less than x bar plus z sub α / 2 times the fraction σ over the square root of n or open parenthesis x bar minus z sub α / 2 times the fraction σ over the square root of n , x bar plus z sub α / 2 times the fraction σ over the square root of n close parenthesis")[$overline(x) − z_(α / 2) · frac(σ, sqrt(n)) < μ < overline(x) + z_(α / 2) · frac(σ, sqrt(n)) #h(1em) " or " #h(1em) ( overline(x) − z_(α / 2) · frac(σ, sqrt(n)) , overline(x) + z_(α / 2) · frac(σ, sqrt(n)) )$] ] Assumptions: 1. If the sample size is small (n \< 30), the population we are sampling from must be normally distributed. If the sample size is “large” (n ≥ 30) the Central Limit Theorem guarantees that the sampling distribution of the mean will be normally distributed no matter how the population distribution is distributed. 2. The population standard deviation σ must be known. Most of the time we are using σ from a similar study or a prior year’s data. If you have a sample standard deviation then we will use a different method introduced in a later section. These assumptions #strong[must be] addressed before using these statistical inferences. In most cases, we do not know the population standard deviation so will not use the z-interval. Instead, we will use a different sampling distribution called the Student’s t-distribution or t-distribution for short. #examplebox("Example 1")[][ Suppose we select a random sample of 100 pennies in circulation in order to estimate the average age of all pennies that are still in circulation. The sample average age, in years, was found to be #math.equation(block: false, alt: "x bar")[$limits(x)^(―)$] = 14.6. For the sake of this example, let us assume that the population standard deviation is 4 years old. Find a 95% confidence interval for the true average age of pennies that are still in circulation. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Reproduce the book's invNorm step] The book finds its critical value with =NORM.INV(0.975,0,1) or invNorm(0.975,0,1); this link opens that exact computation. Then the margin of error is 1.96(4/sqrt(100)) = 0.784 and the interval is (13.816, 15.384) -- finish the arithmetic like the book does. - invNorm(0.975,0,1) = 1.96 ] #solutionbox[ We can use the above (z) model because σ is known, the population distribution shape is unknown, but the sample size is over 30. Use Excel or your calculator to find z#sub[#math.equation(block: false, alt: "α")[$α$]]#sub[/2] for a 95% confidence interval. In Excel use =NORM.INV(lower tail area, mean, standard deviation). It is easier to deal with the positive z-score so use the z to the right of the mean which would have 1 – #math.equation(block: false, alt: "α")[$α$]/2 = 0.975 area. In Excel use =NORM.INV(0.975,0,1) or the calculator invNorm(0.975,0,1) which gives z#sub[#math.equation(block: false, alt: "α")[$α$]]#sub[/2] = 1.96. #math.equation(block: true, alt: "x bar ± z sub the fraction α over 2 the fraction σ over the square root of n ⇒ 14.6 ± 1.96 open parenthesis the fraction 4 over the square root of 100 close parenthesis ⇒ 14.6 ± 0.784 ⇒ open parenthesis 13.816 , 15.384 close parenthesis")[$overline(x) ± z_(frac(α, 2)) frac(σ, sqrt(n)) #h(1em) ⇒ #h(1em) 14.6 ± 1.96 ( frac(4, sqrt(100)) ) #h(1em) ⇒ #h(1em) 14.6 ± 0.784 #h(1em) ⇒ ( 13.816 , 15.384 )$] The point estimate for μ is 14.6 years, and the margin of error is 0.784 years. If we were to repeat this same sampling process, we would expect 95 out of 100 such intervals to contain the true population mean age of all pennies in circulation. A shorthand way to say this is, with 95% confidence that the population mean age of all pennies in circulation is between 13.816 to 15.384 years. The answer is expressed as an inequality so the confidence interval is 13.816 \< µ \< 15.384. You can also use interval notation (13.816, 15.384) which is more common and matches the notation found on most calculators. #strong[TI-84:] Press the \[STAT\] key, arrow over to the \[TESTS\] menu, arrow down to the \[7:ZInterval\] option and press the \[ENTER\] key. Arrow over to the \[Stats\] menu and press the \[ENTER\] key. Then type in the population or sample standard deviation, sample mean, sample size and confidence level, arrow down to \[Calculate\] and press the \[ENTER\] key. The calculator returns the answer in interval notation. #figure(figph[Three TI-84 screens: the STAT TESTS menu with 7:ZInterval selected, the ZInterval input screen with Inpt set to Stats, σ:4, x-bar:14.6, n:100, C-Level:.95, and the output interval (13.816,15.384) with x-bar=14.6 and n=100.], alt: "Three TI-84 screens: the STAT TESTS menu with 7:ZInterval selected, the ZInterval input screen with Inpt set to Stats, σ:4, x-bar:14.6, n:100, C-Level:.95, and the output interval (13.816,15.384) with x-bar=14.6 and n=100.", caption: none) #strong[TI-89:] Go to the \[Apps\] #strong[Stat/List Editor], then press \[2#super[nd]\] then F7 \[Ints\], then select #strong[1: ZInterval]. Choose the input method, data is when you have entered #strong[data] into a list previously or #strong[stats] when you are given the mean and standard deviation already. Type in the population standard deviation, sample mean, sample size (or list name (list1), and Freq: 1) and confidence level, and press the \[ENTER\] key to calculate. The calculator returns the answer in interval notation. #figure(figph[Four TI-89 screens: the Ints menu with 1:ZInterval selected, the Choose Input Method dialog set to Stats, the Z Interval entry with σ 4, x-bar 14.6, n 100, and C Level 95, and the output C Int {13.82,15.38} with x-bar=14.6 and ME=.783986.], alt: "Four TI-89 screens: the Ints menu with 1:ZInterval selected, the Choose Input Method dialog set to Stats, the Z Interval entry with σ 4, x-bar 14.6, n 100, and C Level 95, and the output C Int {13.82,15.38} with x-bar=14.6 and ME=.783986.", caption: none) ] ]