Thread: Check my math?
View Single Post
  #16 (permalink)  
Old 06-21-2009, 05:28 PM
Rune Allnor
Guest
 
Posts: n/a
Default Re: Check my math? NEW and IMPROVED: Includes CHALLENGE to seasonedMATHEMATICIANS!

On 21 Jun, 16:04, illywhacker <illywac...@gmail.com> wrote:
> On Jun 21, 11:35*am, Rune Allnor <all...@tele.ntnu.no> wrote:
>
>
>
>
>
> > On 20 Jun, 23:44, Tim Wescott <t...@seemywebsite.com> wrote:

>
> > > On Sat, 20 Jun 2009 11:37:27 -0700, Rune Allnor wrote:
> > > > On 20 Jun, 20:14, Tim Wescott <t...@seemywebsite.com> wrote:
> > > >> On Sat, 20 Jun 2009 11:04:38 -0700, Rune Allnor wrote:
> > > >> > On 20 Jun, 19:50, Tim Wescott <t...@seemywebsite.com> wrote:

>
> > > >> >> My choice of oddball integrals was intentional, as I want to goon
> > > >> >> to calculating various moments for the probability distributions of
> > > >> >> the surface of the hypersphere when 3D probability distributions are
> > > >> >> mapped onto it. *Clearly if I map a tight Gaussian distribution onto
> > > >> >> the hypersphere with a standard deviation that's much smaller than
> > > >> >> the hypersphere radius the resulting probability distribution will
> > > >> >> be easy; it's figuring out what happens as that probability
> > > >> >> distribution opens up that's making my brain cramp.

>
> > > >> > I'm a bit curious about what kind of problem leads you out in such
> > > >> > kinds of calculations?

>
> > > >> Unscented transformations for quaternion PDFs used to represent angles
> > > >> in a (hopefully soon-to-be) unscented Kalman filter.

>
> > > > The expected value is a 4-vector pointing in some desired directionand
> > > > the PDF represents the probability distribution of actual directions?

>
> > > Yup. *Given a PDF I'd _like_ to be able to solve for the expected value
> > > of the four vector elements, as well as their cross-correlation. *I'd
> > > like this to be in a form that's tractable enough that I can code it into
> > > an algorithm without either making people's heads explode when they read
> > > it and without making the processor bog down.

>
> > > But for now I'll just settle with being able to get the element meansand
> > > variances out of the thing for a variety of variances of the Gaussians,
> > > or a clear indication that if I insist on using Gaussians the math is
> > > going to be hopelessly intractable.

>
> > I did have a go at this for a Gaussian on the unit circle .
> > Note that I did this at 4AM (no intoxication though), arithmetics
> > has never been a force of mine, my pencil broke and I generally
> > am not able to read my own handwriting.

>
> > In other words, don't trust the details in what follows:

>
> > ================================================== ===========
> > Leaving out the scaling factors, the Gaussian PDF on the
> > circle becomes (view with fixed-width font)

>
> > * * * * * *inf
> > g(phi) = * sum * * exp-((phi - nu)/sigma + 2 n pi)^2 *[1]
> > * * * * *n = -inf

>
> > since there is a possibility that the angle error in reality
> > includes any number of revolutions around the unit circle.

>
> > For simplicity, define

>
> > a = (phi - nu)/sigma * * * * * * * * * * * * * * * * *[2a]
> > b = 2pi * * * * * * * * * * * * * * * * * * * * * * * [2b]

>
> > and substitute into [1]:

>
> > * * * * * *inf
> > g(phi) = * sum * *exp-(a + bn)^2 * * * * * * * * * * *[3]
> > * * * * *n = -inf

>
> > * * * * * *inf
> > * * * *= * sum * *exp-(a^2+2abn+b^2n^2) * * * ** * * [4]
> > * * * * *n = -inf

>
> > * * * * * * * * * * *inf
> > * * * *= *exp(a^2) * sum * * exp(-2abn)exp(-b^2 n^2) *[5]
> > * * * * * * * * * *n = -inf

