#set document(title: "10.8 t distribution", author: "OpenStax") #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")) == 10.8#h(0.6em)t distribution #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Prerequisites] Normal Distribution, Areas Under Normal Distributions, Degrees of Freedom, Confidence Interval for the Mean #linebreak() #linebreak() ] #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Learning Objectives] + State the difference between the shape of the t distribution and the normal distribution + State how the difference between the shape of the t distribution and normal distribution is affected by the degrees of freedom + Use a t table to find the value of t to use in a confidence interval + Use the t calculator to find the value of t to use in a confidence interval ] In the introduction to normal distributions it was shown that 95% of the area of a normal distribution is within 1.96 standard deviations of the mean. Therefore, if you randomly sampled a value from a normal distribution with a mean of 100, the probability it would be within 1.96σ of 100 is 0.95. Similarly, if you sample N values from the population, the probability that the sample mean (M) will be within 1.96 σ#sub[M] of 100 is 0.95. Now consider the case in which you have a normal distribution but you do not know the standard deviation. You sample N values and compute the sample mean (M) and estimate the standard error of the mean (σ#sub[M]) with s#sub[M]. What is the probability that M will be within 1.96 s#sub[M] of the population mean (μ)? This is a difficult problem because there are two ways in which M could be more than 1.96 s#sub[M] from μ: (1) M could, by chance, be either very high or very low and (2) s#sub[M] could, by chance, be very low. Intuitively, it makes sense that the probability of being within 1.96 standard errors of the mean should be smaller than in the case when the standard deviation is known (and cannot be underestimated). But exactly how much smaller? Fortunately, the way to work out this type of problem was solved in the early 20th century by W. S. Gosset who determined the distribution of a mean divided by an #emph[estimate] of its standard error. This distribution is called the #strong[Student's t distribution] or sometimes just the #strong[t distribution]. Gosset worked out the t distribution and associated statistical tests while working for a brewery in Ireland. Because of a contractual agreement with the brewery, he published the article under the pseudonym "Student." That is why the t test is called the "Student's t test." The t distribution is very similar to the normal distribution when the estimate of variance is based on many #strong[degrees of freedom], but has relatively more scores in its tails when there are fewer degrees of freedom. Figure 1 shows t distributions with 2, 4, and 10 degrees of freedom and the standard normal distribution. Notice that the normal distribution has relatively more scores in the center of the distribution and the t distribution has relatively more in the tails. The t distribution is therefore #strong[leptokurtic]. The t distribution approaches the normal distribution as the degrees of freedom increase. #figure(figph[Three symmetric bell curves centered at 0 on an axis from -6 to 6: the standard normal (tallest, red), the t distribution with 4 degrees of freedom (green), and the t distribution with 1 degree of freedom (lowest peak, blue) — the fewer the degrees of freedom, the heavier the tails.], alt: "Three symmetric bell curves centered at 0 on an axis from -6 to 6: the standard normal (tallest, red), the t distribution with 4 degrees of freedom (green), and the t distribution with 1 degree of freedom (lowest peak, blue) — the fewer the degrees of freedom, the heavier the tails.", caption: [Figure 1. A comparison of t distributions with 2, 4, and 10 df and the standard normal distribution. The distribution with the lowest peak is the 2 df distribution, the next lowest is 4 df, the lowest after that is 10 df, and the highest is the standard normal distribution.]) Since the t distribution is leptokurtic, the percentage of the distribution within 1.96 standard deviations of the mean is less than the 95% for the normal distribution. Table 1 shows the number of standard deviations from the mean required to contain 95% and 99% of the area of the t distribution for various degrees of freedom. These are the values of t that you use in a confidence interval. The corresponding values for the normal distribution are 1.96 and 2.58 respectively. Notice that with few degrees of freedom, the values of t are much higher than the corresponding values for a normal distribution and that the difference decreases as the degrees of freedom increase. The values in Table 1 can be obtained from the "Find t for a confidence interval" calculator. Table 1. Abbreviated t table. #figure(table( columns: 3, align: left, inset: 6pt, table.header([df], [0.95], [0.99]), [2], [4.303], [9.925], [3], [3.182], [5.841], [4], [2.776], [4.604], [5], [2.571], [4.032], [8], [2.306], [3.355], [10], [2.228], [3.169], [20], [2.086], [2.845], [50], [2.009], [2.678], [100], [1.984], [2.626], )) Returning to the problem posed at the beginning of this section, suppose you sampled 9 values from a normal population and estimated the standard error of the mean (σ#sub[M]) with s#sub[M]. What is the probability that M would be within 1.96s#sub[M] of μ? Since the sample size is 9, there are N - 1 = 8 df. From Table 1 you can see that with 8 df the probability is 0.95 that the mean will be within 2.306 s#sub[M] of μ. The probability that it will be within 1.96 s#sub[M] of μ is therefore lower than 0.95. As shown in Figure 2, the "t distribution" calculator can be used to find that 0.086 of the area of a t distribution is more than 1.96 standard deviations from the mean, so the probability that M would be less than 1.96sM from μ is 1 - 0.086 = 0.914. #figure(figph[t distribution calculator screenshot for df = 8 and t = 1.96, two-tailed: both tails beyond -1.96 and 1.96 are shaded, and the shaded area is 0.0857.], alt: "t distribution calculator screenshot for df = 8 and t = 1.96, two-tailed: both tails beyond -1.96 and 1.96 are shaded, and the shaded area is 0.0857.", caption: [Figure 2. Area more than 1.96 standard deviations from the mean in a t distribution with 8 df. Note that the two-tailed button is selected so that the area in both tails will be included.]) As expected, this probability is less than 0.95 that would have been obtained if σM had been known instead of estimated. #link("https://onlinestatbook.com/2/calculators/inverse_t_dist.html")[Online: Calculator: Find t for a confidence interval] #linebreak() #link("https://onlinestatbook.com/2/calculators/t_dist.html")[Online: Calculator: t distribution]