Tag Info

Hot answers tagged

7

Here's a way to get the plane of best fit: subtract the centroid of the data, and then plot the plane generated by the first two left singular vectors of the singular value decomposition of the resulting data: Y = # - Mean /@ # &[t1\[Transpose]] {U, S, V} = SingularValueDecomposition[Y]; Graphics3D[{InfinitePlane[{{0, 0, 0}, U[[;; , 1]], U[[;; , 2]]}], ...


5

Show[ ListPointPlot3D[t1, PlotStyle -> Red, Filling -> Bottom], Plot3D[ Evaluate@Fit[t1, {1, x, y}, {x, y}] , {x, Min[t1[[All, 1]]], Max[t1[[All, 1]]]} , {y, Min[t1[[All, 2]]], Max[t1[[All, 2]]]} ]]


5

You have the import. dates = Import["http://www.sudomemo.net/statistics/firstSeenDump.php", "JSON"] Gather them up by day and count how many in each day. dailyGather = GatherBy[dates, Take[DateList[#], 3] &]; dailyVisits = {Take[DateList[dailyGather[[#, 1]]], 3],Length[dailyGather[[#]]]} & /@ Range[First@Dimensions[dailyGather]]; Plot the ...


5

You're about to realize that derivatives in the real world are a pain. You have to aggregate data as much as possible and average it a lot until you get a "textbook-quality second-derivative! dates = DateList /@ Import["http://www.sudomemo.net/statistics/firstSeenDump.php", "JSON"] Grouping by days and counting: datesDays = Tally@dates[[All, ;; 3]]; ...


4

dist = MultinormalDistribution[ {0, 0}, {{1, 0}, {0, 1}}]; PDF[dist, {x, y}] E^((1/2)*(-x^2 - y^2))/(2*Pi) CDF[dist, {x, y}] (1/4)*Erfc[-(x/Sqrt2)]*Erfc[-(y/Sqrt2)] The inverse CDF is not unique. To simplify the problem I will find the inverse CDF with y == x Show[ ContourPlot[ CDF[dist, {x, y}], {x, -3, 3}, {y, -3, 3}, Contours ...


4

You have likely made an error in computing the test statistic by not sorting R and by using incorrect limits on empirical CDF values. R = {0.171434, 0.134263, 0.155931, 0.135479, 0.196356, 0.152357, 0.133084, 0.10537, 0.14654, 0.116676, 0.123145, 0.145377, 0.12366, 0.156681, 0.208564, 0.202139, 0.227931, 0.15622, 0.118042, 0.104006, 0.322, ...


4

KolmogorovSmirnovTest >> Details and Options says: and Example: wd = WeibullDistribution[4, 2]; data = RandomVariate[wd, 50]; ed = EmpiricalDistribution[data]; f1 = CDF[ed, #] &; f2 = CDF[wd, #] &; kspv = KolmogorovSmirnovTest[data, wd] (* 0.0676597 *) ksts = KolmogorovSmirnovTest[data, wd, "TestStatistic"] (* 0.180441 *) ...


3

As I pointed out in the comments I don't believe you will be able to use built-in tests to compute this. The Kolmogorov-Smirnov test requires that you can compute the CDF of the distribution. Unfortunately, ProbabilityDistribution seems to convert to PDF even if you create it with the CDF. Then it reverts back to the definition for CDF when it tries to ...


2

RandomFunction produces a TemporalData object. The action of Histogram on TemporalData is to just do a histogram of the values (ignoring time stamps). td = RandomFunction[QueueingProcess[3, 5], {0, 15}]; GraphicsRow[{Histogram[td], Histogram[td["Values"]]}] Thus, you can either wrap your data in TemporalData or just make a histogram of the values ...


1

I'm not sure if I understand completely what you want but let us show some properties of your data graphically. The data provided is a list of event data in the format {time instants of transition to another state, the state after transition} data = {{0.0, 0}, {2.0199, 1}, {3.3544, 0}, {6.2484, 1}, {7.0204, 0}, {16.6974, 1}, {17.4653, 0}, {33.1508, ...


1

For instance, if I have a process and it first spends 2 minutes in state 1, then 200 minutes in state 2 and 10 minutes in state 0: {{0,0},{2,1}, {202, 2}, {212,0}} I would want the time be included in the calculation of the relative frequency as opposed to the number of occurences. Based on this description, I can suggest the following approach: ...


1

Demonstrating what Simon Woods pointed out. From the documentation for the GumbelDistribution: "The Gumbel distribution gives the asymptotic distribution of the minimum value in a sample from a distribution such as the normal distribution." "The asymptotic distribution of the maximum value, also sometimes called a Gumbel distribution, is implemented in ...



Only top voted, non community-wiki answers of a minimum length are eligible