Tag Info

New answers tagged

4

Statistics`Library` does not correspond directly to a package path, so it cannot be loaded with Get or Needs. Rather, this contents of this context come from FileNameJoin[{ $InstallationDirectory, "SystemFiles", "Kernel", "SystemResources", $OperatingSystem, "Statistics", "Library.mx" }] which is loaded automatically at startup. Loading this file ...


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



Top 50 recent answers are included