How to calculate the estimation of Gaussian distribution through Matlab?

조회 수: 2 (최근 30일)
sissi
sissi 2016년 4월 14일
I'm learning probability recently. When trying to verify the estimation of Gaussian distribution, which equals to the mean of distribution, I have some problems. I used the code as following:
clc;clear; syms x sigm mu; fx = 1/(sqrt(2*pi)*sigm)*exp(-(x-mu)^2/(2*sigm^2))*x; int(fx,x,-inf,inf)
with the result: ans =
-(2251799813685248*(limit((2^(1/2)*pi^(1/2)*mu*erfi((2^(1/2)*(x - mu)*(-1/sigm^2)^(1/2))/2))/(2*(-1/sigm^2)^(1/2)) - sigm^2*exp(-x^2/(2*sigm^2))*exp((x*mu)/sigm^2)*exp(-mu^2/(2*sigm^2)), x == -Inf) - limit((2^(1/2)*pi^(1/2)*mu*erfi((2^(1/2)*(x - mu)*(-1/sigm^2)^(1/2))/2))/(2*(-1/sigm^2)^(1/2)) - sigm^2*exp(-x^2/(2*sigm^2))*exp((x*mu)/sigm^2)*exp(-mu^2/(2*sigm^2)), x == Inf)))/(5644425081792261*sigm)
shouldn't it be mu?
Thanks a lot!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Probability Distributions and Hypothesis Tests에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by