I have data that reflects the arrival time of a flight. {3, -2, 16, 13, -6, 5, 4, -7, 7, 0……..n} this is for 8:45am and has 150 elements "arrivals" The positive values represent the time in minutes past the planned time,{“late”} and the negative, is before planned time {“early”} My question, I would like to find the time of arrival with the highest probability. Can I use this data as is?
|
For the sake of giving a (hopefully) useful answer. Lets generate 150 arrival times where negative values indicate early and positive times indicate late arrivals. Here I'm assuming that people are as likely to be late as early and the distribution of arrival times is
Now there are a number of things available to us in Mathematica for working with this data. Lets compute the expected arrival time.
Or we could say, what is the probability someone is late?
We can estimate distributions from the data. Here a mixture of normals is used which is a little silly given that the data is discrete but normal is known to be a reasonable approximation to the binomial distribution with large enough samples and we expect a bimodal distribution given the setup.
We can plot all sorts of things and assess the goodness of fit to our chosen distribution.
We should keep in mind here that the p-value will probably be larger than it should be since I've estimated the distribution from the data first...
We can always check further with a
The bottom line is that there is nothing special about negative arrival times as far as Mathematica is concerned. It is happy to work with them just like any other data. |
||||
|
|




Histogram[data,Automatic,"Probability"]seems like a good start. To say anything about highest probability you need to make some assumptions about the underlying distributions. You can try to fit various distributions to the data. – ssch Feb 23 at 1:33DistributionFitTestis supposed to be interpreted?sets = 100; size = 10000; data = RandomVariate[NormalDistribution[], {sets, size}]; Histogram[DistributionFitTest[#, Automatic] & /@ data]It's all over the place – ssch Feb 23 at 1:53DistributionFitTestgives you back the p-value from the test which is going to vary for each set but most of the results of the actual test are what you expectsets=100;size=10000;data=RandomVariate[NormalDistribution[x,{sets,size}];Tally[(DistributionFitTest[#,Automatic,"ShortTestConclusion"] & /@ data)]– Martin John Hadley Feb 23 at 2:20