When we run the code, we get this output. And
notice how we have friend count split by females, and then
by males. And it looks like the median and the mean
friend count is greater for females. So here the answer was
women. Now the difference between the median friend count for
men and women is 22. That's just subtracting these two numbers.
Now, something I want to draw your attention to is the
mean Notice how the mean for friend count is higher than
the median for both females and for males. This should
make sense since our data is long tailed. So these
higher values out and the higher friend counts our kind of
pull our mean to the right. For this last question,
the median is a better measure than mean because it's
a more robust statistic. A few people with huge friend
counts drag the mean upwards which isn't necessarily representative of
most users. What's nice is that the median's resistant to change,
since it marks the halfway point for all data points. So as long as we trust
half of our values, we can report a
reliable location of the center of our distribution.
.عند تشغيل التعليمات البرمجية، سنحصل على هذا الإخراج
ولاحظوا كيف قسمنا عدد الأصدقاء على الإناث ثم
على الذكور. ويبدو أن الوسيط والمتوسط لعدد الأصدقاء
أكبر في حالة الإناث. لذا كانت الإجابة هنا
الإناث. والآن، يساوي الفرق بين وسيط عدد الأصدقاء لكل
.من الذكور والإناث 22. ويمثل هذا طرح الرقمين فحسب
وأود أن ألفت انتباهكم إلى أن
الوسيط، لاحظوا كيف أن الوسيط الخاص بعدد الأصدقاء أكبر من
الوسيط الخاص بكل من الإناث والذكور. ويجب أن يكون هذا
منطقيًا لأن البيانات بها حواشٍ طويلة. لذا، تنتج
هذه القيم الأكبر وأعداد الأصدقاء الأعلى كنوع من
،سحب المتوسط إلى اليمين. وللإجابة على هذا السؤال الأخير
يمثل الوسيط مقياسًا أفضل من المتوسط لأنه
يُعد أكثر قوة إحصائيًا. يقوم القليل من الأشخاص الذين لديهم أعداد أصدقاء أكبر
بسحب المتوسط إلى الأعلى، وهو ما لا يمثل بالضرورة
،معظم المستخدمين. ومن اللطيف أن الوسيط يقاوم التغيير
لأنه يميز نقطة منتصف الطريق لكل نقاط البيانات. طالما أننا نثق في
نصف القيم، يمكننا أن نبلغ عن
.المكان الموثوق لمركز التوزيع
コードを実行して現れた出力では
友達数が女性と男性で分けられています
友達数の中央値も平均値も
女性の方が多いようです
ですので正解は女性です
男女の中央値による友達数の差は22
ここにある数字で引き算をしました
注意してほしいのは平均値です
男女どちらの場合も
平均値が中央値よりも高いことがわかります
これはロング・テール・データでは当然です
高い値にある より友達が多いユーザデータが
平均値を右へ引っ張ります 最後の問題ですが
中央値の方が平均値より安定しており
よりよい計測値です
友達が多い少数の人が
平均値を上昇させても
彼らはユーザの代表ではありません
すべてのデータポイントの中間地点を示すので
中央値は変化に抵抗力があるといえます
つまり値の半分が信用できれば
分布の中央部分は信頼できるということです
Quando executamos este código, obtemos este resultado. E
note que há uma contagem de amigos dividida em mulheres e
homens. Parece que a contagem de amigos
mediana e média é maior para mulheres. Nesse caso, a resposta foi
mulheres. A diferença entre a contagem de amigos mediana para
homens e mulheres é 22. É só subtrair estes dois números.
Agora, quero que preste atenção na média.
Note como a média para contagem de amigos é mais elevada do que
a mediana para mulheres e homens. Isso deve
fazer sentido, já que nossos dados são de cauda longa. Portanto, esses
valores mais elevados fora e as contagens de amigos mais elevadas trarão
nossa média para a direita. Quanto a essa última questão,
a mediana é uma métrica melhor do que a média porque é
uma estatística mais robusta. Algumas pessoas com grandes
contagens de amigos elevam a média, o que não representa necessariamente
a maioria dos usuários. O que é legal é que a mediana é resistente a alteração,
pois ela marca o ponto médio de todos os pontos de dados. Enquanto confiamos
em metade dos nossos valores, podemos reportar um
local confiável do centro de nossa distribuição.
运行代码后 我们得到这个输出
注意我们的好友数如何按女性 然后按男性进行分割
看起来中位数和平均好友数对于女性比较高
所以这里的答案是女性
男性和女性中位数好友数的差异是 22
这只是两个数字相减的结果
现在 我想让你关注的是平均值
注意对于女性以及男性
好友数平均值是如何高于中位数的
这应该说得通 因为我们的数据是长尾型的
所以这些较高的值以及较高的好友数
将平均值拉向右边 对于最后一个问题
中位数是比平均值更好的指标
因为它是更加稳健的统计
少数拥有很多好友的用户将平均值拉高 这并不能够代表大多数用户
好的一点是 中位数不受变化的影响
因为它表示所有数据点的中间点 所以
只要我们相信我们值的一般 就可以
报告可靠的分布中心位置