## Go back to

.....The site is being constantly updated, so come back to check new updates.....

If you find any bug or need any improvements in solution report it here

# Moment generating function calculator

This calculator is for finding MGF from PDF of a continuous random variable. The moment-generating function is useful for finding the mean and variance of the distribution.

INSTRUCTION: If you click on step function input box. A keyboard will appear. Use that keyboard to enter your function

Step functions Upper and lower limit of step function

## You can see a sample solution below. Enter your data to get the solution for your question

$$\displaylines{---}$$
$$\displaylines{ \mathbf{\color{Green}{Function\;you\;entered\;is,\;}} \mathbf{\color{Red}{F(x)}} =\left\{\begin{matrix} \mathbf{\color{Red}{0}} & -\infty <x< 0.0 \\ \\ \mathbf{\color{Red}{x}} & 0.0 ≤x≤ 1.0 \\ \\ \mathbf{\color{Red}{2 - x}} & 1.0 ≤x≤ 2.0 \\ \\ \mathbf{\color{Red}{0}} & 2.0 <x< \infty \\ \\ \end{matrix}\right. \\ \\ Moment\;generating\;function,\;M_{X}(t)\;=\; \int_{ -\infty }^{ \infty } (e^{t x} f{\left(x \right)})dx \\ \\ \Rightarrow \int_{ -\infty }^{ 0.0 } (0)dx+\int_{ 0.0 }^{ 1.0 } (x e^{t x})dx+\int_{ 1.0 }^{ 2.0 } (\left(2 - x\right) e^{t x})dx+\int_{ 2.0 }^{ \infty } (0)dx \\ \\ \Rightarrow 0+\begin{cases} \frac{\left(1.0 t - 1\right) e^{1.0 t}}{t^{2}} + \frac{1}{t^{2}} & \text{for}\: t > -\infty \wedge t < \infty \wedge t \neq 0 \\0.5 & \text{otherwise} \end{cases}+\begin{cases} - \frac{\left(1.0 t + 1\right) e^{1.0 t}}{t^{2}} + \frac{e^{2.0 t}}{t^{2}} & \text{for}\: t > -\infty \wedge t < \infty \wedge t \neq 0 \\0.5 & \text{otherwise} \end{cases}+0 \\ \\ \Rightarrow \begin{cases} \frac{\left(- 1.0 t - 1\right) e^{1.0 t}}{t^{2}} + \frac{e^{2.0 t}}{t^{2}} & \text{for}\: t > -\infty \wedge t < \infty \wedge t \neq 0 \\0.5 & \text{otherwise} \end{cases} + \begin{cases} \frac{\left(1.0 t - 1\right) e^{1.0 t}}{t^{2}} + \frac{1}{t^{2}} & \text{for}\: t > -\infty \wedge t < \infty \wedge t \neq 0 \\0.5 & \text{otherwise} \end{cases} }$$