tag:blogger.com,1999:blog-264226589944705290.post8174267962011336323..comments2022-05-19T07:55:48.367-07:00Comments on God Plays Dice: Three beautiful quicksortsMichael Lugohttp://www.blogger.com/profile/15671307315028242949noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-264226589944705290.post-3312783393675047522008-07-12T22:06:00.000-07:002008-07-12T22:06:00.000-07:00Dan,Moments are a generalization of computing the ...Dan,<BR/><BR/>Moments are a generalization of computing the mean of a distribution. Normally, you compute the mean of a function f(x) by summing/integrating over xf(x). For the rest of this, I'm going to talk about summing, with sum(xf(x)) for computing the mean. This can be generalized to integral(xf(x) dx) trivially, but it's bulkier for what's below.<BR/><BR/>One of two main generalizations used are the "moments around c", which changes the formula from sum(xf(x)) to sum((x-c)f(x)). For the mean, this isn't interesting, because sum((x-c)f(x)) = sum(xf(x))-sum(cf(x)) = mean - c*sum(f(x)) = mean - c (for a distribution, sum(f(x)) = 1), so it just shifts the mean over by c.<BR/><BR/>Often, this generalization is then made more specific, and c is taken to be the mean, and the resulting moments are called "central moments".<BR/><BR/>The other common generalization is to take the part multiplied by the distribution and raise it to an integral power n. So the first centralized moment is sum((x-mean)*f(x)) = 0; the second centralized moment is sum((x-mean)^2 f(x)), the third is sum((x-mean)^3 f(x)), etc.<BR/><BR/>The 2nd, 3rd, and 4th centralized moments of a distribution have names: the "variance", the "skew", and the "kurtosis", and are used in analyzing distributions. The square root of the 2nd centralized moment is the "standard deviation".<BR/><BR/>One further variant of the moment is the "normalized nth moment", which replaces sum(x^n f(x)) with sum(((x-mean)/stDev)^n f(x)). This takes a lot of the variation out of the picture and makes it easier to compare distributions to normal distributions: Any normal distribution will have a normalized 1st moment (mean) of 0, a normalized 2nd moment (variance) of 1, a normalized 3rd moment (skew) of 0, and a normalized 4th moment (kurtosis) of 3, etc.Buddha Buckhttps://www.blogger.com/profile/17167036913705912859noreply@blogger.comtag:blogger.com,1999:blog-264226589944705290.post-68176042010155006262008-07-11T17:39:00.000-07:002008-07-11T17:39:00.000-07:00I agree. Thanks for the link Isabel. I just picked...I agree. Thanks for the link Isabel. I just picked up Bentley's book awhile ago and just started working my way through it. <BR/><BR/>I haven't done a lot of prob-stats study, so I'd be pretty interested to read an elaboration on your thoughts re: the comment "The first moment of a distribution is not everything you need to know about it!" Maybe if you get bored some time ;)Danhttps://www.blogger.com/profile/02128499858806569768noreply@blogger.comtag:blogger.com,1999:blog-264226589944705290.post-68588062755654464702008-07-11T06:40:00.000-07:002008-07-11T06:40:00.000-07:00Wow, that was actually an interesting talk.Thanks ...Wow, that was actually an interesting talk.<BR/><BR/>Thanks :)Unknownhttps://www.blogger.com/profile/00367206698794917637noreply@blogger.com