LocationEquivalenceTest

LocationEquivalenceTest[{data1,data2,}]
tests whether the means or medians of the are equal.

LocationEquivalenceTest[{data1,},"property"]
returns the value of .

Details and OptionsDetails and Options

  • LocationEquivalenceTest performs a hypothesis test on the with null hypothesis that the true location parameters of the populations are equal , and alternative hypothesis that at least one is different.
  • By default a probability value or -value is returned.
  • A small -value suggests that it is unlikely that is true.
  • The must be univariate .
  • LocationEquivalenceTest[{data1,}] will choose the most powerful test that applies to the data.
  • LocationEquivalenceTest[{data1,},All] will choose all tests that apply to the data.
  • LocationEquivalenceTest[{data1,},"test"] reports the -value according to .
  • Mean-based tests assume that the are normally distributed. The median-based KruskalWallis test assumes that are symmetric about a common median. The complete block and Friedman rank tests assume that the data is in randomized complete blocks. All of the tests require the to have equal variances.
  • The following tests can be used:
  • "CompleteBlockF"normality, blockedmean test for complete block design
    "FriedmanRank"blockedmedian test for complete block design
    "KruskalWallis"symmetrymedian test for two or more samples
    "KSampleT"normalitymean test for two or more samples
  • The complete block -test effectively performs one-way analysis of variance for randomized complete block design.
  • The Friedman rank test ranks observations across rows and sums the ranks along columns in the data to arrive at the test statistic. The statistic is corrected for ties.
  • The KruskalWallis test effectively performs a one-way analysis of variance on the ranks of the data. The test statistic is corrected for ties.
  • The -sample -test is equivalent to a one-way analysis of variance of the data.
  • LocationEquivalenceTest[{data1,},"HypothesisTestData"] returns a HypothesisTestData object htd that can be used to extract additional test results and properties using the form htd["property"].
  • LocationEquivalenceTest[{data1,},"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 given:
  • MethodAutomaticthe method to use for computing -values
    SignificanceLevel0.05cutoff for diagnostics and reporting
    VerifyTestAssumptionsAutomaticwhat assumptions to verify
  • 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 LocationEquivalenceTest include:
  • "Normality"verify that all data is normally distributed
    "EqualVariance"verify that the have equal variances
    "Symmetry"verify symmetry about a common median

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Test whether the means or medians from two or more populations are all equivalent:

In[1]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=

Create a HypothesisTestData object for repeated property extraction:

In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]=

The complete block test can be used to test for mean differences with complete block design:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

There is a significant difference among the means at the level:

In[4]:=
Click for copyable input
Out[4]=

Use the Friedman rank test to test for differences in medians with complete block design:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

It appears that at least one median differs significantly from the others:

In[4]:=
Click for copyable input
Out[4]=
Introduced in 2010
(8.0)