#set document(title: "8.5 Percentiles", author: "OpenStax / XYZ Homework") #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")) == 8.5#h(0.6em)Percentiles #figure(figph[A graduate's hand is holding a rolled certificate paper tied with a ribbon.], alt: "A graduate's hand is holding a rolled certificate paper tied with a ribbon.", caption: [Two students graduating with the same class rank could be in different percentiles depending on the school population.]) === Learning Objectives After completing this section, you should be able to: + Compute percentiles. + Solve application problems involving percentiles. A college admissions officer is comparing two students. The first, Anna, finished 12th in her class of 235 people. The second, Brian, finished 10th in his class of 170 people. Which of these outcomes is better? Certainly 10 is less than 12, which favors Brian, but Anna’s class was much bigger. In fact, Anna beat out 223 of her classmates, which is #math.equation(block: false, alt: "the fraction 223 over 235 approximately equals 95 %")[$frac(223, 235) ≈ 95 upright(%)$] of her classmates, while Brian bested 160 out of 170 people, or 94%. Comparing the proportions of the data values that are below a given number can help us evaluate differences between individuals in separate populations. These proportions are called #strong[percentiles]. If #math.equation(block: false, alt: "p %")[$p %$] of the values in a dataset are less than a number #math.equation(block: false, alt: "n")[$n$], then we say that #math.equation(block: false, alt: "n")[$n$] is at the #math.equation(block: false, alt: "p")[$p$]th percentile. === Finding Percentiles There are some other terms that are related to "percentile" with meanings you may infer from their roots. Remember that the word #emph[percent] means “per hundred.” This reflects that percentiles divide our data into 100 pieces. The word #strong[quartile] has a root that means “four.” So, if a data value is at the first quantile of a dataset, that means that if you break the data into four parts (because of the #emph[quart-]), this data value comes after the first of those four parts. In other words, it’s greater than 25% of the data, placing it at the 25th percentile. #strong[Quintile] has a root meaning “five,” so a data value at the third quintile is greater than three-fifths of the data in the set. That would put it at the 60th percentile. The general term for these is #strong[quantiles] (the root #emph[quant]– means “number”). In Mean, Median, and Mode, we defined the #emph[median] as a number that is greater than no more than half of the data in a dataset and is less than no more than half of the data in the dataset. With our new term, we can more easily define it: The median is the value at the 50th percentile (or second quartile). Let’s look at some examples. #examplebox("Example 1")[Finding Percentiles][ Consider the dataset 5, 8, 12, 1, 2, 16, 2, 15, 20, 22. + At what percentile is the value 5? + What value is at the 60th percentile? #solutionbox[ Before we can answer these two questions, we must put the data in increasing order: 1, 2, 2, 5, 8, 12, 15, 16, 20, 22. + There are three values (1, 2, and 2) in the set that are less than 5, and there are ten values in the set. Thus, 5 is at the #math.equation(block: false, alt: "the fraction 3 over 10 times 100 equals 30 th")[$frac(3, 10) × 100 = 30 "th"$] percentile. + To find the value at the 60th percentile, we note that there are ten data values, and 60% of ten is six. Thus, the number we want is greater than exactly six of the data values. Thus, the 60th percentile is 15. ] ] In each of the examples above, the computations were made easier by the fact that the we were looking for percentiles that “came out evenly” with respect to the number of values in our dataset. Things don’t always work out so cleanly. Further, different sources will define the term #emph[percentile] in different ways. In fact, Google Sheets has #emph[three] built-in functions for finding percentiles, none of which uses our definition. Some of the definitions you’ll see differ in the inequality that is used. Ours uses “less than or equal to,” while others use “less than” (these correspond roughly to Google Sheets’ ‘PERCENTILE.INC’ and ‘PERCENTILE.EXC’). Some of them use different methods for #emph[interpolating] values. (This is what we did when we first computed medians without technology; if there were an even number of data values in our dataset, found the mean of the two values in the middle. This is an example of interpolation. Most computerized methods use this technique.) Other definitions don’t interpolate at all, but instead choose the closest actual data value to the theoretical value. Fortunately, for large datasets, the differences among the different techniques become very small. So, with all these different possible definitions in play, what will we use? For small datasets, if you’re asked to compute something involving percentiles #emph[without technology], use the technique we used in the previous example. In all other cases, we’ll keep things simple by using the built-in ‘PERCENTILE’ and ‘PERCENTRANK’ functions in Google Sheets (which do the same thing as the ‘PERCENTILE.INC’ and ‘PERCENTRANK.INC’ functions; they’re “inclusive, interpolating” definitions). #notebox("Video", rgb("#DC2626"), rgb("#DC2626"), rgb("#f7f8fa"))[ #link("https://openstax.org/r/Using-RANK-PERCENTRANK-and-PERCENTILE")[Using RANK, PERCENTRANK, and PERCENTILE in Google Sheets] ] #examplebox("Example 2")[Using Google Sheets to Compute Percentiles: Average SAT Scores][ The data in #link("https://openstax.org/r/Chapter8_Data-Sets")[“AvgSAT”] contains the average SAT score for students attending every institution of higher learning in the US for which data is available. + What score is at the 3rd quartile? + What score is at the 40th percentile? + At what percentile is Albion College in Michigan (average SAT: 1132)? + At what percentile is Oregon State University (average SAT: 1205)? #solutionbox[ + The 3rd quartile is the 75th percentile, so we’ll use the PERCENTILE function. Click on an empty cell, and type “=PERCENTILE(“. Next, enter the data: click on the letter at the top of the column containing the average SAT scores. Then, tell the function which percentile we want; it needs to be entered as a decimal. So, type a comma (to separate the two pieces of information we’re giving this function), then type “0.75” and close the parentheses with “)”. The result should look like this (assuming the data are in column C): “=PERCENTILE(C:C, 0.75)”. When you hit the enter key, the formula will be replaced with the average SAT score at the 75th percentile: 1199. + Using the PERCENTILE function, we find that an average SAT of 1100 is at the 40th percentile. + Since we want to know the percentile for a particular score, we’ll use the PERCENTRANK function. Like the PERCENTILE function, we need to give PERCENTRANK two pieces of information: the data, and the value we care about. So, click on an empty cell, type “=PERCENTRANK(“, and then click on the letter at the top of the column containing the data. Next, type a comma and then the value we want to find the percentile for; in this case, we’ll type “, 1132”. Finally, close the parentheses with “)” and hit the enter key. The formula will be replaced with the information we want: an average SAT of 1132 is at the 54th percentile. + Using the PERCENTRANK function, an average SAT of 1205 is at the 76.1th percentile. ] ] #examplebox("Example 3")[Using Google Sheets to Compute Percentiles: In-State Tuition][ The dataset #link("https://openstax.org/r/Chapter8_Data-Sets")["InState"] contains the in-state tuitions of every college and university in the country that reported that data to the Department of Education. Use that dataset to answer these questions. + What tuition is at the second quintile? + What tuition is at the 95th percentile? + At what percentile is Walla Walla University in Washington (in-state tuition: \$28,035)? + At what percentile is the College of Saint Mary in Nebraska (in-state tuition: \$20,350)? #solutionbox[ + The second quintile is the 40th percentile; using PERCENTILE in Google Sheets, we get \$8,400. + Using PERCENTILE again, we get \$44,866. + Using PERCENTRANK, we get the 81.6th percentile. + Using PERCENTRANK, we get the 74.8th percentile. ] ] === Key Terms - percentile - quartile - quintile - quantile === Key Concepts - The percentile rank of a data value is the percentage of all values in the dataset that are less than or equal to the given value. === Videos - #link("https://openstax.org/r/Using-RANK-PERCENTRANK-and-PERCENTILE")[Using RANK, PERCENTRANK, and PERCENTILE in Google Sheets]