(mostly to indicate that the player name starts with a lowercase letter) |
mNo edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE | {{DISPLAYTITLE:y5nw}} | ||
'''y5nw''' is a player on the server. | '''y5nw''' is a player on the server. | ||
== Personal bookmark == | |||
* <categorytree mode="pages" hideprefix="always">Category:Judgments by accusation</categorytree> | |||
* [[/sandbox]] | |||
== Notes == | |||
''Note: This section is more or less written based on my own knowledge. Feel free to suggest corrections in my talk page.'' | |||
=== Event chance calculation === | |||
For a one-shot event that fires with a probability of <math>p</math> checked at an interval of <math>T</math> (e.g. tree growth), the expected amount of time <math>t</math> it takes for the event to fire is <math>E(t) = \frac{T}{p}</math>. | |||
Note that, in some definition tables in Minetest (e.g. ABMs), the probability is specified using the reciprocal of <math>p</math>. | |||
Calculations: Let <math>q := 1-p</math> be the probability of the event ''not'' firing at the next check. | |||
<math> | |||
\begin{align} | |||
E(t) &= \sum_{n=1}^{\infty} (q^{n-1} (1-q)) (T n) = (1-q) T \sum_{n=1}^{\infty} q^{n-1} n = (1-q) T \sum_{n=1}^{\infty} \sum_{m=1}^n q^{n-1} \\ | |||
&= (1-q) T \sum_{n=1}^{\infty} \sum_{m=n}^{\infty} q^{m-1} = \frac{(1-q) T}{q} \sum_{n=1}^{\infty} \sum_{m=n}^{\infty} q^m \\ | |||
&= \frac{(1-q) T}{q} \sum_{n=1}^{\infty} \left( \sum_{m=0}^{\infty} q^m - \sum_{m=0}^{n-1} q^m \right) = \frac{(1-q) T}{q} \sum_{n=1}^{\infty} \left( \frac{1}{1-q} - \frac{1-q^n}{1-q} \right) = \frac{(1-q) T}{q} \sum_{n=1}^{\infty} \frac{q^n}{1-q} \\ | |||
&= T \sum_{n=0}^{\infty} q^n = T \cdot \frac{1}{1-q} = \frac{T}{p} | |||
\end{align} | |||
</math> |
Latest revision as of 09:44, 18 September 2024
y5nw is a player on the server.
Personal bookmark
Notes
Note: This section is more or less written based on my own knowledge. Feel free to suggest corrections in my talk page.
Event chance calculation
For a one-shot event that fires with a probability of checked at an interval of (e.g. tree growth), the expected amount of time it takes for the event to fire is .
Note that, in some definition tables in Minetest (e.g. ABMs), the probability is specified using the reciprocal of .
Calculations: Let be the probability of the event not firing at the next check.