← Module 12 overview
Module 12 · Project 6 · Due the date on Canvas · Interactive Dashboards with Shiny · adaptive competency DV20

Mathematics refresh: define the rate before styling the tile

Module 12 · Step 1 of 9 · Watch7–9 min

A dashboard rate is a ratio with a population, time window, exclusions, and unit. Compare the unweighted mean of campus rates with the pooled rate, then select the calculation that matches the institutional question. When groups differ greatly in size the two summaries diverge, and comparisons of pooled rates between populations of different composition can even reverse (Simpson, 1951; Wagner, 1982).

Group rate\(r_g=x_g/n_g\)
Pooled rate\(r=\sum_g x_g/\sum_g n_g\)
Mean of rates\(\bar r=G^{-1}\sum_g r_g\)

The pooled rate is itself a mean of the group rates, weighted by group size. With \(N=\sum_g n_g\) and weights \(w_g=n_g/N\), it is \(r=\sum_g w_g r_g\), whereas \(\bar r\) gives each group the weight \(1/G\). Subtracting the two gives \(r-\bar r=\sum_g (w_g-1/G)(r_g-\bar r)\): the summaries agree when every group has the same size or the same rate, and the pooled rate is the higher one when the larger groups have the higher rates. In the lab below, West’s four students carry weight \(4/124\), about 3 percent, in the pooled rate but \(1/3\) in the mean of rates.

The campus counts are a fixed synthetic fixture in m12.js: 82/100, 16/20 and 2/4. They represent fictional disjoint groups of tested students in one common fictional reporting window, with no exclusions. This is a separate example from the six-cell filter and R fixture; it is not their disaggregation. There is no external collection or retrieval date.

KPI definition lab loading…