This weekly roundup thread is intended for all culture war posts. 'Culture war' is vaguely defined, but it basically means controversial issues that fall along set tribal lines. Arguments over culture war issues generate a lot of heat and little light, and few deeply entrenched people ever change their minds. This thread is for voicing opinions and analyzing the state of the discussion while trying to optimize for light over heat.
Optimistically, we think that engaging with people you disagree with is worth your time, and so is being nice! Pessimistically, there are many dynamics that can lead discussions on Culture War topics to become unproductive. There's a human tendency to divide along tribal lines, praising your ingroup and vilifying your outgroup - and if you think you find it easy to criticize your ingroup, then it may be that your outgroup is not who you think it is. Extremists with opposing positions can feed off each other, highlighting each other's worst points to justify their own angry rhetoric, which becomes in turn a new example of bad behavior for the other side to highlight.
We would like to avoid these negative dynamics. Accordingly, we ask that you do not use this thread for waging the Culture War. Examples of waging the Culture War:
-
Shaming.
-
Attempting to 'build consensus' or enforce ideological conformity.
-
Making sweeping generalizations to vilify a group you dislike.
-
Recruiting for a cause.
-
Posting links that could be summarized as 'Boo outgroup!' Basically, if your content is 'Can you believe what Those People did this week?' then you should either refrain from posting, or do some very patient work to contextualize and/or steel-man the relevant viewpoint.
In general, you should argue to understand, not to win. This thread is not territory to be claimed by one group or another; indeed, the aim is to have many different viewpoints represented here. Thus, we also ask that you follow some guidelines:
-
Speak plainly. Avoid sarcasm and mockery. When disagreeing with someone, state your objections explicitly.
-
Be as precise and charitable as you can. Don't paraphrase unflatteringly.
-
Don't imply that someone said something they did not say, even if you think it follows from what they said.
-
Write like everyone is reading and you want them to be included in the discussion.
On an ad hoc basis, the mods will try to compile a list of the best posts/comments from the previous week, posted in Quality Contribution threads and archived at /r/TheThread. You may nominate a comment for this list by clicking on 'report' at the bottom of the post and typing 'Actually a quality contribution' as the report reason.
Jump in the discussion.
No email address required.
Notes -
I thought maybe BMI was confounded by age, but it turns out age isn't a good predictor of monthly income. Here's a linear fit with age and log(monthly income)
(n=223)
And here it is with bmi and age
Then I thought maybe older women are working more hours, but the regression on log-hourly income (rather than monthly income) is similar:
Edit: here is the data in a form more friendly to a python programmer https://pastebin.com/aZqGTbG5
Technical question: why are you using log(monthly income)?
There are a lot of ways of deriving and thinking about linear regression, so I'm not sure I can give the One True Explanation. I'll give a couple though:
The practical answer is "whenever there are order-of-magnitude differences, it's a good idea to take the log".
The intuitive answer is that if we're assuming y is a linear function of x, so a fixed change in x should yield (roughly) a fixed change in y. This isn't really sensible if y covers several orders of magnitude but x does not.
Another answer is that it doesn't really make intuitive sense to use L2 loss when your labels vary by orders of magnitude. If I'm predicting the income of a poor person and a rich person, it should probably matter whether I'm $10/hour off on my predictions for the poor person or the rich person. Taking the log of our labels implicitly converts our loss function from
(y - yhat)^2
tolog(y/yhat)^2
which matches the intuition that a $10 mistake for somebody who makes $1000/hour matters less than it does for somebody who makes $10/hour.Another answer is that if you're going to assume Y = a R + b S + c T then the most sensible distribution for these variables is Gaussian, since the sum of Gaussians is Gaussian. From this philosophy, it's sensible to do some preprocessing on our variables to make them Gaussian. Academia often makes the assumption that income is log-normal, so taking the log of income makes sense. And if we look at the histogram of our data, it indeed looks much more Gaussian after the log transform.
Thanks for the thorough explanation.
I've recently become interested in measuring things, so finding related domains that I'm ignorant about is pretty helpful to keep following the thread.
More options
Context Copy link
More options
Context Copy link
More options
Context Copy link
I was wondering if BMI was also interacting with social class.
These are escorts. Part of their whole schtick is being able to consistently ape a upper social class. Aside from some kind of outlier, we should assume that they're all able to do so, and that includes semi-permanent characteristics like conforming to beauty standards, or they would not be working as escorts.
More options
Context Copy link
More options
Context Copy link
Just
pd.read_csv(<filename.csv>)
it.I personally think copying and pasting data into your python file (takes maybe 5 seconds?) is more convenient than downloading the file, copying the file path into your text editor, and then (the real pain point) learning how pandas handles "sheets" (I expect I'm not alone in not knowing how to do that).
As a data scientist, I'm cringing at the thought of anyone doing that (but that's more of my problem than yours), but no point in being elitist about a twitter survey. A good 95% of the time, I work with datasets so large that you would have to be a madman to even think about manually copy-pasting data in, on top of all the other reasons you don't manually copy paste in data. But I would do it the hard way just because.
Moreover, you don't really need to download the data. the
read_csv()
function can parse web hosted files, and if its more complicated, you can use the requests module, and if its still a pain, there are packages to read google sheet data. As for pandas parsing sheets, it's a keyword argument into theread_<filetype>
function. In the case of google sheets, you can specify it in the API endpoint.Pandas is a powerful library.
More options
Context Copy link
More options
Context Copy link
More options
Context Copy link
More options
Context Copy link
More options
Context Copy link