Tag Info

New answers tagged

1

Few more alternatives/variations: data = RandomReal[50, 100]; (* HistogramList with height spec "SF" *) ListLinePlot[#, PlotRange -> {{0, 60}, Automatic}] &@ Thread@PadRight@HistogramList[data, 1000, "SF"] (* SurvivalFunction and EmpiricialDistribution *) Plot[SurvivalFunction[EmpiricalDistribution[data], x], {x, 0, 60}, Exclusions -> None] ...


2

You mean something like this? list = RandomVariate[BinomialDistribution[100, 0.1], {10000}]; You can use list to construct an EmpiricalDistribution, and then use DiscretePlot (if the list is all integers) or Plot (if it's reals) to plot the complement of its CDF. dist = EmpiricalDistribution[list]; DiscretePlot[1 - CDF[dist, x], {x, 0, 100}, PlotRange ...


2

E.g.: test = RandomInteger[100, 100]; ListLinePlot[With[{r = Reverse@Sort@Tally[test]}, Transpose[{Reverse@r[[All, 1]], Reverse@Accumulate@r[[All, 2]]}]]]


1

By default DistributionFitTest attempts to test fit against the family of normal distributions. To test if the data is standard normal (i.e. N(0,1)) you would use. DistributionFitTest[data, NormalDistribution[]] There are examples that show this to be the case in the Properties & Relations section of the documentation for DistributionFitTest.


5

There is actually a fair bit going on here that can make this confusing. The critical thing is the difference between testing fit to a family of distributions compared to testing fit to a particular distribution. Let me demonstrate. SeedRandom[23]; data = RandomVariate[NormalDistribution[1, 2], 100]; DistributionFitTest[data, NormalDistribution[mu, ...


1

Given: $X\sim Exponential(\lambda)$ and $Y\sim N(\mu,\sigma^2)$. Then, if $X$ and $Y$ are independent, the joint pdf of $(X,Y)$ is say $f(x,y)$: Let $Z = X + Y$. You seek the cdf of $Z$, i.e. $P(Z<z) = P(X+Y<z)$: All done. Here is a plot of the solution cdf given your parameter values (i.e. with $\lambda = 10$): Plot[cdf /. {λ -> 10, μ ...


1

There is nothing wrong with your code. Mathematica just fails to calculate the CDF. But you can always go by calculating the CDF explicitly (and numerically): cdf3N[y_?NumericQ] := NIntegrate[pdf3, {x, 0., y}, Method -> "LocalAdaptive"] Plot[cdf3N[x], {x, 0, 100}, Frame -> True, FrameLabel -> {"X", "CDF"}, PlotLabel -> "CDF of X ...



Top 50 recent answers are included