Template:Statrate: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Undo revision 36188 by Muhandes will need to find a better way to do it |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>({{#expr: (100 * {{{2}}} / {{{1}}}) round 1}}% ± {{#expr: (2 * {{sqrt| {{#expr:10000 * ({{{2}}} / {{{1}}} ) * (1 - ({{{2}}} / {{{1}}} )) / {{{1}}} }}}}) round 1}}%)</includeonly><noinclude> | <includeonly>{{#ifeq:{{{3}}}|+||(}}{{#ifeq:{{{4|}}}|!|{{#expr: (100 * {{{2}}} / {{{1}}}) round 0}}|{{#expr: (100 * {{{2}}} / {{{1}}}) round 1}}{{#ifeq:{{{3}}}|+||%}} ± {{#expr: (2 * {{sqrt| {{#expr:10000 * ({{{2}}} / {{{1}}} ) * (1 - ({{{2}}} / {{{1}}} )) / {{{1}}} }}}}) round 1}}}}{{#ifeq:{{{3}}}|+||%)}}</includeonly><noinclude> | ||
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, 2 | 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, 2{{radic|p(1-p)/n}}. | ||
==Usage== | ==Usage== | ||
<nowiki>{{statrate||occurrences}}</nowiki> | <nowiki>{{statrate|samples|occurrences}}</nowiki> | ||
: Or for reporting to the closest percentage: | |||
: <nowiki>{{statrate|samples|occurrences||!}}</nowiki> | |||
or | |||
<nowiki>{{statrate|samples|occurrences|+}}</nowiki> for reporting drop rates in the {{tl|Combatencounter}} template. | |||
: Or for reporting to the closest percentage: | |||
: <nowiki>{{statrate|samples|occurrences|+|!}}</nowiki> | |||
==Example== | ==Example== | ||
You adventured 3000 times and got an action 350 of those: | You adventured 3000 times and got an action 350 of those: | ||
<nowiki>{{statrate|3000|350}}</nowiki> | <nowiki>{{statrate|3000|350}}, or inaccurately {{statrate|3000|350||!}}</nowiki> | ||
{{statrate|3000|350}}, or inaccurately {{statrate|3000|350||!}} | |||
Or for reporting a drop: | |||
<nowiki>{{statrate|3000|350|+}}, or inaccurately {{statrate|3000|350|+|!}}</nowiki> | |||
{{statrate|3000|350|+}}, or inaccurately {{statrate|3000|350|+|!}} | |||
[[category:Utility Templates|{{PAGENAME}}]] | |||
[[category:Templates]] | |||
</noinclude> | </noinclude> |
Latest revision as of 14:03, 29 April 2010
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, 2√p(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