Template:Statrate

From Twilight Heroes Wiki
Revision as of 07:03, 29 April 2010 by Muhandes (talk | contribs) (Undo revision 36188 by Muhandes will need to find a better way to do it)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Template for reporting the rate of something from statistical sampling. It will display a 95% confidence interval using the equation for confidence interval for proportion, 2p(1-p)/n.

Usage

{{statrate|samples|occurrences}}

Or for reporting to the closest percentage:
{{statrate|samples|occurrences||!}}

or

{{statrate|samples|occurrences|+}} for reporting drop rates in the {{Combatencounter}} template.

Or for reporting to the closest percentage:
{{statrate|samples|occurrences|+|!}}

Example

You adventured 3000 times and got an action 350 of those:

{{statrate|3000|350}}, or inaccurately {{statrate|3000|350||!}}

(11.7% ± 1.2%), or inaccurately (12%)

Or for reporting a drop:

{{statrate|3000|350|+}}, or inaccurately {{statrate|3000|350|+|!}}

11.7 ± 1.2, or inaccurately 12