BUILT-IN WOLFRAM LANGUAGE SYMBOL
tests whether the mean or median of the data is zero.
tests whether the means or medians of and are equal.
- LocationTest performs a hypothesis test on data with null hypothesis that the true population location parameter is some value , and alternative hypothesis that .
- Given and , LocationTest tests that against that .
- By default a probability value or -value is returned.
- A small -value suggests that it is unlikely that is true.
- The data in dspec can be univariate or multivariate .
- The argument can be a real number or a real vector with length equal to the dimension of the data.
- LocationTest[dspec] will choose the most powerful test that applies to dspec.
- LocationTest[dspec,Automatic] is equivalent to .
- LocationTest[dspec,μ0,All] will choose all tests that apply to dspec.
- LocationTest[dspec,μ0,"test"] reports the -value according to .
- Tests based on means assume the data in dspec is normally distributed. Some tests assume the data is symmetric about a common median. Tests that do not assume symmetry or normality are classified as robust.
- A paired sample test assumes equal-length dependent data.
- The following tests can be used:
|"PairedT"||normality||paired sample test with unknown variance|
|"PairedZ"||normality||paired sample test with known variance|
|"Sign"||robust||median test for one sample or matched pairs|
|"SignedRank"||symmetry||median test for one sample or matched pairs|
|"T"||normality||mean test for one or two samples|
|"MannWhitney"||symmetry||median test for two independent samples|
|"Z"||normality||mean test with known variance|
- The test performs Student -test for univariate data and Hotelling's test for multivariate data.
- The test performs a -test assuming the sample variance is the known variance for univariate data and Hotelling's test assuming the sample covariance is the known covariance for multivariate data.
- The and tests perform and tests on the paired differences of two datasets. A single dataset is treated as a list of differences.
- LocationTest[dspec,μ0,"HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
- LocationTest[dspec,μ0,"property"] can be used to directly give the value of .
- Properties related to the reporting of test results include:
|"AllTests"||list of all applicable tests|
|"AutomaticTest"||test chosen if Automatic is used|
|"DegreesOfFreedom"||the degrees of freedom used in a test|
|"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:
- For tests of location, a cutoff is chosen such that is rejected only if . The value of used for the and properties is controlled by the SignificanceLevel option. This value is also used in diagnostic tests of assumptions including tests for normality, equal variance, and symmetry. By default is set to .
- Named settings for VerifyTestAssumptions in LocationTest include:
|"EqualVariance"||verify that and have equal variance|
|"Normality"||verify that all data is normally distributed|
|"Symmetry"||verify symmetry about a common median|