tegge-classroom / STAT2984-2018

STAT 2984: Statistical Programming I - Spring 2018
1 stars 13 forks source link

Assignment 3 Question 16 #21

Open mbecker3 opened 6 years ago

mbecker3 commented 6 years ago

I'm having trouble with question 16-

When I look online, it says that I should start with 'from functools import reduce' to summarize the data, but when I do that it doesn't work

matter698no2 commented 6 years ago

You already know that each factor corresponds to a number in the values list

[ 'A', 'B', 'A', 'C' ]
   |    |    |    |
[  22,  33,  23,  43 ]

So each letter (factor) has a set of numbers that go with it.

A: 22, 23
B: 33
C: 43

So you have to do the center thing that we did in class for all the numbers that go with each letter (factor), so the mean of the numbers that represent every factor is 0.

Then you have to print out a summary and return two lists, one with the factors and one with the values.

mbecker3 commented 6 years ago

Oh okay, that makes a lot more sense! Thank you