Location Tests

Signed Rank Wilcoxon

Wilcoxon Signed Rank Test

Description

This is a nonparametric test for paired groups, i.e. does not assume normality in the data. Typically the t-Test is used for testing that the difference between population means for two paired samples are equal. But in cases where this assumption is violated, we can use the Wilcoxon Signed Rank Test. The test is based on analyzing the signs of the differences as well as the magnitude of the differences.

The test statistic is: T=i=1nsgn(Xi)RXi T = \sum_{i=1}^{n}sgn(X_{i})R|X_{i}| where RXi R|X_{i}| denotes the rank of Xi,,Xn |X_{i}|,…,|X_{n}| where the rankings are from low to high.

TailAlt. Hypothesis
leftleft\hspace{1cm}H1:θX<θY:H_{1}: \theta_{X} \lt \theta_{Y}: Distribution of YY shifted to the right wrt to XX
rightright\hspace{1cm}H1:θX>θY:H_{1}: \theta_{X} \gt \theta_{Y}: Distribution of YY shifted to the left wrt XX
bothboth\hspace{1cm}H1:θXθY:H_{1}: \theta_{X} \neq \theta_{Y}: Distribution of YY shifted in either direction wrt XX
Example

We consider the Charles Darwin’s Zea Mays dataset (easily available on the web).

Zea Mays Darwin

Select the region of data then go to Parietal -> LOC and set up a right-tailed test:

Signed Rank example 0a

Hit Probe to see the results without writing anything to the worksheet.

Signed Rank example 0b

Returns
  • p-value
  • decision
  • z-statistic

Reference: Hogg McKean Craig 8th


Sign Test

Sign Test

Description

The Sign Test is a nonparametric test which tests if the population means between two paired samples are equal. This is very much like the Wilcoxon Signed Rank Test but without the assumption of symmetric distribution of the differences around the median and without using the magnitude of the difference.

The sign statistic can be expressed as: S(θ0)=i=1nI(Xi>θ0) S(\theta_{0})=\sum_{i=1}^{n}I(X_{i}>\theta_{0})

TailAlt. Hypothesis
leftleft\hspace{1cm}H1:θX<θY: H_{1}: \theta_{X} \lt \theta_{Y}: Distribution of YY shifted to the right wrt to XX
rightright\hspace{1cm}H1:θX>θY: H_{1}: \theta_{X} \gt \theta_{Y}: Distribution of YY shifted to the left wrt XX
bothboth\hspace{1cm}H1:θXθY: H_{1}: \theta_{X} \neq \theta_{Y}: Distribution of YY shifted in either direction wrt XX
Example

We consider the Shoshoni rectangle dataset (easily available on the web) and the example 10.2.1 in Hogg McKean Craig 8th. The test the hypothesis: H0:θ=0.618 versus H1:θ0.618 H_{0}: \theta=0.618 \text{ versus } H_{1}: \theta \neq 0.618 . We add a column called median to test against our hypothesized median of 0.618.

Zea Mays Darwin

Select the region of data then go to Parietal -> LOC and set up a two-tailed test:

Signed Rank example 0a

Hit Probe to see the results without writing anything to the worksheet.

Signed Rank example 0b

Returns
  • p-value
  • decision
  • z-statistic

Reference: Hogg McKean Craig 8th


T-Test

T Test

Description

Paired t-Test: Determines if there is a significant difference in the means two paired groups.

Assumptions:

  • Paired groups
  • No significant outliers
  • Differences are normally distributed
TailAlt. Hypothesis
leftleft\hspace{1cm}H1:θX<θY: H_{1}: \theta_{X} \lt \theta_{Y}: Population mean of YY shifted to the right wrt to XX
rightright\hspace{1cm}H1:θX>θY: H_{1}: \theta_{X} \gt \theta_{Y}: Population mean of YY shifted to the left wrt XX
bothboth\hspace{1cm}H1:θXθY: H_{1}: \theta_{X} \neq \theta_{Y}: Population mean of YY shifted in either direction wrt XX
Returns
  • p-value
  • decision
  • t-statistic

Rank Sum Test

Rank Sum Test

Description

This is a nonparametric alternative to the two-sample t-Test. It is used to test if two groups are likely to derive from the same population. The measure for this is interpreted as comparing medians between the two groups.

TailAlt. Hypothesis
leftleft\hspace{1cm}H1:θX<θY: H_{1}: \theta_{X} \lt \theta_{Y}: Median of YY shifted to the right wrt to XX
rightright\hspace{1cm}H1:θX>θY: H_{1}: \theta_{X} \gt \theta_{Y}: Median of YY shifted to the left wrt XX
bothboth\hspace{1cm}H1:θXθY: H_{1}: \theta_{X} \neq \theta_{Y}: Median of YY shifted in either direction wrt XX
Returns
  • p-value
  • decision
  • t-statistic

Z-Test

Z Test

Description

This one-sample location test determines if the mean of X derives from a normal distribution with mean μ\mu and standard deviation σ\sigma.

TailAlt. Hypothesis
leftleft\hspace{1cm}H1:μX<μ: H_{1}: \mu_{X} \lt \mu: Mean of XX shifted to the left wrt to μ\mu
rightright\hspace{1cm}H1:μX>μ: H_{1}: \mu_{X} \gt \mu: Mean of XX shifted to the right wrt μ\mu
bothboth\hspace{1cm}H1:μXμ: H_{1}: \mu_{X} \neq \mu: Mean of XX shifted in either direction wrt μ\mu
Returns
  • p-value
  • decision
  • z-statistic

Reference: Hogg McKean Craig 8th