33 views

Uploaded by jimyao

- 10. Bus Stat - Chapter 10 - April 4th
- lec33
- Simulation R
- SOBOLThe Monte Carlo Method
- Six Sigma Presentation-1
- How to Calculate Process Sigma
- 56FBBCFDd01
- KLdiv
- Cha18sec437
- Pert
- Munson. Fundamentals of Fluid Mechanics, Student Solution Manual(T)(C)(204s)
- Data-mining FINAL
- Empirical likelihood estimation of interest rate diusion model
- Paper on Rank Data
- 173232298 a Guide to Modern Econometrics by Verbeek 221 230
- Guide 141 Uncertitudfe
- ACI 214.3 (R1997) SimpleVersion-RP-Eval-StrengthTestResults-Concrete.pdf
- A STUDY OF SCHOOL LEARNING CULTURE IN REFERENCE TO LEADERSHIP BEHAVIOR OF PRINCIPALS OF SECONDARY SCHOOLS.
- Abordo Sigasdnals
- IMAGE FUSION USING BLUR ESTIMATION

You are on page 1of 7

Navigator

This section discusses two basic probability density functions and probability distributions: uniform and normal, Gaussian mixture models, and GMM curve fitting.

Uniform probability density functions can be generated using function unifpdf . Given a range x, and a left and right endpoint, unifpdf distributes probabilities uniformly over x.

unifpdf(x, a, b) : x = vector of range (including granularity), a = left endpoint, b = right endpoint

plot standard normal distribution with matlab Characteristic of a normal distribution are mean and standard deviation. ? FigureTo verify, we plot a histogram of the original data and the 2 10.1 Gaussian... ? Click image to enlarge, or click here to open

Normal probability density functions are generated using function normpdf . Characteristic of a normal distribution are mean and standard deviation.

normpdf(x, mean, std) : x = vector of range (including granularity)

http://www.aquaphoenix.com/lecture/matlab10/page2.html[2011/6/5 21:14:26]

Matlab Lecture 10

unifpdf and normpdf generate "perfect" densities; however, typical data observations only fit these distributions approximately. To simulate these situtations, Matlab offers functions for random number generation for both uniform and normal distributions. Function rand generates uniformly distributed random values between 0 and 1.

rand(rows, columns) : matrix with rows and columns of random values.

pdfUniform = rand(1, 10000); subplot(2,1,1), hist(pdfUniform), title('Uniform distribution, histogram'); subplot(2,1,2), hist(pdfUniform, 100), title('Uniform distribution, histogram');

100

bin

To fit a different range of x-values, we can shift and scale the random value matrix accordingly:

http://www.aquaphoenix.com/lecture/matlab10/page2.html[2011/6/5 21:14:26]

Matlab Lecture 10

distribution

Shifted

and

Scaled,

100

bin

Function randn generates normally distributed random values with mean=0 and standard deviation=0.

randn(rows, columns) : matrix with rows and columns random values.

pdfNormal = randn(1, 10000); subplot(2,1,1), hist(pdfNormal), title('Normal distribution, histogram'); subplot(2,1,2), hist(pdfNormal, 100), title('Normal distribution, histogram');

100

bin

A random normal distribution with mean mu and standard deviation std is obtained by shifting and scaling: pdfMean = 5;

http://www.aquaphoenix.com/lecture/matlab10/page2.html[2011/6/5 21:14:26]

Matlab Lecture 10

pdfStd = 7; pdfNormalSS = randn(1, 10000) * pdfStd + pdfMean; subplot(2,1,1), hist(pdfNormalSS), title('Normal distribution with Mean=5, Std=7'); subplot(2,1,2), hist(pdfNormalSS, 100), title('Normal distribution with Mean=5, Std=7');

Evaluating the mean and standard deviation of the random distribution confirms their approximate values: meanSS = mean(pdfNormalSS) stdSS = std(pdfNormalSS)

Given a normal distribution of observed data, we can determine its best fit to a Gaussian by taking its mean mu and standard deviation std, and then reconstructing it: xRange = floor(min(pdfNormalSS)):0.1:ceil(max(pdfNormalSS)); pdfNormalFitted = normpdf(xRange, meanSS, stdSS); We can verify by plotting a histogram of the original data and the fitted Gaussian. For proper comparison, both graphs must share the same x-range, and thus we use the function axis to retrieve and set axis properties.

http://www.aquaphoenix.com/lecture/matlab10/page2.html[2011/6/5 21:14:26]

Matlab Lecture 10

h1 = subplot(2,1,1); hist(pdfNormalSS, 100); h2 = subplot(2,1,2); plot(xRange, pdfNormalFitted); a1 = axis(h1); a2 = axis(h2); axis(h2, [a1(1), a1(2), a2(3), a2(4)]);

For a mixture of different normal distributions (a Gaussian Mixture Model), the correct parameters for mean and standard deviation for each Gaussian cannot be computed by simply taking mean and std of the entire data set. The observed data must be divided into several Gaussians, each of with its own mean and standard deviation. One approach for obtaining the paramaters for each Gaussian is to apply the algorithm for Expectation Maximization: em_1dim.m Expectation Maximization - Approximation of Gaussian Mixture Models (GMM) This requires an initial guess as to how many Gaussians are hidden in the distribution. A GMM with 2 Gaussian distributions: pdfGMM = [(randn(1, 10000) * 7 + 3), (randn(1, 10000) * 2 + 9)]; subplot(2,1,1), hist(pdfGMM, 100);

http://www.aquaphoenix.com/lecture/matlab10/page2.html[2011/6/5 21:14:26]

Matlab Lecture 10

Estimate mean and standard deviations for 2 Gaussians: [em_thr,em_thr_behavior,P,meanV,stdV,pdf_x,xx,pdf_xx,cdf_xx] = em_1dim(pdfGMM, 2); meanV stdV

To verify, we plot a histogram of the original data and the 2 Gaussian distributions: h1 = subplot(2,1,1); hist(pdfGMM, 100); h2 = subplot(2,1,2); plot(xx, normpdf(xx, meanV(1), stdV(1)), 'r'); hold on; subplot(2,1,2), plot(xx, normpdf(xx, meanV(2), stdV(2)), 'g'); hold off; a1 = axis(h1); a2 = axis(h2); axis(h2, [a1(1), a1(2), a2(3), a2(4)]);

http://www.aquaphoenix.com/lecture/matlab10/page2.html[2011/6/5 21:14:26]

Matlab Lecture 10

http://www.aquaphoenix.com/lecture/matlab10/page2.html[2011/6/5 21:14:26]

- 10. Bus Stat - Chapter 10 - April 4thUploaded byIvanJulian
- lec33Uploaded bytodkarvarsha
- Simulation RUploaded byHerson Mata
- SOBOLThe Monte Carlo MethodUploaded byManuel Balaguera
- Six Sigma Presentation-1Uploaded byDramil Thakkar
- How to Calculate Process SigmaUploaded byRonald Adi Witoko
- 56FBBCFDd01Uploaded bySri Susilawati Islam
- KLdivUploaded byMax Chamberlin
- Cha18sec437Uploaded byJuan Carlos Diego
- PertUploaded byanon_351276599
- Munson. Fundamentals of Fluid Mechanics, Student Solution Manual(T)(C)(204s)Uploaded byAhmed Idrees
- Data-mining FINALUploaded byal-amin shohag
- Empirical likelihood estimation of interest rate diusion modelUploaded bymirando93
- Paper on Rank DataUploaded byAnurupa Kundu
- 173232298 a Guide to Modern Econometrics by Verbeek 221 230Uploaded byAnonymous T2LhplU
- Guide 141 UncertitudfeUploaded byMohamed Dhouibi
- ACI 214.3 (R1997) SimpleVersion-RP-Eval-StrengthTestResults-Concrete.pdfUploaded byphilipyap
- A STUDY OF SCHOOL LEARNING CULTURE IN REFERENCE TO LEADERSHIP BEHAVIOR OF PRINCIPALS OF SECONDARY SCHOOLS.Uploaded byIJAR Journal
- Abordo SigasdnalsUploaded bygmscrotec
- IMAGE FUSION USING BLUR ESTIMATIONUploaded bySangeeta Inginshetty
- Basic Probability TheoryUploaded byA Hasib Chowdhury
- StatsdfdsffUploaded byPsychologyEnergy
- ARTICLE - Finding the Center of a Phyllotactic Pattern - Scott Hotton (Journal Article)Uploaded byTanya Michaela Kneidinger
- 2016 Davids Et Al JournalofPsychologyinAfricaUploaded byLia Ayu
- On the Primary Exclusive Region of Cognitive NetworksUploaded bykhajarasool_sk
- Distribution parameters From MATLABUploaded byJunhyo Lee
- The Origins of Truncated Levy FlightsUploaded bydiegoblrd
- Effect of Gender Attitude Towards Science Parental EducationUploaded byalhanun
- chapter4.pdfUploaded bySmith
- final pjss-31-2-19Uploaded byapi-250591879

- Distribution-function.pptUploaded byherayatiesmi
- Recursive Least SquaresUploaded byashwini1512
- STATSP11SY(4)Uploaded byLeila Tatum
- Test Chapters 1923 KeyUploaded bycamillesyp
- siivjhdilkcnUploaded byLiz Paige
- Exercises695Clas SolutionUploaded byHunAina Irshad
- Analyzing Survey DataUploaded byHector Garcia
- MQM100_MultipleChoice_Chapter8Uploaded byNakin K
- Brian Neelon R ProgramsUploaded bysommukh
- Unit 1Uploaded byMarian Nelson
- garcia-berthouUploaded byBill Jungers
- Chapter 1 L1Uploaded byDanish Zabidi
- 04_chancapUploaded byKemal Gözdeler
- MBA ZC417-QM.docxUploaded byIPlobo
- Methodist Kl 2014 (q)Uploaded bySTPMmaths
- Samenvatting_EconometricsUploaded bysentinelxxxx
- Lecture 6-Measure of Central Tendency-exampleUploaded byamirhazieq
- Solo Et Al 2013 What Are We Weighting ForUploaded byJhon Ortega Garcia
- Item response Theory.pdfUploaded bySyahida Iryani
- White Paper for Low Density Parity Check (LDPC) CodesUploaded byAli Syahputra Nasution
- Advanced Topics in Detection and Estimation TheoryUploaded byclassic_777
- 3- Teaching Plan TSA 201601Uploaded byYc Ong
- Hypothesis Testing IUploaded byMehdi Hooshmand
- Excel Functions for StatisticsUploaded byimidken
- lecture_1-20-15Uploaded byscmret
- 3.quiz.docxUploaded byVanny Joyce
- Quiz 2Uploaded byelchino281
- Asparouhov y Muthen Multiple Imputation.pdfUploaded byAntonio Pineda Dominguez
- CT3_QP_1108Uploaded byNitai Chandra Ganguly
- DIS_ch_7.pptxUploaded byVictoria Liendo