Page 1 of 1
Fit, Plot, and Manipulate Distributions?
Posted: Tue Jun 16, 2009 11:37 am
by cpeter9
Given a set of data, is there a way to have EVIEWS
a) Fit a normal distribution (based on some kind of best fit / ML estimation)
b) Fit another normal distribution (density) on top of the previous distribution (but with a smaller, user supplied standard deviation)
c) Find the area between the two curves in one tail from the intersection out (to infinity presumably given that it is a density distribution.)
?
Thanks for any help with this!
Chris
Re: Fit, Plot, and Manipulate Distributions?
Posted: Tue Jun 16, 2009 11:50 am
by startz
Given a set of data, is there a way to have EVIEWS
a) Fit a normal distribution (based on some kind of best fit / ML estimation)
b) Fit another normal distribution (density) on top of the previous distribution (but with a smaller, user supplied standard deviation)
c) Find the area between the two curves in one tail from the intersection out (to infinity presumably given that it is a density distribution.)
?
Thanks for any help with this!
Chris
Take a look at distribution graphs for (a) and (b).
Re: Fit, Plot, and Manipulate Distributions?
Posted: Tue Jun 16, 2009 1:03 pm
by cpeter9
Ok, I see (and have done a), and I see how one might plot b on top of it (I could probably generate a random series in this case to do the trick), but how would I then find the area between the two curves where they intersect in the left tail?
Re: Fit, Plot, and Manipulate Distributions?
Posted: Tue Jun 16, 2009 1:20 pm
by cpeter9
To clarify, check out the attached and plotted density function.
I could probably do a heck of a lot of calculus and calculations (give the complexity of the normal dist. function) and get an answer, but is there any easy EVIEWS way to calculate the area below the left tale of the blue line distribution and above the left tale of the red line distribution?
Re: Fit, Plot, and Manipulate Distributions?
Posted: Tue Jun 16, 2009 2:12 pm
by EViews Glenn
I'm not certain that I understand. Do you want the integral of the difference for the regions to the left and right of the intersection?
Re: Fit, Plot, and Manipulate Distributions?
Posted: Tue Jun 16, 2009 2:46 pm
by cpeter9
I'm sorry, that was very poorly worded and explained. Disregard the previous post, I feel like I have a much better grip on my question now.
Again, attached is a graph. What I'm trying to figure out is probably more of a statistics question than EVIEWS question.
I've found the area under the curve of the blue normal distribution left of the black line.
I'm trying to find the area under the blue curve represented by the area under the red curve to the left of the black line.
I can't simply find the area of the red curve (left of the black line) and subtract that from the blue area because each density curve adds to 1, make sense?
Also, is there anyway to extend the blue and red plot lines of the distributions to the x axis in EVIEWS?
Re: Fit, Plot, and Manipulate Distributions?
Posted: Tue Jun 16, 2009 3:11 pm
by EViews Glenn
Let's do a couple of quick calculations
Suppose the black line is 133,500,000.
Let the mean be 1.405e+08.
Let the standard deviation of the blue density be 4.575e+06
Let the standard deviation of the red density be 1.00e+06
Code: Select all
scalar black = 133500000
scalar mean = 1.405e+08
scalar bluesd = 4.57e+06
scalar redsd = 1.00e+06
Then the area under the curve to the left of the black line for the blue density is
Code: Select all
scalar bluecdf = @cnorm((black - mean)/bluesd)
The area to the left of the black line for the red density is
Code: Select all
salar redcdf = @cnorm((black - mean)/redsd)
Now since we've got the normal, the blue density is always higher than the corresponding red density beyond the intersections so you can take the difference of the two.
Re: Fit, Plot, and Manipulate Distributions?
Posted: Wed Jun 17, 2009 2:38 pm
by cpeter9
Thank you!!! That's exactly what I needed!
Re: Fit, Plot, and Manipulate Distributions?
Posted: Fri Nov 29, 2013 7:26 pm
by COPerezRoman
To CPeter9:
How were you able to fit the normal distribution to your data? I have a set of data, and I'm trying to see which distribution best fits it. It'd be great to at least get a starting point to work with.
Best Regards,
COPerezRoman
Re: Fit, Plot, and Manipulate Distributions?
Posted: Sat Nov 30, 2013 8:35 am
by trubador
How were you able to fit the normal distribution to your data? I have a set of data, and I'm trying to see which distribution best fits it. It'd be great to at least get a starting point to work with.
Open your series, then go to
View/Descriptive Statistics & Tests/Empirical Distribution Tests...