How do you fit a gamma distribution?

Hi There

How do you fit a gamma distribution to random data while fixing one of the gamma distribution parameters? Lets say we fix the shaping factor k for example and try to find the scaling factor Thetha of the gamma pdf?

How is this done in Matlab?

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Expanding on what Wayne wrote, you can supply your fixed-parameter version of the gamma distribution to the mle function. Try this:

x = gamrnd(1.1,100,100,1);
ab = gamfit(x) % fit a and b
b = mle(x,'pdf',@(x,b)gampdf(x,1,b),'start',1) % fix a=1
% compare the empirical distribution and two fits
ecdf(x);
xx = linspace(0,max(x));
line(xx,gamcdf(xx,ab(1),ab(2)),'color','r')
line(xx,gamcdf(xx,1,b),'color','c')

SEE COMPLETE ANSWER CLICK THE LINK

--

--

--

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What Does the GitHub Kubernetes Best Practices Badge Mean?

Why user adoption is so important to company success

Web 2.0 vs Web 3.0- The Old vs the New.

Git (getting started)

Python Lists | 10 must-know Operations for Data Manipulation

Python Lists

How to make a database connection in Python for absolute beginners

Importing existing BigQuery Resources to Terraform Automatically

Reasons why you should learn to use the command line

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Technical Source

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

More from Medium

Random sample without replacement

What are the vectors in fitdist command window output?

Smart and fast way to compute triple summation?

How to initialize the parameter mu to zero of a Gaussian Mixture model ?