Skip to content

Instantly share code, notes, and snippets.

@JulianNorton
Created February 12, 2017 14:51
Show Gist options
  • Save JulianNorton/18f19d8f2dca36a5c719eb9afd46a82f to your computer and use it in GitHub Desktop.
Save JulianNorton/18f19d8f2dca36a5c719eb9afd46a82f to your computer and use it in GitHub Desktop.
calculating task time estimates
# What's the best guess?
tm = float(input("Most probable Time (Tm) = "))
# If everything goes well, how long would it take?
to = float(input("Optimistic Time (To) = "))
# If everything bad happens, how long would it take?
# Probable time
tp = float(input("Pessimistic Time (Tp) = "))
# Deviation
sigma = (tp-to)/6
te = (to + (4 * tm) + tp) / 6
estimation_low = te - (2*sigma)
estimation_high = te + (2*sigma)
print(te, 'TE' )
print('95.5% == ', round(estimation_low, 4), '<--->', round(estimation_high, 4))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment