Biased Distribution described in "Think Stats" In the Chapter 3 of Think Stats by Allen Downey book. The following is the excerpt from the book:

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.
 A: This exercise is illustrating that the 'average class size' as calculated by the Dean is not the same as the average class size as experienced by a student.  The difference can be viewed this way: the Dean's average is the expected class size when picking a class at random, while the student's average is the expected class size when picking a student at random and asking the size of that student's class. To create a student-centric distribution of class sizes, you need to replicate each class size x as many times as the number of students in the class (again, x). In other words:  
for x, p in pmf.Items():
    new_pmf.Mult(x, x)

This is the sense in which we are 'biasing' class sizes: to give a student's-eye view of the class distribution. It's a legitimate approach, not anything artificial. Both versions of the average class size are correctly calculated; the difference is in the sampling scheme.
(Note this exercise is a little muddled: what if a student takes more than one class? The code for creating the biased distribution is making the simplifying assumption that each student takes just one class.)
