forked from AllenDowney/ThinkStats2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelay_normal.py
34 lines (24 loc) · 919 Bytes
/
relay_normal.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""This file contains code used in "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2010 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
"""This program generates a normal probability plot for the distribution
of running speeds in a road race.
The results suggest that the distribution is bimodal, with a small
number of fast runners who seem to belong to a different normal
distribution.
I conjecture that these are people who have trained at a competitive
level. Among them, the distribution is normal, but there is a gap
between them and the rest of the population.
"""
import relay
import rankit
def main():
results = relay.ReadResults()
speeds = relay.GetSpeeds(results)
rankit.MakeNormalPlot(speeds,
root='relay_normal',
ylabel='Speed (MPH)')
if __name__ == '__main__':
main()