Midgley, Christopher - Pointless twaddle and meaningless diatribes
https://blogs.warwick.ac.uk/midgleyc
In which I post about whatever catches my fancy, and then give up and do nothing for several years, my last post a statement on how I have much to write about and will inevitably find the time...later.en-GB(C) 2021 Christopher Midgleyhttps://blogs.law.harvard.edu/tech/rssChristopher MidgleyChristopher MidgleyWarwick Blogs, University of Warwick, https://blogs.warwick.ac.uk120[citation needed]; the difficulty of finding things by Christopher Midgley
https://blogs.warwick.ac.uk/midgleyc/entry/citation_needed_the/
<p>Typing in “tower property” in Google, I find that the first result is the ever ubiquitous Wikipedia (whose mastery of <span class="caps">SEO</span> means it turns up, with an occasional irrelevant article, on whatever subject you could care to name) article on Expected Value, in this case. Actually typing in “tower property” returns the article on “law of total expectation” which is apparently the one of its myriad names that Wikipedia has decided is most common. Looking at the other results on Google, even adding a helpful “statistics”, I find that “tower property” doesn’t appear to return anything else relevant. In fact, the only other place I can find it called “tower property” is in my notes :)</p>
<p>For nameless results, I find my best bet is simply to type in the result itself. For example, that E[XY]=E[YE[X|Y]] is proven at the end of <a href="http://www.maths.qmul.ac.uk/~ig/MTH5118/Notes5-09.pdf">this pdf document, which is likely lecture notes.</a> If something has a lot of roots or powers, this is somewhat less applicable.</p>
<p>As of yet, I’ve not been able to find anything on what my notes refer to as “Fisher’s theorem”. It’s a theorem named after a famous mathematician who had many theorems named after him (some with others), so we’re already off the a bad start trying to find it. The theorem reads:</p>
<p>Let <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?X_i%7E%5Csim%7EN%28%5Cmu%2C%7E%5Csigma%5E2%29" alt="X_i \sim N(\mu, \sigma^2)" border="0" /> be indepedent random variables. Define <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%5Coverline%7BX%7D%3D%5Csum_%7Bi%3D1%7D%5En%7EX_i" alt="\overline{X}=\sum_{i=1}^n X_i" border="0" /> and <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?s%5E2%3D%5Cfrac%7B1%7D%7Bn-1%7D%5Csum_%7Bi%3D1%7D%5En%7E%28%5Coverline%7BX%7D_n-X_i%29%5E2" alt="s^2=\frac{1}{n-1}\sum_{i=1}^n (\overline{X}_n-X_i)^2" border="0" />. Then:<br />
*<img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%5Coverline%7BX%7D%7E%5Csim%7EN%28%5Cmu%2C%5Cfrac%7B%5Csigma%5E2%7D%7Bn%7D%29" alt="\overline{X} \sim N(\mu,\frac{\sigma^2}{n})" border="0" /><br />
*<img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%5Coverline%7BX%7D" alt="\overline{X}" border="0" /> and <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?s%5E2" alt="s^2" border="0" /> are independent.<br />
*<img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%5Cfrac%7B%28n-1%29s%5E2%7D%7B%5Csigma%5E2%7D%7E%5Csim%7E%5Cchi%5E2_%7Bn-1%7D" alt="\frac{(n-1)s^2}{\sigma^2} \sim \chi^2_{n-1}" border="0" /><br />
*<img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%5Cfrac%7B%5Coverline%7BX%7D-%5Cmu%7D%7B%5Csqrt%7Bs%5E2%2Fn%7D%7D%7E%5Csim%7Et_%7Bn-1%7D" alt="\frac{\overline{X}-\mu}{\sqrt{s^2/n}} \sim t_{n-1}" border="0" /></p>
<p>It looks like it has something to do with sample mean and variance, but I’m only taking the first module on this topic, so what its use is I can’t say.</p>MathsMathstatsStatsThu, 05 Jan 2012 16:34:48 GMTChristopher Midgleyhttps://blogs.warwick.ac.uk/midgleyc/entry/citation_needed_the/#comments094d73cd32a5e48a0134aeb9051a075e0Balls in boxes and other miscellaneous thoughts by Christopher Midgley
https://blogs.warwick.ac.uk/midgleyc/entry/balls_in_boxes/
<p>It is a reasonably common statement in probability that problems can be simplified down to spinners or balls in boxes. So:<br />
Let there be k balls that we wish to place in n boxes. If we can distinguish between the balls, then each ball can go in n different places, so the total is <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%5Ctextstyle%7En%5Ek" alt="\textstyle n^k" border="0" />. If we cannot distinguish between the balls, this is answered by the occupancy theorem: the multiset formula for n and k.</p>
<p>What, then, if it is the boxes we cannot distinguish between? If the balls also cannot be distinguished between, this is equivalent to partitioning k into at most n parts. <a href="http://oeis.org/A008639">The <span class="caps">OEIS</span> implies</a> that this has a closed-form solution: <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%5Ctextstyle%7E%5Cfrac%7B1%7D%7Bn%21%7D%7E%5Cfrac%7Bd%5En%5Cleft%28%7E%5Cfrac%7B1%7D%7B%5Cprod_%7Bi%3D1%7D%5Ek%281-x%5Ei%29%7D%7E%5Cright%29%7D%7Bdx%5En%7D%280%29" alt="\textstyle \frac{1}{n!} \frac{d^n\left( \frac{1}{\prod_{i=1}^k(1-x^i)} \right)}{dx^n}(0)" border="0" />, which is nice to know, even if it suggests there’s no ‘nice’ combinatorial solution.<br />
If we can distinguish between the balls but not the boxes, I believe this would come to a sum of Stirling numbers of the second kind: <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%5Csum_%7Bi%3D0%7D%5En%7E%5Cleft%5C%7B%5Cbegin%7Bmatrix%7D%7Ek%7E%5C%5C%7Ei%7E%5Cend%7Bmatrix%7D%5Cright%5C%7D" alt="\sum_{i=0}^n \left\{\begin{matrix} k \\ i \end{matrix}\right\}" border="0" />.</p>
<p>Other miscellany: Mario Micallef told us a few integration tricks this week: being able to cancel entire functions while integrating from 0 to 2pi (due to them containing sine), <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%5Ctextstyle%5Cint_0%5E%7B2%5Cpi%7Dsin%5E2%28x%29dx%3D%5Cpi" alt="\textstyle\int_0^{2\pi}sin^2(x)dx=\pi" border="0" /> by comparison with <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%5Ccos%5E2%28x%29" alt="\cos^2(x)" border="0" /> across the same interval. Massively time-saving tricks I’d never considered before. Great!</p>
<p>From combinatorics: wondered if there was a way to check transitivity of a relation expressed in matrix form quickly. Found nothing more than checking each row one step at a time, but I least I can do that fairly quickly now.</p>MathsMiscellanyStatsSun, 30 Oct 2011 18:41:26 GMTChristopher Midgleyhttps://blogs.warwick.ac.uk/midgleyc/entry/balls_in_boxes/#comments094d73cd32a5e48a01335622e3bf75f10Mathematical Statistics A - Example Sheet 1 by Christopher Midgley
https://blogs.warwick.ac.uk/midgleyc/entry/mathematical_statistics_a/
<p>Thought I may as well put answers to the A & C sections here, for simple-ish reflection. And to notice when I can’t recall how to do things, at all.</p>
<span class="caps">QA1</span>: We compute the cumulative distribution function by integrating the density function:<br />
<img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%0A%5Cbegin%7Balign*%7D%0AF_x%7E%26%3D%7E%5Cint_%7B-%5Cinfty%7D%5Ex%7Ef_x%28s%29ds%5C%5C%0A%26%3D%5Cint_0%5Ex%7Ee%5E%7B-s%7Dds%5C%5C%0A%26%3D%5Cleft.%7E-e%5E%7B-s%7D%5Cright%7C_0%5Ex%5C%5C%0A%26%3D%7E1%7E-%7Ee%5E%7B-x%7D%0A%5Cend%7Balign*%7D%0A" alt=" \begin{align*} F_x &= \int_{-\infty}^x f_x(s)ds\\ &=\int_0^x e^{-s}ds\\ &=\left. -e^{-s}\right|_0^x\\ &= 1 - e^{-x} \end{align*} " border="0" /><br />
We argue Y is discrete because…it takes a finite number of possible values? It’s a step function? I’m not sure. Its support is {0,2} (I hope), pmf and cdf are:<br />
<img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%0Af_Y%28y%29%7E%3D%5Cleft%7B%7E%7B1-%5Cfrac%7B1%7D%7Be%7D%7D%7E%5Cquad%7E%28y%3D0%29%7E%5C%5C%5Cfrac%7B1%7D%7Be%7D%7E%5Cquad%5Cquad%7E%28y%3D2%29%5C%5C0%7E%5Cquad%5Cquad%7E%28y%7E%5Cnotin%7E%5C%7B0%2C%7E2%5C%7D%29%7E%5Cright.%0A" alt=" f_Y(y) =\left{ {1-\frac{1}{e}} \quad (y=0) \\\frac{1}{e} \quad\quad (y=2)\\0 \quad\quad (y \notin \{0, 2\}) \right. " border="0" /><br />
<img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%0AF_Y%28y%29%7E%3D%5Cleft%7B%7E0%7E%5Cquad%5Cquad%7E%28y%3C0%29%7E%5C%5C%5C1-%5Cfrac%7B1%7D%7Be%7D%7E%5Cquad%7E%280%5Cleq%7Ey%3C2%29%5C%5C1%7E%5Cquad%5Cquad%7E%28y%7E%5Cgeq%7E2%29%7E%5Cright.%0A" alt=" F_Y(y) =\left{ 0 \quad\quad (y<0) \\\1-\frac{1}{e} \quad (0\leq y<2)\\1 \quad\quad (y \geq 2) \right. " border="0" /><br />
<span class="caps">QA2</span> is simple infinite sum fiddling combined with the identity for <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?e%5Ek" alt="e^k" border="0" />.
<p><span class="caps">QC5</span>:<br />
<img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?%0AY%7E%3D%7Eg%28X%29%5C%5C%0AF_Y%28y%29%7E%3D%7E%28g%28X%29%7E%5Cleq%7Ey%29%5C%5C%0A%5Cbegin%7Balign*%7D%0AF_Y%28y%29%7E%26%3D%7E%28X%7E%5Cleq%7Eg%5E%7B-1%7D%28y%29%29%5C%5C%0A%26%3DF_X%28g%5E%7B-1%7D%28y%29%29%0A%5Cend%7Balign*%7D%0A%5C%5C%0A%5Cbegin%7Balign*%7D%0Af_y%28y%29%26%3Df_x%28g%5E%7B-1%7D%28y%29%29%5Ctimes%28g%5E%7B-1%7D%28y%29%29%27%5C%5C%0A%26%3D%7E%5Cfrac%7Bf_x%28g%5E%7B-1%7D%28y%29%29%7D%7Bg%27%28g%5E%7B-1%7D%28y%29%29%7D%0A%5Cend%7Balign*%7D%0A" alt=" Y = g(X)\\ F_Y(y) = (g(X) \leq y)\\ \begin{align*} F_Y(y) &= (X \leq g^{-1}(y))\\ &=F_X(g^{-1}(y)) \end{align*} \\ \begin{align*} f_y(y)&=f_x(g^{-1}(y))\times(g^{-1}(y))'\\ &= \frac{f_x(g^{-1}(y))}{g'(g^{-1}(y))} \end{align*} " border="0" /><br />
By the inverse function theorem (differentiation). Y is continuous as the functions that make up Y are continuous – additionally, as g is an increasing bijection it is continuous and differentiable, and its derivative is always positive, so the pdf of Y is not undefined (g’ always nonzero).</p>
<p>For the last part, simply plug in g(X) = aX + b to what you’ve already worked out, and find Y is the Gaussian (given X is the standard Gaussian).</p>
<p><span class="caps">QC6</span>:<br />
Find the mgf of the exponential in the normal way; use the same trick as Q4 to find the mgf of <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?S_n" alt="S_n" border="0" />. Find the mgf of <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?S_n" alt="S_n" border="0" /> using the pdf; as they are equal use uniqueness to conclude the distribution is correct.</p>
<p>Integrate <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?F_%7BS_n%7D" alt="F_{S_n}" border="0" /> from t to infinity; receive sum from 0 to n. Observe that as the number of photons detected must be an integer, <img class="latex" src="http://blogs.warwick.ac.uk/cgi-bin/mimetex.cgi?P%28N%3Dk%29%3DP%28N%3Ck%2B1%29-P%28N%3Ck%29" alt="P(N=k)=P(N<k+1)-P(N<k)" border="0" />. Plug in your previously calculated values for the answer.</p>MathsMathstatsStatsSun, 09 Oct 2011 17:52:04 GMTChristopher Midgleyhttps://blogs.warwick.ac.uk/midgleyc/entry/mathematical_statistics_a/#comments094d73cd32a5e48a0132e9d023b62f070