avewright/proofwiki-math huggingface dataset:
Theorem: Expectation of Discrete Uniform Distribution

Let $X$ be a discrete random variable with the discrete uniform distribution with parameter $n$.
Then the expectation of $X$ is given by:
:$\expect X = \dfrac {n + 1} 2$

Proof:
From the definition of expectation:
:$\ds \expect X = \sum_{x \mathop \in \Omega_X} x \map \Pr {X = x}$
Thus:
{{begin-eqn}}
{{eqn | l = \expect X
      | r = \sum_{k \mathop = 1}^n k \paren {\frac 1 n}
      | c = {{Defof|Discrete Uniform Distribution}}
}}
{{eqn | r = \frac 1 n \sum_{k \mathop = 1}^n k
      | c = 
}}
{{eqn | r = \frac 1 n \frac {n \paren {n + 1} } 2
      | c = from Closed Form for Triangular Numbers
}}
{{eqn | r = \frac {n + 1} 2
      | c = 
}}
{{end-eqn}}
{{qed}}
Category:Expectation
Category:Discrete Uniform Distribution
jl5q0i8jkbrykmwfb72baf7c2vlfj4v
Theorem: Variance of Discrete Uniform Distribution

Let $X$ be a discrete random variable with the discrete uniform distribution with parameter $n$.
Then the variance of $X$ is given by:
:$\var X = \dfrac {n^2 - 1} {12}$

Proof:
From the definition of Variance as Expectation of Square minus Square of Expectation:
:$\var X = \expect {X^2} - \paren {\expect X}^2$
From Expectation of Function of Discrete Random Variable:
:$\ds \expect {X^2} = \sum_{x \mathop \in \Omega_X} x^2 \map \Pr {X = x}$
So:
{{begin-eqn}}
{{eqn | l = \expect {X^2}
      | r = \sum_{k \mathop = 1}^n k^2 \paren {\frac 1 n}
      | c = {{Defof|Discrete Uniform Distribution}}
}}
{{eqn | r = \frac 1 n \sum_{k \mathop = 1}^n k^2
      | c = 
}}
{{eqn | r = \frac 1 n \frac {n \paren {n + 1} \paren {2 n + 1} } 6
      | c = Sum of Sequence of Squares
}}
{{eqn | r = \frac {\paren {n + 1} \paren {2 n + 1} } 6
      | c = 
}}
{{end-eqn}}
Then:
{{begin-eqn}}
{{eqn | l = \var X
      | r = \expect {X^2} - \paren {\expect X}^2
      | c = 
}}
{{eqn | r = \frac {\paren {n + 1} \paren {2 n + 1} } 6 - \frac {\paren {n + 1}^2} 4
      | c = Expectation of Discrete Uniform Distribution: $\expect X = \dfrac {n + 1} 2$
}}
{{eqn | r = \frac {2 \paren {2 n^2 + 3 n + 1} - 3 \paren {n^2 + 2 n + 1} } {12}
      | c = 
}}
{{eqn | r = \frac {n^2 - 1} {12}
      | c = 
}}
{{end-eqn}}
{{qed}}
Category:Variance
Category:Discrete Uniform Distribution
r8euczyfk9dp08qx411w3s1rzr3vv53
Theorem: Probability Generating Function of Degenerate Distribution

Let $X$ be the degenerate distribution:
:$\forall x \in \N: \map {p_X} x = \begin{cases}
1 & : x = k \\
0 & : x \ne k
\end{cases}$
where $k \in \N$.
Then the p.g.f. of $X$ is:
:$\map {\Pi_X} x = s^k$

Proof:
Follows directly from the definition:
:$\ds \map {\Pi_X} s = \sum_{x \mathop \ge 0} \map {p_X} x s^x$
As $\map {p_X} x \ne 0$ for only one value of $x$, all the terms vanish except that one.
Hence the result.
{{qed}}
Category:Probability Generating Functions
Category:Degenerate Distribution
ot9gqsg5ebkqpkpy24m99p8zg4dd6c6
Theorem: Probability Generating Function of Bernoulli Distribution

Let $X$ be a discrete random variable with the Bernoulli distribution with parameter $p$.
Then the p.g.f. of $X$ is:
:$\map {\Pi_X} s = q + p s$
where $q = 1 - p$.

