PointProcessFitTest[pdata]
tests whether the point collection pdata could be modeled by a Poisson point process.
PointProcessFitTest[pdata,pproc]
tests whether the point collection could be modeled by the point process pproc.
PointProcessFitTest[pdata,pproc,"property"]
returns the value of "property".
PointProcessFitTest
PointProcessFitTest[pdata]
tests whether the point collection pdata could be modeled by a Poisson point process.
PointProcessFitTest[pdata,pproc]
tests whether the point collection could be modeled by the point process pproc.
PointProcessFitTest[pdata,pproc,"property"]
returns the value of "property".
Details and Options
- PointProcessFitTest performs a goodness-of-fit hypothesis test with null hypothesis
that pdata was drawn from a point process pproc and alternative hypothesis
that it was not. - By default, a probability value or
-value is returned. - A small
-value suggests that it is unlikely that pdata comes from a pproc. - The point data pdata can have the following forms:
-
{p1,p2,…} points pi GeoPosition[…],GeoPositionXYZ[…],… geographic points SpatialPointData[…] spatial point collection {pts,reg} point collection pts and observation region reg - If the observation region reg is not given, a region is automatically computed using RipleyRassonRegion.
- Under the null hypothesis
, the points in pdata were drawn from pproc. In particular, this means they should have the same BesagL function. - The following tests can used:
-
"BesagL" computes BesagL on simulations of pproc and pdata "ChiSquare" based on binning, where standard bin count residuals are expected to be chi-square distributed, fast and approximate "ModifiedChiSquare" based on binning, where counts are expected to be multinomially distributed, exact for small samples, using "ChiSquare" for large data - PointProcessFitTest[data,proc,"HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
- PointProcessFitTest[data,pproc,"property"] can be used to directly give the value of "property".
- Properties related to the reporting of test results include:
-
"AllTests" list of all applicable tests "AutomaticTest" test chosen if Automatic is used "PValue" list of
-values"PValueTable" formatted table of
-values"ShortTestConclusion" a short description of the conclusion of a test "TestConclusion" a description of the conclusion of a test "TestData" list of pairs of test statistics and
-values"TestDataTable" formatted table of
-values and test statistics"TestStatistic" list of test statistics "TestStatisticTable" formatted table of test statistics - The following options can be used:
-
SignificanceLevel 0.05 cutoff for diagnostics and reporting Method Automatic BesagL method takes suboptions
Examples
open all close allBasic Examples (2)
Uniform point distribution on a disk:
proc = PoissonPointProcess[20, 2];
data = RandomPointConfiguration[proc, Disk[]];ListPlot[data]The data came from a point process with homogeneous intensity:
PointProcessFitTest[data, proc, "TestConclusion"]Points distributed over a geographical region:
reg = Entity["Country", "Poland"];pts = RandomPointConfiguration[PoissonPointProcess[Quantity[.005, 1 / "Kilometers" ^ 2], 2], reg]Estimated PoissonPointProcess:
proc = EstimatedPointProcess[pts, PoissonPointProcess[λ, 2]]PointProcessFitTest[pts, proc, "ChiSquare"]Scope (10)
Testing (7)
spd1 = RandomPointConfiguration[PoissonPointProcess[100, 2], Disk[]];
spd2 = RandomPointConfiguration[ThomasPointProcess[10, 30, .05, 2], Disk[]];ListPlot[#, AspectRatio -> 1]& /@ {spd1, spd2}The
-values are typically large when points are uniformly distributed:
PointProcessFitTest[spd1, PoissonPointProcess[100, 2]]The
-values are typically small when there is spatial heterogeneity:
PointProcessFitTest[spd2, PoissonPointProcess[100, 2]]Perform a particular test for spatial randomness:
proc = MaternPointProcess[5, 10, .5, 2];data = RandomPointConfiguration[proc, Disk[]];PointProcessFitTest[data, proc, "ChiSquare"]Using Automatic applies the "BesagL" test:
proc = PoissonPointProcess[130, 2];data = RandomPointConfiguration[proc, Disk[]];PointProcessFitTest[data, proc, Automatic]The property "AutomaticTest" can be used to determine which test was chosen:
PointProcessFitTest[data, proc, "AutomaticTest"]Perform all tests appropriate to the data simultaneously:
proc = PoissonPointProcess[10, 2];
data = RandomPointConfiguration[proc, Disk[]];PointProcessFitTest[data, proc, All]Use the property "AllTests" to see which tests are available:
PointProcessFitTest[data, proc, "AllTests"]Create a HypothesisTestData object for repeated property extraction:
data = RandomPointConfiguration[PoissonPointProcess[30, 2], Disk[]];ℋ = PointProcessFitTest[data, Automatic, "HypothesisTestData"]The properties available for extraction:
ℋ["Properties"]Extract some properties from the HypothesisTestData object:
proc = PoissonPointProcess[130, 2];data = RandomPointConfiguration[proc, Disk[]];ℋ = PointProcessFitTest[data, proc, "HypothesisTestData"];The
-value and test statistic from the "BesagL" test:
ℋ["PValue", "BesagL"]ℋ["TestStatistic", "BesagL"]Extract any number of properties simultaneously:
proc = PoissonPointProcess[130, 2];data = RandomPointConfiguration[proc, Disk[]];ℋ = PointProcessFitTest[data, proc, "HypothesisTestData"];The
-value and test statistic from a "BesagL" test:
ℋ[{"PValue", "BesagL"}, {"TestStatistic", "BesagL"}]Reporting (3)
Tabulate the results from a selection of tests:
proc = PoissonPointProcess[10, 2];
data = RandomPointConfiguration[proc, Disk[]];ℋ = PointProcessFitTest[data, proc, "HypothesisTestData"];A full table of all appropriate test results:
ℋ["TestDataTable", All]A table of selected test results:
ℋ["TestDataTable", "BesagL"]Retrieve the entries from a test table for customized reporting:
proc = PoissonPointProcess[8, 2];
data = RandomPointConfiguration[proc, Disk[]];ℋ = PointProcessFitTest[data, proc, "HypothesisTestData"];res = ℋ["TestData", All];tests = ℋ["AllTests"]The
-values are above 0.05, so there is not enough evidence to reject
at that level:
Show[BarChart[res[[All, 2]], ChartLabels -> Placed[tests, Center], BarOrigin -> Left], Graphics[Line[{{.05, 0}, {.05, Length[tests] + 1}}]]]Tabulate
-values for a test or group of tests:
proc = PoissonPointProcess[10, 2];
data = RandomPointConfiguration[proc, Disk[]];ℋ = PointProcessFitTest[data, proc, "HypothesisTestData"];ℋ["PValueTable", "BesagL"]ℋ["PValue", "BesagL"]A table of
-values from all appropriate tests:
ℋ["PValueTable", All]Options (2)
SignificanceLevel (1)
The significance level is used for "TestConclusion" and "ShortTestConclusion":
SeedRandom["J23"];
proc = ThomasPointProcess[20, 13, .23, 2];
data = RandomPointConfiguration[proc, Disk[]];ℋ1 = PointProcessFitTest[data, proc, "HypothesisTestData", SignificanceLevel -> .001];ℋ2 = PointProcessFitTest[data, proc, "HypothesisTestData", SignificanceLevel -> .005];The test conclusions may differ:
{ℋ1["ShortTestConclusion", "ChiSquare"], ℋ2["ShortTestConclusion", "ChiSquare"]}ℋ1["TestConclusion", "ChiSquare"]ℋ2["TestConclusion", "ChiSquare"]MaxIterations (1)
You can control the number of simulations with suboption MaxIterations:
SeedRandom[1];data = RandomPointConfiguration[ThomasPointProcess[30, 20, .05, 2], Disk[]];PointProcessFitTest[data, PoissonPointProcess[50, 2], Method -> {Automatic, MaxIterations -> 100}]PointProcessFitTest[data, PoissonPointProcess[50, 2], Method -> {Automatic, MaxIterations -> 500}]Properties & Relations (1)
PointProcessFitTest can be used to test equivalence of complete spatial randomness:
data = RandomPointConfiguration[BinomialPointProcess[35, Disk[]], Disk[]];PointProcessFitTest[data, Automatic, "TestConclusion"]SpatialRandomnessTest has built-in, more specific tests:
SpatialRandomnessTest[data, {"TestConclusion", All}]//ColumnSpatialRandomnessTest[data, "AllTests"]Neat Examples (1)
Distribution of the "ChiSquare" test statistic under a null hypothesis:
proc = PoissonPointProcess[10, 2];
sample = Table[data = RandomPointConfiguration[proc, Disk[]];PointProcessFitTest[data, proc, "ChiSquare"], {500}];SmoothHistogram[sample, Automatic, PDF]Related Guides
History
Text
Wolfram Research (2020), PointProcessFitTest, Wolfram Language function, https://reference.wolfram.com/language/ref/PointProcessFitTest.html.
CMS
Wolfram Language. 2020. "PointProcessFitTest." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PointProcessFitTest.html.
APA
Wolfram Language. (2020). PointProcessFitTest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PointProcessFitTest.html
BibTeX
@misc{reference.wolfram_2026_pointprocessfittest, author="Wolfram Research", title="{PointProcessFitTest}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/PointProcessFitTest.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_pointprocessfittest, organization={Wolfram Research}, title={PointProcessFitTest}, year={2020}, url={https://reference.wolfram.com/language/ref/PointProcessFitTest.html}, note=[Accessed: 12-June-2026]}