Clearly, when computing the mood score associated with a given year, each $c_{i}$ in the numerator may be conceived of as Binomial($m$, $p_{i}$), where $m$ is the total number of words in the year, $p_{i}$ is the probability that a randomly chosen word is the one associated with $c_{i}$ and is therefore approximately Gaussian provided $m$ is sufficiently large. By the same reasoning, $C_{the}$ in the denominator is also approximately Gaussian. Additionally, all the $c_{i}$ in the numerator may be "collapsed" into one Gaussian since the sum of Gaussians is again Gaussian. No confusion so far. But then the mood score divides the Gaussian in the numerator by the Gaussian in the denominator. This begs the question, is the ratio of two Gaussians Gaussian? But according to Wikipedia the distribution of the ratio of Gaussians is not Gaussian but Cauchy! And if the mood score is Cauchy, then applying any linear transformation to it, including the one associated with the standardization of a Gaussian, would result in another Cauchy distribution. Thus, interpreting the z-score as standard Gaussian would be a mistake. But frankly, I'm probably missing something, so I figured it would be interesting to generate mood scores and test whether their distribution is Gaussian or Cauchy.
To test the distribution of mood scores I set $n=5$ where the words used were: scared, terrified, whimper, fear and worried. To set the parameters I used the percentage of times these words occurred in English Fiction in the year 2000 from Google's Ngram Viewer.
$\begin{array}{|c | c|}
\hline
word & percentage & probability \\
\hline
the & 4.00 & 0.0400 \\
scared & 0.00422 & 0.0000422 \\
terrified & 0.00188 & 0.0000188 \\
whimper & 0.000271 & 0.00000271 \\
fear & 0.0133 & 0.000133 \\
worried & 0.00602 & 0.0000602 \\
\hline
\end{array}$
Since the probability that a randomly chosen word would be whimper was so small, I chose $m=10,000,000$ so that the expectation of the number of words whimper would be $E(c_{whimper})\approx 27$. The results of generating one thousand mood scores, fitting a Cauchy and a Gaussian distribution to them and testing their goodness of fit using the Kolmogorov-Smirnov test are shown below.
Wondering what it was that I had misunderstood I went back to the Wikipedia article that I had consulted when trying to determine whether the ratio of two Gaussians is Gaussian and found what is probably the source of my error "The random variable associated with this distribution [Cauchy] comes about as the ratio of two Gaussian (normal) distributed variables with zero mean." While the mean of the mood scores is close to zero, it certainly is not, moreover, by the definition of mood score it is effectively impossible for the mean of the mood scores to be zero. Later I will test that.
The astronomical winner is Gauss!

No comments:
Post a Comment