Proof:
From the definition of p.g.f:
:$\ds \map {\Pi_X} s = \sum_{x \mathop \ge 0} \map {p_X} x s^x$
From the definition of the Bernoulli distribution:
:$\map {p_X} x = \begin{cases}
p & : x = a \\
1 - p & : x = b \\
0 & : x \notin \set {a, b} \\
\end{cases}$
So:
{{begin-eqn}}
{{eqn | l=\map {\Pi_X} s
      | r=\map {p_X} 0 s^0 + \map {p_X} 1 s^1
      | c=
}}
{{eqn | r=\paren {1 - p} + p s
      | c=
}}
{{end-eqn}}
Hence the result.
{{qed}}
Theorem: Probability Generating Function of Binomial Distribution

Let $X$ be a discrete random variable with the binomial distribution with parameters $n$ and $p$.
Then the p.g.f. of $X$ is:
:$\map {\Pi_X} s = \paren {q + p s}^n$
where $q = 1 - p$.

Proof:
From the definition of p.g.f:
:$\ds \map {\Pi_X} s = \sum_{k \mathop \ge 0} \map {p_X} k s^k$
From the definition of the binomial distribution:
:$\map {p_X} k = \dbinom n k p^k \paren {1 - p}^{n - k}$
So:
{{begin-eqn}}
{{eqn | l = \map {\Pi_X} s
      | r = \sum_{k \mathop = 0}^n \binom n k p^k \paren {1 - p}^{n - k} s^k
      | c = 
}}
{{eqn | r = \sum_{k \mathop = 0}^n \binom n k \paren {p s}^k \paren {1 - p}^{n - k}
      | c = 
}}
{{eqn | r = \paren {\paren {p s} + \paren {1 - p} }^n
      | c = Binomial Theorem
}}
{{end-eqn}}
Hence the result.
{{qed}}
Theorem: Probability Generating Function of Shifted Geometric Distribution

Let $X$ be a discrete random variable with the shifted geometric distribution with parameter $p$.
Then the p.g.f. of $X$ is:
:$\map {\Pi_X} s = \dfrac {p s} {1 - q s}$
where $q = 1 - p$.

Proof:
From the definition of p.g.f:
:$\ds \map {\Pi_X} s = \sum_{x \mathop \ge 0} \map {p_X} x s^x$
From the definition of the shifted geometric distribution:
:$\forall k \in \N, k \ge 1: \map {p_X} k = p q^{k - 1}$
So:
{{begin-eqn}}
{{eqn | l = \map {\Pi_X} s
      | r = \sum_{k \mathop \ge 1} p q^{k - 1} s^k
      | c = 
}}
{{eqn | r = p s \sum_{k \mathop \ge 1} \paren {q s}^{k - 1}
      | c = 
}}
{{eqn | r = p s \sum_{j \mathop \ge 0} \paren {q s}^j
      | c = change of index
}}
{{eqn | r = p s \frac 1 {1 - q s}
      | c = Sum of Infinite Geometric Sequence
}}
{{end-eqn}}
Hence the result.
{{qed}}
Theorem: Probability Generating Function of Geometric Distribution

Let $X$ be a discrete random variable with the geometric distribution with parameter $p$.
Then the p.g.f. of $X$ is:
:$\map {\Pi_X} s = \dfrac q {1 - p s}$
where $q = 1 - p$.

Proof:
From the definition of p.g.f:
:$\ds \map {\Pi_X} s = \sum_{x \mathop \ge 0} \map {p_X} x s^x$
From the definition of the geometric distribution:
:$\forall k \in \N, k \ge 0: \map {p_X} k = q p^k$
So:
{{begin-eqn}}
{{eqn | l = \map {\Pi_X} s
      | r = \sum_{k \mathop \ge 0} q p^k s^k
      | c = 
}}
{{eqn | r = q \sum_{k \mathop \ge 0} \paren {p s}^k
      | c = 
}}
{{eqn | r = q \frac 1 {1 - p s}
      | c = Sum of Infinite Geometric Sequence
}}
{{end-eqn}}
Hence the result.
{{qed}}
Category:Probability Generating Functions
Category:Geometric Distribution
9bv9elpc09f0gnakkepyzb7yypfeugw
Theorem: Probability Generating Function of Poisson Distribution

