Dataplot Vol 2 Vol 1

# UNIFORM CHISQUARE

Name:
UNIFORM CHISQUARE (LET)
Type:
Let Subcommand
Purpose:
Given a vector of counts, compute the difference from uniformity based on the chi-square statistic.
Description:
In spatial analysis, it is sometimes desired to determine if the points in the given space are consistent with a uniform distribution. Given a set of N counts, Xi, one such measure is based on the chi-square statistic which is defined as

$$\chi^{2} = \sum_{i=1}^{k}{\frac{(X_{i} - \mbox{EXP})^2} {\mbox{EXP}}}$$

where

$$\mbox{EXP} = \frac{\sum_{i=1}^{k}{X_{i}}} {k}$$
Syntax:
LET <a> = UNIFORM CHISQUARE <y>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the response variable;
<a> is a parameter where the computed statistic is saved;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
LET A = UNIFORM CHISQUARE Y1
LET A = UNIFORM CHISQUARE Y1 SUBSET TAG > 2
Note:
Dataplot statistics can be used in a number of commands. For details, enter

Default:
None
Synonyms:
UNIFORM CHI SQUARE
Related Commands:
 VARIATIONAL DISTANCE = Compute the variational distance of a variable containing a set of counts. RELATIVE DISPERSION INDEX = Compute the relative dispersion index of a variable containing a set of counts. GOODNESS OF FIT = Perform a goodness of fit test.
Reference:
Kashiwagi, Fagan, Douglas, Yamamoto, Heckert, Leigh, Obrzut, Du, Lin-Gibson, Mu, Winey, Haggennueller (2007), "Relationship between dispersion metric and properties of PMMA/SWNT nanocomposites", Polymer Journal, Vol. 48, pp. 4855 - 4866.
Applications:
Spatial Statistics
Implementation Date:
2014/3
Program:

LET Y  = UNIFORM RANDOM NUMBERS FOR I = 1 1 1000
LET Y1 X1 = BINNED Y
LET Y  = NORMAL RANDOM NUMBERS FOR I = 1 1 1000
LET Y2 X2 = BINNED Y
LET Y  = EXPONENTIAL RANDOM NUMBERS FOR I = 1 1 1000
LET Y3 X3 = BINNED Y
LET A1 = UNIFORM CHISQUARE Y1
LET A2 = UNIFORM CHISQUARE Y2
LET A3 = UNIFORM CHISQUARE Y3
SET WRITE DECIMALS 4
PRINT A1 A2 A3

The following output is generated.
 PARAMETERS AND CONSTANTS--

A1      --        32.1920
A2      --       793.6520
A3      --      1691.2492


NIST is an agency of the U.S. Commerce Department.

Date created: 06/23/2014
Last updated: 06/23/2014