Tag Info

New answers tagged

1

Median itself doesn't work on associations of vectors: In[9]:= Median[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 3, "b" -> 4|>}] During evaluation of In[9]:= Median::rectn: Rectangular array of real numbers is expected at position 1 in Median[{<|a->1,b->2|>,<|a->3,b->4|>}]. >> Out[9]= Median[{<|"a" -> 1, ...


12

Starting with a corrected version of your ProbabilityDistribution f[a_, b_, g_, c_, k_] := ProbabilityDistribution[ a b c k x^(c - 1) (1 + x^c)^(k - 1) ((1 + x^c)^k - 1)^(-b - 1) (1 + g ((1 + x^c)^k - 1)^-b)^(-(a/g) - 1), {x, 0, Infinity}, Assumptions -> a > 0 && b > 0 && g > 0 && c > 0 && k > ...


0

Here is a method to compute a density function of a large number of arbitrary positive real functions. Create a list of the functions required: fs = Function[{s, t}, (1 + Cos[t - #]) (1 + Sin[s - #])] & /@ RandomReal[{0, 2 \[Pi]}, {1000}]; Compute the density plot by mapping the arguments over the functions and then summing them: ...


3

This is a fast discrete approach i = Import["http://i.stack.imgur.com/D2GVe.png"]; tid = Transpose[ ImageData[ColorSeparate@ColorConvert[i, "HSB"] // Last]]; nm = Max /@ tid; Histogram[2.2/4 MapThread[Count[Sign[#1 - #2/2], 1] &, {tid, nm}]] Addressing @BlacKow comments below, the following shows that the method works well for this data because all ...


8

As I said in the comments, under the null hypothesis (in this case that the data was drawn from a particular distribution family) the p-value should follow a uniform distribution on (0,1). Let me illustrate with a simple z-test. ztest[data_, mu0_, sigma_] := Block[{z, p, d}, z = (Mean[data] - mu0)/(sigma/Sqrt[Length[data]]); d = NormalDistribution[]; ...


6

I think this is the most compact I can get without defining my own function: InverseCDF[NormalDistribution[mu, sigma], prob]


0

synthetic data: strings = DateString /@ Sort@RandomVariate[ NormalDistribution[AbsoluteTime[Date[]], 10^7],200]; Note this date string format is not exactly the same as yours but I think all this will still work. DateListPlot[MapIndexed[ {#, First@#2} &, strings ], Ticks -> {DateRange[{2013, 12}, {2016, 2}, {{3, "Month"}}], ...


4

You specifically use the method of moments, is that meant to be a real problem constraint? If you can instead use the maximum likelihood estimate for {a,b} then you can you perform a straightforward likelihood ratio (LR) test. In the following quick check, the LR test statistic is approximately Chi-Square distributed (see Wilk's theorem), so you can accept ...



Top 50 recent answers are included