<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Statistics on davethehuman.com</title><link>https://davethehuman.com/tags/statistics/</link><description>Recent content in Statistics on davethehuman.com</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 Dave the human</copyright><lastBuildDate>Tue, 13 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://davethehuman.com/tags/statistics/index.xml" rel="self" type="application/rss+xml"/><item><title>gini index</title><link>https://davethehuman.com/notes/gini-index/</link><pubDate>Tue, 13 Oct 2026 00:00:00 +0000</pubDate><guid>https://davethehuman.com/notes/gini-index/</guid><description>&lt;p&gt;&lt;em&gt;Gini Index&lt;/em&gt; or &lt;em&gt;Gini Impurity&lt;/em&gt; is a &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;metric&lt;/a&gt; used to measure the frequency with which a randomly chosen element from a dataset would be incorrectly labeled if it were randomly labeled according to the distribution of labels in the subset.&lt;/p&gt;
&lt;p&gt;In Machine Learning, it is primarily used as a splitting criterion by the algorithm to build &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;decision trees&lt;/a&gt;.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Formula
 &lt;div id="formula" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#formula" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The Formula For a dataset with $C$ total classes, where $p_i$ is the probability of an item belonging to class $i$: &lt;/p&gt;</description></item><item><title>variance (statistics)</title><link>https://davethehuman.com/notes/variance-statistics/</link><pubDate>Tue, 13 Oct 2026 00:00:00 +0000</pubDate><guid>https://davethehuman.com/notes/variance-statistics/</guid><description>&lt;p&gt;In statistics, &lt;em&gt;Variance&lt;/em&gt; measures data dispersion around a &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;mean&lt;/a&gt;.&lt;br&gt;
It is a descriptive statistical measure that quantifies how far individual data points deviate from the mean of a dataset.&lt;/p&gt;
&lt;p&gt;Depending on the fact that the dataset represent a full &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;population&lt;/a&gt; or a &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;sample&lt;/a&gt;, the formula is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;$\sigma^2 = \frac{\sum_{i=1}^{N} (x_i - \mu)^2}{N}$ for the &lt;strong&gt;entire population&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;$s^2 = \frac{\sum_{i=1}^{n} (x_i - \bar{x})^2}{n - 1}$ for a &lt;strong&gt;sample&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In numpy, it can be implemented as:&lt;/p&gt;</description></item><item><title>entropy</title><link>https://davethehuman.com/notes/entropy/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://davethehuman.com/notes/entropy/</guid><description>&lt;p&gt;&lt;em&gt;Entropy&lt;/em&gt; is a statistics concept used to measure &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;disorder&lt;/a&gt; in a sample.&lt;br&gt;
It is applied to calculate the &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;information gain&lt;/a&gt; of a &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;decision tree&lt;/a&gt;&amp;rsquo;s split through &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;node impurity&lt;/a&gt;, and can be described with the formula:&lt;/p&gt;
$$
E = -\sum_{i=1}^{n} P(X) \log_2 P(X)
$$&lt;p&gt;
In a decision tree&amp;rsquo;s &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;node&lt;/a&gt;, $P(X)$ is the number of times a given class has occurred in the node divided by the number of total examples $n$ in the node.&lt;br&gt;
It is basically the probability of encountering that class in the node&amp;rsquo;s sample. &lt;/p&gt;</description></item><item><title>bias</title><link>https://davethehuman.com/notes/bias/</link><pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate><guid>https://davethehuman.com/notes/bias/</guid><description>&lt;p&gt;In statistics and machine learning, &lt;em&gt;Bias&lt;/em&gt; refers to the error coming from &lt;strong&gt;model oversimplification&lt;/strong&gt; and leading to &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;underfitting&lt;/a&gt;.&lt;br&gt;
A model with high bias is not able to capture the true complexity of the data, leading to poor performance on both &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;training set&lt;/a&gt; and &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;test set&lt;/a&gt;.&lt;br&gt;
The bias is represented by the difference between the expected or true value of the target variable and the predicted value of the model.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="auto"
 alt="bias"
 width="2000"
 height="1400"
 src="https://davethehuman.com/attachments/bias_hu_a002ee24658b6e18.png"
 srcset="https://davethehuman.com/attachments/bias_hu_a002ee24658b6e18.png 800w, https://davethehuman.com/attachments/bias_hu_139faac16c42beef.png 1280w"
 sizes="(min-width: 768px) 50vw, 65vw"
 data-zoom-src="https://davethehuman.com/attachments/bias.png"&gt;&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>bias-variance trade-off</title><link>https://davethehuman.com/notes/bias-variance-trade-off/</link><pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate><guid>https://davethehuman.com/notes/bias-variance-trade-off/</guid><description>&lt;p&gt;The &lt;em&gt;bias-variance trade-off&lt;/em&gt; describes the balance between learning the undelying pattern and being too sensitive to the particular training sample:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A model with &lt;strong&gt;high &lt;a href="https://davethehuman.com/notes/bias/"&gt;bias&lt;/a&gt;&lt;/strong&gt; is &lt;strong&gt;too simple&lt;/strong&gt;, makes &lt;strong&gt;too restrictive assumptions&lt;/strong&gt;, and consequently makes systematic errors; for example, a straight line cannot fully capture a curved relationship. This is associated with &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;underfitting&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;A model with &lt;strong&gt;high &lt;a href="https://davethehuman.com/notes/variance-ml/"&gt;variance (ML)&lt;/a&gt;&lt;/strong&gt; is &lt;strong&gt;too complex&lt;/strong&gt; and sensitive to the examples it sees. It may follow random fluctuations in the training data and perform poorly on new examples. This is associated with &lt;a href="https://davethehuman.com/coming-soon/" rel="nofollow"&gt;overfitting&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="auto"
 alt="bias-variance trade-off"
 width="2000"
 height="1400"
 src="https://davethehuman.com/attachments/bias-variance-tradeoff_hu_583c2a944d8f9669.png"
 srcset="https://davethehuman.com/attachments/bias-variance-tradeoff_hu_583c2a944d8f9669.png 800w, https://davethehuman.com/attachments/bias-variance-tradeoff_hu_95956af941219322.png 1280w"
 sizes="(min-width: 768px) 50vw, 65vw"
 data-zoom-src="https://davethehuman.com/attachments/bias-variance-tradeoff.png"&gt;&lt;/figure&gt;
&lt;/p&gt;</description></item></channel></rss>