# Tag Info

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, ...

3

The approach that kguler suggest in your precedent question is completely suitable for the current one: FindSequenceFunction[Table[With[{ d1 = HypoexponentialDistribution[Flatten[Table[{λ, μ}, {i - 1}]]], d2 = HypoexponentialDistribution[{λ, μ}], d3 = ExponentialDistribution[μ], d = ExponentialDistribution[λ]}, ...

2

In this case, you can simply use ChiSquareDistribution[k], but in the general case, of the sum of k variables distributed as dist: iid[k_, dist_] := TransformedDistribution[ Sum[a[i], {i, k}], Table[Distributed[a[i], dist], {i, k}] ]

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 *) ...

1

Im not sure exactly what you are after, but here is a trick to rescale the SmoothHistogram result list1 = RandomVariate[NormalDistribution[0, 1], 500]; Show[ { Histogram[list1] , SmoothHistogram[list1] /. Line[x_] :> Line[ {#[[1]], #[[2]] 250} & /@ x] }] another approach is: d = ...

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 ...

10

$$\mathbb{P} \big(\sum_{i=1}^{m} (A_i + S_i) \le L < \sum_{i=1}^{m+1} (A_i + S_i) \big) = \frac{\mu ^m (2 \lambda +\mu )}{2^{m+1} (\lambda +\mu )^{m+1}}$$ Observing: d1 = TransformedDistribution[ a + s, {a \[Distributed] ExponentialDistribution[λ], s \[Distributed] ExponentialDistribution[μ]}] (* ...

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: ...

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 ...

2

The two are not equivalent. The first is a one-sided distribution (a^2 is nonnegative) whereas the second is two-sided (a*b is both positive and negative). You can also generate the first from the HalfNormalDistribution: Assuming[x > 0, PDF[TransformedDistribution[ a^2, {a \[Distributed] NormalDistribution[0, 1]}], x] == ...

0

I wrote my thesis "Implementation of an algorithm for verifying the non-negativity of a multilinear function in a hypercube" about this here (password is "sal" and username "sal"). The key algorithm is not specified in the publication, focusing only on the key implementation idea with the hypercubes -- this was a requirement by my instructor. Shortly I ...

5

You could use ProbabilityDistribution. d = ProbabilityDistribution[ Piecewise[{{1, 0 < x < 1/2}, {1, 1 < x < 3/2}}, 0], {x, -\[Infinity], \[Infinity]}] Mean[d] (* 3/4 *) Or alternatively MixtureDistribution. d2 = MixtureDistribution[{1, 1}, {UniformDistribution[{0, 1/2}], UniformDistribution[{1, 3/2}]}] Mean[d2] (* 3/4 ...

3

Just use $E(X)=\int^{\infty}_{-\infty}x \, PDF(x)\, dx$ f[x_] := Piecewise[{{1, 0 < x < 1/2 || 1 < x < 3/2}, {0, false}}] ExpectedValue=Integrate[x f[x], {x, -Infinity, Infinity}] yields 3/4.

Top 50 recent answers are included