Author rhettinger
Recipients corona10, mark.dickinson, rhettinger, steven.daprano
Date 2020-12-24.02:22:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608776566.61.0.987244134978.issue38308@roundup.psfhosted.org>
In-reply-to
Content
> I would like to hear why you removed the P/E example
> instead of just adding additional examples.

I tried out the existing P/E example in my Python courses and found that it had very little explanatory power — in general, non-finance people know less about P/E ratios than they know about the harmonic mean :-)  

For people with a finance background who do already understand P/E ratios, the example is weak.  The current example only works mathematically if the portfolios are exactly the same market value at the time the ratios are combined — this never happens.  Also P/E ratios in real portfolios include zero and negative values — that won't work with our harmonic mean.  Also, combining P/Es for non-homogenous securities is a bit of dark art.  Given a utility stock, a healthcare stock, and a tech stock, the aggregate P/E is rarely comparable to anything else.

All that said, I would be happy to add the example back if you think it is necessary.  It's your module and it's important that you're happy with it :-)

> I think that it's useful to have an example that shows that 
> harmonic mean is not *just* for speed-related problems.

I considered using a resistors in parallel example, but that is somewhat specialized and isn't directly applicable because we normally don't want a mean at all, we just want the equivalent resistance.

I also thought about adding something like: "The harmonic mean is the smaller of the three Pythagorean means and tends to emphasize the impact of small outliers while minimizing the impact of large outliers."  But while this is true, I've never seen a data scientist switch from an arithmetic mean to a harmonic mean to achieve this effect.
History
Date User Action Args
2020-12-24 02:22:46rhettingersetrecipients: + rhettinger, mark.dickinson, steven.daprano, corona10
2020-12-24 02:22:46rhettingersetmessageid: <1608776566.61.0.987244134978.issue38308@roundup.psfhosted.org>
2020-12-24 02:22:46rhettingerlinkissue38308 messages
2020-12-24 02:22:46rhettingercreate