>
> > Next, convert from a double-sided infinite sum to a
> > one-sided infinite sum, using

>
> > * inf * * * * * * * * * * * *inf
> > * sum * * exp(-x) * *= 1 + 2 sum cosh(x). * * * * * * [6]
> > n = -inf * * * * * * * * * * n=1

>
> > Apply [6] to the first exponential inside the summation
> > in [5] to find

>
> > * * * * * * * * * * * * inf
> > g(phi) = exp(a^2){1 + 2 sum cosh(2abn)exp(-b^2 n^2)} *[7]
> > * * * * * * * * * * * * n=1

>
> > To get the end result, substitute [2a-b] into [7] and insert
> > the missing scaling factors.
> > ================================================== ===========

>
> > That's as far as I can get. Because of the n^2 fector in
> > the exponent inside the sum, the summation formula for
> > geometric series can't be used (at least that's how I
> > understand it).

>
> > Now, the form of [7] seems to be rather nice: It's a basic
> > Gaussian (the outer term) and a lot of correction terms.
> > Since the exponential correction term is dominated by n^2,
> > you probably don't need to many correction terms to get an
> > impression of the PDF. Note also that the cosh term contains
> > the (phi-nu)/sigma correction, so let sigma -> inf and
> > investigate what hapepns when the PDF 'opens up' towards
> > uniform. Maybe one is able to work this out further,
> > using power series etc.

>
> > Or you can mage a worst-case assumption about the series
> > being a sum of cosh(2abn)exp(-b^2 n) terms (substituted
> > n for n^2 in the exponent) and use the formula for a
> > geometric series to proceed.

>
> > Now, you do introduce an error, but you push the PDF
> > towards something 'worse' in the sense

>
> > * * * * * *g(phi)_n > *g(phi)_n^2,

>
> > where the subscript indicates what n term you used in
> > the exponential.

>
> > Whatever blunders and errors I might have made in the
> > above, here is the maths challenge:

>
> > Now, this excercise (or the corrected / amended version
> > of it...) works well when working on a unit circle in
> > 2D space. Even generalizing it to the spheric shell in
> > 3D space is beyond me: The above works for the azimuth
> > angle in the spherical coordinate system. I have no idea
> > how to handle the elevation angle: It covers only half
> > the sphere (from 'pole' to 'pole') and once it extends
> > beyond +/- pi, it couples back in on the azimuth angle,
> > which flips by pi.

>
> > I don't see how to handle this for the problem at hand.

>
> > But, as somebody made a point of earlier this week:
> > That's what mathematicians are for - handle the
> > technicalities in the theory we mere mortal engineers
> > have to use.

>
> > Any takers among the mathematicians? How does one
> > extend the 'infintely many wrap-arounds' on the
> > circle in 2D space to a sphere in 3D space?

>
> > Rune

>
> You extend it via the geodesics that start at the mean and wrap round
> and round the sphere, using distance along the geodesic as a
> coordinate. This corresponds to identifying circular sets of points in
> R^{n}, where n is the dimensionality of the sphere (embedded in R^{n +
> 1}), just as the circle case (n = 1) corresponds to identifying all
> the odd integers and all the even integers. But one has to be careful
> about the underlying measure also. This has to be the measure derived
> from the constant curvature metric on the sphere, i.e. that induced by
> its embedding in Euclidean space.
>
> But the Gaussian used in this way doesn't make much sense, by which I
> mean there is no compelling argument for using it. There are other
> distributions that reduce to a Gaussian for small variances (i.e. when
> one can approximate the situation by the tangent space at the mean),
> e.g. the von Mises distribution, and that are better defined on a
> periodic domain. The general area is known as directional statistics.


MAybe I misunderstand Tim's problem, but in an earlier thread,

http://groups.google.no/group/comp.d...1254af9?hl=no#

he said something about variance becoming large and the
distribution approaching uniform.

Rune
Reply With Quote