Skip to main content
11 events
when toggle format what by license comment
Oct 24, 2016 at 15:13 vote accept flyingmind
Oct 24, 2016 at 15:13 comment added flyingmind Damn. Long day. That should have read "... had not increased the range to that extent". Thanks again
Oct 24, 2016 at 15:12 comment added flyingmind That should have read "... had increased the range to that extent". Thanks again.
Oct 24, 2016 at 15:11 comment added flyingmind Great, thanks. This makes sense. I had a play with the bin sizes and range but had increased the range to that extent. I was also misled slightly by the way in which Matlab handles histograms which is different to Mathematica. Many thanks for your help.
Oct 24, 2016 at 6:14 comment added JimB For your update about 5.5% of the data lies above 250 and with the bin specification of {0,250,1}, Histogram ignores that data and causes the "bars" to show above the PDF of the transformed distribution. So I'd argue that the apparent lack of fit at the higher probability density values is a bit misleading. (In other words, your fit is better than it looks.) The same thing happens with the other histogram but only about 1.4% of the data is above 80 so the lack of fit does not look as bad.
Oct 24, 2016 at 0:38 comment added Bob Hanlon @flyingmind - see edit.
Oct 24, 2016 at 0:38 history edited Bob Hanlon CC BY-SA 3.0
Added second example in response to comment.
Oct 23, 2016 at 18:27 comment added flyingmind Sorry, pressed enter too soon.... Not suite sure what the difference is here as both are being generated by transDistrib.
Oct 23, 2016 at 18:26 comment added flyingmind hiod = 6.5/2; transDistrib = TransformedDistribution[hiod/Tan[theta*Degree], theta \[Distributed] TruncatedDistribution[{0, 90}, NormalDistribution[3, 5/3]]]; dataTrans = RandomVariate[transDistrib, 10^6]; Show[Histogram[dataTrans, {0, 80, 1}, "PDF", ImageSize -> Large], Plot[PDF[transDistrib, x], {x, 0, 80}, PlotStyle -> Thick]]
Oct 23, 2016 at 18:26 comment added flyingmind Thanks, this seems to work well, but changing the mean of the normal distribution results in the histogram and the pdf giving quite different probabilities.
Oct 23, 2016 at 16:54 history answered Bob Hanlon CC BY-SA 3.0