First, I compute the distribution as observed by students, where the probability associated with each class size is “biased” by the number of students in the class.
def BiasPmf(pmf, label): new_pmf = pmf.Copy(label=label) for x, p in pmf.Items(): new_pmf.Mult(x, x) new_pmf.Normalize() return new_pmf
For each class size, x, we multiply the probability by x, the number of students who observe that class size. The result is a new Pmf that represents the biased distribution.
- What is the meaning of the bias here?
- Is the author skewing the value by a certain factor and thus, creating an artificial "bias"?
If there's a better forum to discuss questions regarding the book material - please let us know.