Let $X$ be a discrete random variable with the Poisson distribution with parameter $\lambda$.
Then the p.g.f. of $X$ is:
:$\map {\Pi_X} s = e^{-\lambda \paren {1 - s} }$

Proof:
From the definition of p.g.f:
:$\ds \map {\Pi_X} s = \sum_{x \mathop \ge 0} \map {p_X} x s^x$
From the definition of the Poisson distribution:
:$\ds \forall k \in \N, k \ge 0: \map {p_X} k = \frac {e^{-\lambda} \lambda^k} {k!}$
So:
{{begin-eqn}}
{{eqn | l = \map {\Pi_X} s
      | r = \sum_{k \mathop \ge 0} \frac {e^{-\lambda} \lambda^k} {k!} s^k
      | c = 
}}
{{eqn | r = e^{-\lambda} \sum_{k \mathop \ge 0} \frac {\paren {\lambda s}^k} {k!}
      | c = 
}}
{{eqn | r = e^{-\lambda} e^{\lambda s}
      | c = Taylor Series Expansion for Exponential Function
}}
{{eqn | r = e^{-\lambda + \lambda s}
      | c = 
}}
{{end-eqn}}
Hence the result.
{{qed}}
Theorem: Expectation of Discrete Random Variable from PGF

Let $X$ be a discrete random variable whose probability generating function is $\map {\Pi_X} s$.
Then the expectation of $X$ is the value of the first derivative of $\map {\Pi_X} s$ {{WRT|Differentiation}} $s$ at $s = 1$.
That is:
:$\expect X = \map {\Pi'_X} 1$

Proof:
For ease of notation, write $\map p x$ for $\map \Pr {X = x}$.
From the definition of the probability generating function:
:$\ds \map {\Pi_X} s = \sum_{x \mathop \ge 0} \map p x s^x = \map p 0 + \map p 1 s + \map p 2 s^2 + \map p 3 s^3 + \cdots$
Differentiate this {{WRT|Differentiation}} $s$:
{{begin-eqn}}
{{eqn | l = \map {\Pi'_X} s
      | r = \frac \d {\d s} \sum_{k \mathop = 0}^\infty \map \Pr {X = k} s^k
      | c = 
}}
{{eqn | r = \sum_{k \mathop = 0}^\infty \frac \d {\d s} \map \Pr {X = k} s^k
      | c = Abel's Theorem
}}
{{eqn | r = \sum_{k \mathop = 0}^\infty k \map \Pr {X = k} s^{k - 1}
      | c = Power Rule for Derivatives
}}
{{end-eqn}}
Plugging in $s = 1$ gives:
:$\ds \map {\Pi'_X} 1 = \sum_{k \mathop = 0}^\infty k \map \Pr {X = k} 1^{k - 1} = \map p 1 + 2 \map p 2 + 3 \map p 3 + \cdots$
But:
:$\ds \sum_{k \mathop = 0}^\infty k \map \Pr {X = k} 1^{k - 1} = \sum_{k \mathop = 0}^\infty k \map \Pr {X = k}$
is precisely the definition of the expectation.
{{qed}}
Theorem: Variance of Discrete Random Variable from PGF

Let $X$ be a discrete random variable whose probability generating function is $\map {\Pi_X} s$.
Then the variance of $X$ can be obtained from the second derivative of $\map {\Pi_X} s$ {{WRT|Differentiation}} $s$ at $x = 1$:
:$\var X = \map {\Pi' '_X} 1 + \mu - \mu^2$
where $\mu = \expect X$ is the expectation of $X$.

Proof:
From the definition of the probability generating function:
:$\ds \map {\Pi_X} s = \sum_{x \mathop \ge 2} \map p x s^x$
From Derivatives of Probability Generating Function at One:
:$\ds \map {\Pi' '_X} s = \sum_{x \mathop \ge 2} x \paren {x - 1} \map p x s^{x - 2}$
But it also holds when you include $x = 0$ and $x = 1$ in the sum, as in both cases the term evaluates to zero and therefore vanishes.
So:
:$\ds \map {\Pi' '_X} s = \sum_{x \mathop \ge 0} x \paren {x - 1}\map p x s^{x - 2}$
Plugging in $s = 1$ gives:
{{begin-eqn}}
{{eqn | l = \map {\Pi' '_X} 1
      | r = \sum_{x \mathop \ge 0} x \paren {x - 1} \map p x 1^{x - 2}
      | c = 
}}
{{eqn | r = \sum_{x \mathop \ge 0} x^2 \map p x - \sum_{x \mathop \ge 0} x \map p x
      | c = 
}}
{{eqn | r = \expect {X^2} - \expect X
      | c = 
}}
{{end-eqn}}
The result follows from the definition of variance:
:$\var X = \expect {X^2} - \paren {\expect X}^2$
after a little algebra.
{{qed}}
Theorem: Nth Derivative of Mth Power

Let $m \in \Z$ be an integer such that $m \ge 0$.
The $n$th derivative of $x^m$ {{WRT|Differentiation}} $x$ is:
:$\dfrac {\d^n} {\d x^n} x^m = \begin{cases} m^{\underline n} x^{m - n} & : n \le m \\ \\ 0 & : n > m \end{cases}$
where $m^{\underline n}$ denotes the falling factorial.

Proof:
Proof by induction:
For all $n \in \N_{>0}$, let $\map P n$ be the proposition:
:$\dfrac {\d^n} {\d x^n} x^m = \begin{cases} m^{\underline n} x^{m - n} & : n \le m \\ \\ 0 & : n > m \end{cases}$
Theorem: Derivative of Complex Power Series

Let $\xi \in \C$ be a complex number.
Let $\sequence {a_n}$ be a sequence in $\C$.
Let $\ds \map f z = \sum_{n \mathop = 0}^\infty a_n \paren {z - \xi}^n$ be a power series in a complex variable $z \in \C$ about $\xi$.
Let $R$ be the radius of convergence of the series defining $\map f z$.
Let $\cmod {z - \xi} < R$.
Then $f$ is complex-differentiable and its derivative is:
:$\ds \map {f'} z = \sum_{n \mathop = 1}^\infty n a_n \paren {z - \xi}^{n - 1}$

Proof:
Define:
:$\ds \map g z = \sum_{n \mathop = 1}^\infty n a_n \paren {z - \xi}^{n - 1}$
From Radius of Convergence of Derivative of Complex Power Series, it follows that $g$ has radius of convergence $R$. 
Fix an $\epsilon > 0$ satisfying $\epsilon < R - \cmod {z - \xi}$.
Define:
:$\ds M = \paren {R - \epsilon - \cmod {z - \xi} }^{-2} \sum_{n \mathop = 2}^\infty \cmod {a_n} \paren {R - \epsilon}^n$
Suppose that $\cmod h \le R - \epsilon - \cmod {z - \xi}$.
Then:
{{begin-eqn}}
{{eqn | l = \cmod {\dfrac {\map f {z + h} - \map f z} h - \map g z}
      | r = \cmod {\dfrac 1 h \paren {\sum_{n \mathop = 0}^\infty a_n \paren {z + h - \xi}^n - \sum_{n \mathop = 0}^\infty a_n \paren {z - \xi}^n} - \sum_{n \mathop = 1}^\infty n  a_n \paren {z - \xi}^{n - 1} }
}}
{{eqn | r = \cmod {\sum_{n \mathop = 0}^\infty a_n \sum_{k \mathop = 0}^n \binom n k \paren {z - \xi}^k h^{n - k - 1} - \sum_{n \mathop = 0}^\infty \dfrac {a_n} h \paren {z - \xi}^n - \sum_{n \mathop = 1}^\infty n a_n \paren {z - \xi}^{n - 1} }
      | c = Binomial Theorem
}}
{{eqn | r = \cmod {\sum_{n \mathop = 1}^\infty a_n \paren {\sum_{k \mathop = 0}^n \binom n k \paren {z - \xi}^k h^{n - k - 1} - \dfrac 1 h \paren {z - \xi}^n - n \paren {z - \xi}^{n - 1} } } 
      | c = Difference of Absolutely Convergent Series
}}
{{eqn | r = \cmod {\sum_{n \mathop = 2}^\infty a_n \sum_{k \mathop = 0}^{n - 2} \binom n k \paren {z - \xi}^k h^{n - k - 1} }
      | c = by algebraic manipulations
}}
{{eqn | o = \le
      | r = \cmod h \sum_{n \mathop = 2}^\infty \cmod {a_n} \sum_{k \mathop = 0}^{n - 2} \binom n k \cmod {z - \xi}^k \cmod h^{n-k-2}
      | c = Triangle Inequality for Complex Numbers
}}
{{eqn | o = \le
      | r = \cmod h \sum_{n \mathop = 2}^\infty \cmod {a_n} \sum_{k \mathop = 0}^{n - 2} \binom n k \cmod {z - \xi}^k \paren {R - \epsilon - \cmod {z - \xi} }^{n - k - 2}
      | c = {{hypothesis}}
}}
{{eqn | o = \le
      | r = \cmod h \paren {R - \epsilon - \cmod {z - \xi} }^{-2} \sum_{n \mathop = 2}^\infty \cmod {a_n} \sum_{k \mathop = 0}^n \binom n k \cmod {z - \xi}^k \paren {R - \epsilon - \cmod {z - \xi} }^{n - k}
}}
{{eqn | r = \cmod h \paren {R - \epsilon - \cmod {z - \xi} }^{-2} \sum_{n \mathop = 2}^\infty \cmod {a_n} \paren {R - \epsilon}^n
      | c = Binomial Theorem
}}
{{eqn | r = M \cmod h
}}
{{end-eqn}}
Letting $h \to 0$ we see that $\map {f'} z$ exists and:
:$\map {f'} z = \map g z$
as desired.
{{qed}}
Theorem: Probability Generating Function of Discrete Uniform Distribution

Let $X$ be a discrete random variable with the discrete uniform distribution with parameter $n$.
Then the p.g.f. of $X$ is:
:$\map {\Pi_X} s = \dfrac {s \paren {1 - s^n} } {n \paren {1 - s} }$

Proof:
From the definition of p.g.f:
:$\ds \map {\Pi_X} s = \sum_{x \mathop \ge 0} \map {p_X} x s^x$
From the definition of the discrete uniform distribution:
:$\forall k \in \N, 1 \le k \le n: \map {p_X} k = \dfrac 1 n$
So:
{{begin-eqn}}
{{eqn | l = \map {\Pi_X} s
      | r = \sum_{k \mathop = 1}^n \frac 1 n s^k
      | c = 
}}
{{eqn | r = \frac s n \sum_{k \mathop = 0}^{n - 1} s^k
      | c = 
}}
{{eqn | r = \frac s n \paren {\frac {1 - s^n} {1 - s} }
      | c = Sum of Geometric Sequence
}}
{{end-eqn}}
Hence the result.
{{qed}}
Category:Probability Generating Functions
Category:Discrete Uniform Distribution
03y8gw9tz6dxqeyexpv8cxnucc1ous2
Theorem: Derivatives of PGF of Bernoulli Distribution

Let $X$ be a discrete random variable with the Bernoulli distribution with parameter $p$.
Then the derivatives of the PGF of $X$ {{WRT|Differentiation}} $s$ are:
:$\dfrac {\d^k} {\d s^k} \map {\Pi_X} s = \begin{cases} p & : k = 1 \\  0 & : k > 1 \end{cases}$

Proof:
The Probability Generating Function of Bernoulli Distribution is:
:$\map {\Pi_X} s = q + p s$
where $q = 1 - p$.
We have that for a given Bernoulli distribution, $p$ and $q$ are constant.
So, from Derivative of Constant, Sum Rule for Derivatives, Derivative of Identity Function and Derivative of Constant Multiple:
:$\dfrac {\d} {\d s} \map {\Pi_X} s = p$
Again, $p$ is constant, so from Derivative of Constant:
:$\dfrac {\d} {\d s} p = 0$
Higher derivatives are also of course zero, also from Derivative of Constant.
{{qed}}
Theorem: Derivatives of PGF of Bernoulli Distribution

Let $X$ be a discrete random variable with the Bernoulli distribution with parameter $p$.
Then the derivatives of the PGF of $X$ {{WRT|Differentiation}} $s$ are:
:$\dfrac {\d^k} {\d s^k} \map {\Pi_X} s = \begin{cases} p & : k = 1 \\  0 & : k > 1 \end{cases}$

Proof:
Follows directly from Derivatives of PGF of Binomial Distribution, setting $n = 1$.
{{qed}}
Theorem: Derivatives of PGF of Binomial Distribution

Let $X$ be a discrete random variable with the binomial distribution with parameters $n$ and $p$.
Then the derivatives of the PGF of $X$ {{WRT|Differentiation}} $s$ are:
:<nowiki>$\dfrac {\d^k} {\d s^k} \map {\Pi_X} s = \begin {cases}
n^{\underline k} p^k \paren {q + p s}^{n-k} & : k \le n \\
0 & : k > n
\end {cases}$</nowiki>
where:
:$n^{\underline k}$ is the falling factorial
:$q = 1 - p$

Proof:
The Probability Generating Function of Binomial Distribution is:
:$\map {\Pi_X} s = \paren {q + p s}^n$
where $q = 1 - p$.
From Derivatives of Function of $a x + b$:
:$\map {\dfrac {\d^k} {\d s^k} } {\map f {q + p s} } = p^k \dfrac {\d^k} {\d z^k} \paren {\map f z}$
where $z = q + p s$.
Here we have that $\map f z = z^n$.
From Nth Derivative of Mth Power:
:<nowiki>$\dfrac {\d^k} {\d z^k}  z^n = \begin {cases}
n^{\underline k} z^{n - k} & : k \le n \\
0 & : k > n
\end {cases}$</nowiki>
So putting it together:
:<nowiki>$\dfrac {\d^k} {\d s^k} \map {\Pi_X} s = \begin {cases}
n^{\underline k} p^k \paren {q + p s}^{n - k} & : k \le n \\
0 & : k > n
\end {cases}$</nowiki>
{{qed}}
Theorem: Higher Derivatives of Exponential Function

Let $\exp x$ be the exponential function.
Then:
:$\map {\dfrac {\d^n} {\d x^n} } {\exp x} = \exp x$

Proof:
Proof by induction:
For all $n \in \N_{>0}$, let $\map P n$ be the proposition:
:$\map {\dfrac {\d^n} {\d x^n} } {\exp x} = \exp x$
Theorem: Derivatives of PGF of Poisson Distribution

Let $X$ be a discrete random variable with the Poisson distribution with parameter $\lambda$.
Then the derivatives of the PGF of $X$ {{WRT|Differentiation}} $s$ are:
:$\dfrac {d^k} {\d s^k} \, \map {\Pi_X} s = \lambda^k e^{- \lambda \paren {1 - s} }$

Proof:
The Probability Generating Function of Poisson Distribution is:
{{begin-eqn}}
{{eqn | l = \map {\Pi_X} s
      | r = e^{-\lambda \paren {1 - s} }
      | c = 
}}
{{eqn | r = e^{-\lambda + \lambda s}
      | c = 
}}
{{eqn | r = e^{-\lambda} e^{\lambda s}
      | c = Exponential of Sum
}}
{{end-eqn}}
We have that for a given Poisson distribution, $\lambda$ is constant.
From Higher Derivatives of Exponential Function, we have that:
:$\dfrac {\d^k} {\d s^k} \paren {e^{\lambda s} } = \lambda^k e^{\lambda s}$
Thus we have:
{{begin-eqn}}
{{eqn | l = \frac {\d^k} {\d s^k} \map {\Pi_X} s
      | r = \frac {\d^k} {\d s^k} e^{-\lambda} \paren {e^{\lambda s} }
      | c = 
}}
{{eqn | r = e^{-\lambda} \frac {\d^k} {\d s^k} \paren {e^{\lambda s} }
      | c = Derivative of Constant Multiple
}}
{{eqn | r = e^{-\lambda} \lambda^k e^{\lambda s}
      | c = Higher Derivatives of Exponential Function
}}
{{end-eqn}}
Hence the result.
{{qed}}
Category:Poisson Distribution
Category:Derivatives of PGFs
1dz559evrctwt2gzlccthlb7r3awxph
Theorem: Derivatives of Function of a x + b

Let $f$ be a real function which is differentiable on $\R$.
Let $a, b \in \R$ be constants.
Then:
:$\map {\dfrac {\d^n} {\d x^n} } {\map f {a x + b} } = a^n \map {\dfrac {\d^n} {\d z^n} } {\map f z}$
where $z = a x + b$.

Proof:
Proof by induction:
For all $n \in \N_{>0}$, let $\map P n$ be the proposition:
:$\map {\dfrac {\d^n} {\d x^n} } {\map f {a x + b} } = a^n \map {\dfrac {\d^n} {\d z^n} } {\map f z}$
where $z = a x + b$.
Theorem: Nth Derivative of Reciprocal of Mth Power

Let $m \in \Z$ be an integer such that $m > 0$.
The $n$th derivative of $\dfrac 1 {x^m}$ {{WRT|Differentiation}} $x$ is:
:$\dfrac {\d^n} {\d x^n} \dfrac 1 {x^m} = \dfrac {\paren {-1}^n m^{\overline n}} {x^{m + n}}$
where $m^{\overline n}$ denotes the rising factorial.

Proof:
Proof by induction:
For all $n \in \N_{>0}$, let $\map P n$ be the proposition:
:$\dfrac {\d^n} {\d x^n} \dfrac 1 {x^m} = \dfrac {\paren {-1}^n m^{\overline n}} {x^{m + n}}$
Theorem: Derivatives of PGF of Geometric Distribution

Let $X$ be a discrete random variable with the geometric distribution with parameter $p$.
Then the derivatives of the PGF of $X$ {{WRT|Differentiation}} $s$ are:
:$\dfrac {\d^n} {\d s^n} \map {\Pi_X} s = \dfrac {q p^n n!} {\paren {1 - p s}^{n + 1} }$
where $q = 1 - p$.

Proof:
The Probability Generating Function of Geometric Distribution is:
:$\map {\Pi_X} s = \dfrac q {1 - p s}$
where $q = 1 - p$.
From Derivatives of Function of $a x + b$, we have that:
:$\map {\dfrac {\d^n} {\d s^n} } {\map f {1 - p s} } = \paren {-p}^n \map {\dfrac {\d^n} {\d z^n} } {\map f z}$
where $z = 1 - ps$.
Here we have that $\map f z = \dfrac q z$.
From Nth Derivative of Reciprocal of Mth Power:
:$\dfrac {\d^n} {\d z^n} \dfrac q z = q \dfrac {\d^n} {\d z^n} \dfrac 1 z = q \dfrac {\paren {-1}^n n!} {z^{n + 1} }$
where $n!$ denotes $n$ factorial.
So putting it together:
:$\dfrac {\d^n} {\d s^n} \map {\Pi_X} s = q \paren {-p}^n \dfrac {\paren {-1}^n n!} {\paren {1 - p s}^{n + 1} }$
whence (after algebra):
:$\dfrac {\d^n} {\d s^n} \map {\Pi_X} s = \dfrac {q p^n n!} {\paren {1 - p s}^{n + 1} }$
{{qed}}
Category:Geometric Distribution
Category:Derivatives of PGFs
sju647ktnbvavrs3k0l214xz8lffn0p
Theorem: Derivatives of PGF of Shifted Geometric Distribution

Let $X$ be a discrete random variable with the shifted geometric distribution with parameter $p$.
Then the derivatives of the PGF of $X$ {{WRT|Differentiation}} $s$ are:
:$\map {\dfrac {\d^n} {\d s^n} } {\map {\Pi_X} s} = \dfrac {p q^{n - 1} \paren {n - 1}!} {\paren {1 - q s}^{n + 1} }$
where $q = 1 - p$.

Proof:
The Probability Generating Function of Shifted Geometric Distribution is:
:$\map {\Pi_X} s = \dfrac {p s} {1 - q s}$
where $q = 1 - p$.
First we need to obtain the first derivative:
{{begin-eqn}}
{{eqn | l = \map {\Pi'_X} s
      | r = \map {\frac \d {\d s} } {\frac {p s} {1 - q s} }
      | c = 
}}
{{eqn | r = p s \map {\frac \d {\d s} } {\frac 1 {1 - q s} } + \frac 1 {1 - q s} \map {\frac \d {\d s} } {p s}
      | c = Sum Rule for Derivatives
}}
{{eqn | r = \frac {p q s} {\paren {1 - q s}^2} + \frac p {1 - q s}
      | c = {{LHS}} is first derivative of PGF of Geometric Distribution
}}
{{eqn | r = \frac {p q s + p \paren {1 - q s} } {\paren {1 - q s}^2}
      | c = 
}}
{{eqn | r = \frac p {\paren {1 - q s}^2}
      | c = after some algebra
}}
{{end-eqn}}
From Derivatives of Function of $a x + b$:
:$\map {\dfrac {\d^n} {\d s^n} } {\map f {1 - q s} } = \paren {-q}^n \map {\dfrac {\d^n} {\d z^n} } {\map f z}$
where $z = 1 - q s$.
Here we have that:
:$\map f z = p \dfrac 1 {z^2}$
From Nth Derivative of Reciprocal of Mth Power:
:$\dfrac {\d^{n - 1} } {\d z^{n - 1} } \dfrac 1 {z^2} = \dfrac {\paren {-1}^{n - 1} 2^{\overline {n - 1} } } {z^{\paren {n - 1} + 2} }$
where $\overline {n - 1}$ denotes the rising factorial.
Note that we consider the $n-1$th derivative because we have already taken the first one.
Also note that $2^{\overline {n - 1} } = 1^{\overline {n - 1} } = \paren {n - 1}!$
So putting it together:
:$\dfrac {\d^n} {\d s^n} \map {\Pi_X} s = p \paren {-q}^{n - 1} \dfrac {\paren {-1}^{n - 1} \paren {n - 1}!} {\paren {1 - q s}^{n + 1} }$
whence (after algebra):
:$\dfrac {\d^n} {\d s^n} \map {\Pi_X} s = \dfrac {p q^{n - 1} \paren {n - 1}!} {\paren {1 - q s}^{n + 1} }$
{{qed}}
{{proofread}}
Category:Geometric Distribution
Category:Derivatives of PGFs
28c8qmjvqq1xdza2vgh3ql83i8ysnn7
Theorem: Derivatives of PGF of Discrete Uniform Distribution

Let $X$ be a discrete random variable with the discrete uniform distribution with parameter $n$.
Then the derivatives of the PGF of $X$ {{WRT|Differentiation}} $s$ are:
$\quad\dfrac {\d^m} {\d s^m} \map {\Pi_X} s = \begin{cases}
\ds \dfrac 1 n \sum_{k \mathop = m}^n k^{\underline m} s^{k - m} & : m \le n \\
0 & : k > n
\end{cases}$
where $k^{\underline m}$ is the falling factorial.

Proof:
The Probability Generating Function of Discrete Uniform Distribution is:
:$\map {\Pi_X} s = \dfrac {s \paren {1 - s^n} } {n \paren {1 - s} } = \dfrac 1 n \ds \sum_{k \mathop = 1}^n s^k$
From Nth Derivative of Mth Power:
$\quad\dfrac {\d^k} {\d s^k} s^n = \begin {cases}
n^{\underline k} s^{n - k} & : k \le n \\
0 & : k > n
\end {cases}$
The result follows.
{{qed}}
Category:Discrete Uniform Distribution
Category:Derivatives of PGFs
jumhxnbdubhr2tya6cnealb5jhrxudh
Theorem: Total Expectation Theorem

Let $\EE = \struct {\Omega, \Sigma, \Pr}$ be a probability space.
Let $X$ be a discrete random variable on $\EE$.
Let $\set {B_1 \mid B_2 \mid \cdots}$ be a partition of $\Omega$ such that $\map \Pr {B_i} > 0$ for each $i$.
Then:
:$\ds \expect X = \sum_i \expect {X \mid B_i} \, \map \Pr {B_i}$
whenever this sum converges absolutely.
In the above:
:$\expect X$ denotes the expectation of $X$
:$\expect {X \mid B_i}$ denotes the conditional expectation of $X$ given $B_i$.

Proof:
{{begin-eqn}}
{{eqn | l = \sum_i \expect {X \mid B_i} \, \map \Pr {B_i}
      | r = \sum_i \sum_x x \, \map \Pr {\set {X = x} \cap B_i}
      | c = {{Defof|Conditional Expectation}}
}}
{{eqn | r = \sum_x x \map \Pr {\set {X \in x} \cap \paren {\bigcup_i B_i} }
      | c = 
}}
{{eqn | r = \sum_x x \map \Pr {X = x}
      | c = 
}}
{{eqn | r = \expect X
      | c = {{Defof|Expectation}}
}}
{{end-eqn}}
{{qed}}