jmbejara / comp-econ-sp18

Main Course Repository for Computational Methods in Economics (Econ 21410, Spring 2018)
16 stars 23 forks source link

euro2012 Q9 #13

Closed afgong closed 6 years ago

afgong commented 6 years ago

What do you mean by "calculate over the whole dataset"? Do you mean look at the data in euro12 or should we find the data in the link you attached: https://github.com/jokecamp/FootballData/?

Thanks!

afgong commented 6 years ago

Also, for Q8, should we create two DataFrames to sort Red Cards and Yellow Cards, separately? My intuition is that you can't sort the two columns at the same time since the corresponding team may not be sorted in the same order as the two colors of cards. But I may be wrong!

Jacob-Bishop commented 6 years ago

The explanation for #8 seems to suggest that you sort by red cards, then sort within each red-card level by yellow cards. For #9, it's directly opposed to 'per-game', so I think all it means is that you shouldn't be calculating mean cards per game.

I could of course be wrong, though.

jmbejara commented 6 years ago

Hi @afgong. Jacob is correct here on both counts. I want to sort by red cards and use yellow cards to break ties. As for the average, I want two numbers in the end that are interpreted as the average number of yellow cards given out to each team during the course of the tournament and the average number of red cards given out to each team during the course of the tournament.

alykhanb96 commented 6 years ago

for number 9: I just use the code discipline.mean() I feel like i'm misunderstanding though? what do we mean by average number of yellow cards given out to each team? Is this just the average of yellow cards? my output gives me:

Yellow Cards something Red Cards something dtype: float64

jmbejara commented 6 years ago

Yeah, you should be getting two numbers. During the course of the tournament, each team received a number of each card. The question we're trying to compute is, how many of each card did the average team receive?

Does this help?