Children pick m&m candies from four colors: red, blue, yellow, brown. We try to predict the probability pij that child i will pick color j based on the child’s (1) gender, (2) age, (3) color picked by their friend, (4) claimed favorite color on the first day of school, (5) level of (hyper)activity on 1-10 scale, (6) shirt color that day, (7) color the teacher chooses. For ten children, our model gives the estimated probabilities in the table below for each color based on that child’s values of the seven features just listed. For example, John has probability 0.6 of choosing red and his chosen color was red. The formula for average squared error on page 3-69 is

where L is the number of levels (Cj, j=1,2,…,L) of a categorical target and the I( ) function is 1 if the statement in ( ) is true, and is 0 if not. N is the number of observations and pij is the probability of person i (observation i) choosing level j. Using the formula on page 3-69, compute the model’s average squared error for these children and fill in the missing blanks. For each child i the number in the column ssq is the inside sum (the sum on j) in the AvgSqError formula. The total 5.0525 was computed before removing the two numbers that are now blank.

child P_red P_green P_yellow P_brown Chosen ssq

John 0.60 0.05 0.15 0.20 red 0.2250

Susie 0.10 0.30 0.20 0.40 brown 0.5000

Cameron 0.10 0.30 0.20 0.40 yellow ______

Elsa 0.05 0.05 0.80 0.10 yellow 0.0550

Jerry 0.40 0.20 0.20 0.20 red ______

Anna 0.10 0.50 0.30 0.15 green 0.3725

Laura 0.30 0.10 0.50 0.10 red 0.7600

Michael 0.50 0.30 0.10 0.10 red 0.3600

David 0.40 0.20 0.10 0.30 brown 0.7000

Jessie 0.40 0.30 0.10 0.20 green 0.7000

======

5.0525

Average Squared error =