Why does my log-normal distribution not fit my data?

Hello,

I am fitting some realively simple data with a log normal distribution.

I am then generating a probability distribution from that fit.

Shouldn’t this roughly match the intial data?

when I plot it on top of normalized histogram of the data, the shape is appropriate but the scale is about ten-fold lower.

Example below.

parmat = lognfit(data)
pdf = lognpdf(0:1:1000,parmat(1),parmat(2))
figure;hold on
histogram(data,[0:1:1000],'normalization','probability')
plot(0:1:1000,pdf)

In this case shouldn’t the probability density function approximate the histrogam, rather than being one tenth or less the values of the histogram probability?

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.

Consider thisexample:

X = lognrnd(0,1,[1,1000]);
histogram(X,100,'normalization','probability')
hold on
ezplot(@(x) lognpdf(x,0,1))

So the two plots seems scaled wrong.

But the histogram normlization chosen was one such that the sum of the bars is 1. Consider the choices given though.

ezplot(@(x) lognpdf(x,0,1))
hold on
histogram(X,100,'normalization','pdf')

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

Learn How Decision Trees are Grown

Sentiment Analysis of IKEA’s Google Maps Reviews in R

Data Collect 101

Pandas in the Pandaemic. (COVID-19 in — Scotland statistics) Part 2

How web scraping helped me go from learning to teaching

Joint genotyping 10K whole genome sequences using Sentieon on Google Cloud: Strategies for…

“IDinsight-ing IDinsight”: Applying data to our internal operations decisions

City of Toledo establishes online open data portal

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

Forecasting overview and roadmap for Beginners !!!

Liver Disease Prediction

Deep dive into video games through Sales and Scores

USA Real Estate Analysis and Machine Learning | Kaggle