<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>non parametric test &#8211; paologironi blog</title>
	<atom:link href="https://www.gironi.it/blog/en/tag/non-parametric-test/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.gironi.it/blog</link>
	<description>Scattered notes on (retro) computing, data analysis, statistics, SEO, and things that change</description>
	<lastBuildDate>Thu, 17 Oct 2024 13:43:40 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Non-Parametric Tests: The Wilcoxon Test for Non-Normal Data</title>
		<link>https://www.gironi.it/blog/en/non-parametric-tests-the-wilcoxon-test-for-non-normal-data/</link>
					<comments>https://www.gironi.it/blog/en/non-parametric-tests-the-wilcoxon-test-for-non-normal-data/#respond</comments>
		
		<dc:creator><![CDATA[paolo]]></dc:creator>
		<pubDate>Mon, 02 Jan 2023 13:40:00 +0000</pubDate>
				<category><![CDATA[statistics]]></category>
		<category><![CDATA[non parametric test]]></category>
		<category><![CDATA[wilcoxon]]></category>
		<guid isPermaLink="false">https://www.gironi.it/blog/?p=3292</guid>

					<description><![CDATA[The Wilcoxon test is a non-parametric test used to compare two independent samples, or a sample with a known reference value. The test is used when the data do not follow a normal distribution, or when the distribution parameters are unknown. The Wilcoxon test involves ranking the data from both samples, and then assigning a &#8230; <a href="https://www.gironi.it/blog/en/non-parametric-tests-the-wilcoxon-test-for-non-normal-data/" class="more-link">Continue reading<span class="screen-reader-text"> "Non-Parametric Tests: The Wilcoxon Test for Non-Normal Data"</span></a>]]></description>
										<content:encoded><![CDATA[
<p>The <strong>Wilcoxon test</strong> is a <strong><a href="https://www.gironi.it/blog/test-statistici-parametrici-e-non-parametrici/" target="_blank" data-type="post" data-id="2306" rel="noreferrer noopener">non-parametric test</a></strong> used to compare two independent samples, or a sample with a known reference value. <br><strong>The test is used when the data do not follow a <a href="https://www.gironi.it/blog/la-distribuzione-normale/" target="_blank" data-type="post" data-id="916" rel="noreferrer noopener">normal distribution</a>, or when the distribution parameters are unknown.</strong></p>


<span id="more-3292"></span>


<p>The Wilcoxon test involves <strong>ranking the data from both samples</strong>, and then <strong>assigning a score to each value based on its position in the ranking</strong>. The scores are then summed for each sample, and the difference between the sum of scores of the two samples is compared to a known reference value, using the Wilcoxon distribution. <br>Based on the result of the comparison, one can decide whether to accept or reject the null hypothesis.</p>


<p>The Wilcoxon test is often used to compare the values of a continuous variable between two groups. There is also a version of the test called the Wilcoxon-Mann-Whitney test, which is used when comparing two groups with an ordinal or categorical variable.</p>


<h2 class="wp-block-heading">A Practical Example of the Wilcoxon Test in R</h2>


<p>In this example, I will generate sample data for two groups, <code>group1</code> and <code>group2</code>, using the <code>rnorm()</code> function to generate random numbers that follow a normal distribution with a mean of 100 and standard deviation of 15 for the first group, and a mean of 110 and standard deviation of 15 for the second group.</p>


<p>I use the wilcox.test() function to perform the Wilcoxon test, and specify the alternative hypothesis as &#8220;<em>two.sided</em>&#8221; to test whether the two groups have significantly different means.</p>


<p>The test results are printed on the screen and include the test statistic value, the p-value, and the test conclusion. Based on the p-value, one can decide whether to accept or reject the null hypothesis.</p>


<pre class="wp-block-preformatted"># Create sample data
set.seed(123)
group1 &lt;- rnorm(100, mean = 100, sd = 15)
group2 &lt;- rnorm(100, mean = 110, sd = 15)

# Perform the Wilcoxon test
wilcox_test &lt;- wilcox.test(group1, group2, alternative = "two.sided")

# Display the test results
print(wilcox_test)
</pre>


<p class="has-light-gray-background-color has-background">The most commonly used significance level is 5% or 0.05. This means that a threshold of 5% is established, above which the observed effect is considered random, and below which the observed effect is considered statistically significant. In other words, if the p-value obtained from the test is less than 0.05, the null hypothesis is rejected, and it is concluded that there is a significant difference between the samples.</p>


<p>It&#8217;s important to note that these threshold values are conventional and can be modified based on the specific needs of the study or the discipline in which one is working.</p>


<h2 class="wp-block-heading">Resources for Further Study</h2>


<ul class="wp-block-list">
<li><a href="https://www.datanovia.com/en/lessons/wilcoxon-test-in-r/" target="_blank" rel="noreferrer noopener">Wilcoxon Test in R &#8211; Datanovia</a></li>


<li><a href="https://www.investopedia.com/terms/w/wilcoxon-test.asp" target="_blank" rel="noreferrer noopener">Wilcoxon Test: Definition in Statistics, Types, and Calculation &#8211; Investopedia</a></li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.gironi.it/blog/en/non-parametric-tests-the-wilcoxon-test-for-non-normal-data/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
