With replacement, successive draws are independent, with red probability and green probability . The first red on draw requires greens followed by one red. Hence
This is a geometric distribution. Its total probability is one because the geometric series sums to .
Use the real logarithm near zero and subtract its two Taylor series:
Thus the first three nonzero terms are
Factor the Gaussian function as . Multiplying the two exponential series gives
For , its first three nonzero terms are
Vanishing coefficients require separate treatment in this Taylor expansion of a translated Gaussian. If , the first three nonzero terms are . If , they are
The latter expression retains the cubic term because the quadratic coefficient is zero.
For fixed real , write the square root as and use the binomial series with exponent :
The absolute values are necessary for negative . This Taylor series is valid for . If , the quotient is for ; it has no continuous extension at zero and therefore has no Taylor expansion about zero.
Integrate the geometric series for from zero to . The first three nonzero terms are
The resulting Taylor series converges for .
Row reduction, or the cofactor formula for a matrix inverse, gives
Multiplying by the right-hand-side column gives, at ,
For general , the coefficient matrix has determinant . Thus other parameter values give a unique solution. If , subtracting the first equation from the second gives , while subtracting it from the third gives , a contradiction. If , subtraction gives and , again inconsistent. Hence
The triangular probability density function is normalized because . It is even, so the mean integrand is odd and . Its variance is consequently its second moment:
For a probability density function , the mean and variance are
These formulas assume the required moments are finite; finiteness of the second moment ensures a finite mean as well.
For , write . The equation becomes , whose roots are , both of modulus one. Hence . If , the double root is , giving the same relation. Therefore
Expand in components:
If , all powers for vanish. The matrix binomial theorem, valid here because commutes with , therefore yields
These powers of the identity plus a square-zero matrix can also be proved by induction: . For the displayed example, directly, and
This is the repeated function composition of a shear mapping. The argument gives every nonnegative integer ; since , the same formula also holds for negative integers.

There are unlisted articles, also show them or only show them.