-
-
Save hyuki0000/a3a3ea889acfa86c83769710c5ac6b69 to your computer and use it in GitHub Desktop.
N人のうち1人が100点でN-1人が0点であるとき、100点の人の偏差値
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# N人のうち1人が100点でN-1人が0点であるとき、100点の人の偏差値 | |
N = 15802 # 人数 | |
μ = 100.0 / N # 平均 | |
v = ((N-1) * (0-μ) ** 2 + 1 * (100-μ) ** 2) / N # 分散 | |
σ = Math.sqrt(v) # 標準偏差 | |
puts 50 + (100-μ) / σ * 10 # 100点の人の偏差値 | |
# => 1307.0202862324857 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cf. https://twitter.com/arakencloud/status/899919837606027264