Bloomberg Interview Question

Linear regression in discreet space such as color.

Interview Answers

Anonymous

Nov 5, 2014

You cannot use nominal or categorical variables in Linear regression. You have to convert them into binary variables. For example in this case create 1 variable for each color: Red -> Possible Values (0,1) Orange -> Possible Values (0,1) ... so on So If the color is Red, and there are 5 possible colors, then the new variables are 1,0,0,0,0

1

Anonymous

Mar 4, 2014

Variables are colors, which can be quantified to integers. red->1; orange->2; yellow->3; green->4; .... so on Then build linear regression model with the integers.