Memra

pnorm, qnorm and the midterm checkpoint

◈ 7 cards

R’s normal functions as table substitutes — pnorm is Φ, qnorm is its inverse, the third argument is σ not σ², lower.tail = FALSE gives the upper tail — and a midterm-style inverse problem end to end.

Two functions, one table

The paper prints R output and asks you to read it. For the normal, two functions cover everything Module 7 has done:

> pnorm(138, mean = 120, sd = 15)
[1] 0.8849303
> pnorm(99, 120, 15, lower.tail = FALSE)
[1] 0.9192433

pnorm(x, mean, sd) is the cdf — in the original units, . The first line is L7.3's to seven digits. The third argument is , not : pnorm(138, 120, 225) would describe a distribution with SD 225 and return a number near 0.53 — plausible-looking and wrong. The course writes ; R wants the 15.

lower.tail = FALSE returns the upper tail, , directly — the second line is without the "1 −". With no arguments beyond , pnorm(1.20) is the standard normal: the table cell 0.8849 itself.

The inverse

> qnorm(0.90, 120, 15)
[1] 139.2233
> qnorm(0.05, 120, 15)
[1] 95.3272

qnorm(p, mean, sd) is the quantile — the with cumulative area — so it is L7.4 in one call: the 90th percentile 139.22 and the lowest-5 % cutoff 95.33. The hand values (139.20 from the cell ; 95.33 from ) differ from R's in the second decimal because R uses the exact , 1.2816. Both are marked correct; when the paper prints qnorm, read it rather than re-deriving. qnorm(0.95) alone is 1.644854 — the origin of the memorised 1.645.

What the midterm can ask

The midterm covers Modules 1–7, and the normal is its last topic and heaviest single item. One question type appears in nearly every sitting: a business threshold set as a percentage, followed by a probability that uses the threshold just found. The worked answer below is the shape to rehearse.

Northfield Credit will hand-review the largest 8 % of invoices, . Find the threshold, and the proportion of invoices between \$100 and the threshold.

  1. Translate. Largest 8 % above means 92 % below: .
  2. Table body. 0.9192 at , 0.9207 at ; 0.9207 is nearer, so .
  3. Un-standardise. Threshold $= 120 + 1.41 \times 15 = \$141.15$.
  4. Second part. , with after rounding. About 83 % of invoices lie between \$100 and the review line.
  5. Conclude in context, with units. "Invoices above \$141.15 — the largest 8 % — go to review; 82.8 % of invoices fall between \$100 and that line."

Each numbered line is a mark. The two most often lost are the translation (0.92, not 0.08 or 0.90) and the sentence at the end.

NORMAL ~/memra/learn/afm-113/pnorm-qnorm-and-the-midterm-checkpoint utf-8 LF