Suppose I have an n-sphere of radius 1 centered in $(0,0,...,0)$, where each point on the surface represents a multinomial distribution:
- Given coordinates of a point $S=(x_1, x_2,...,x_n)$ on the sphere surface, with $-1 \leq x_i \leq 1$, the associated distribution would be $P$ with parameters $(x_1^2, x_2^2, ..., x_n^2)=(p_1,p_2,...,p_n)$, where $p_i$ represents the probability of value $i$.
I would like to obtain, given $S$ on the sphere surface, a random point $S'$ on the sphere surface such that the euclidean distance $d(S,S')$ follows a uniform distribution in the range $(0, D)$, which would be equivalent of a method of adding noise to the multinomial distribution $P$ associated to $S$ such that $P'$ is also a correct multinomial distribution.
The final goal is to use this method in a simulated annealing program to optimize the parameters of a multinomial distribution, as a way to find a neighbor of the current estimation of the probability distribution.
Is there a feasible, perhaps approximate way to find $S'$ in a reasonable computation time for an $n$-sphere with $n \ge 3$?
I ended up finding what I think is an exact solution.
Let $\sigma$ a plane that passes through the origin $O$, where the normal vector is described by the point $S$. The neighbors of $S$ are in the surface of a spherical cap with a base parallel to $\sigma$.
A random unit vector $V$ parralel to $\sigma$ may be obtained by projecting a random point in the sphere surface onto $\sigma$ and normalizing.
If we take $d$ as the minimum distance from $S$ to the center of the sperical cap base $B$, we can determine $||OB||=1-d$ and the maximum distance to a neighbor $S'$ of $S$ (in the spherical cap) as $||BS'||=\sqrt{1-(1-d)^2}$ with Pythagoras theorem. The distance of $S$ to $S'$ can also be determined with Pythagoras theorem: $||SS'||=\sqrt{2d}$.
Taking last two paragraphs into account, a random neighbor $S'$ of $S$ at a distance $||SS'||=D$ can be obtained as $OB+V||BS'||$, as all the unknowns can be obtained with $d$ which can be obtained by $d=D^2/2$. If a value $D'$ is chosen from a random uniform in $[0,D]$, and then $S'$ is obtained for that $D'$, then $d(S,S')$ will follow a uniform distribution in $[0,D]$. Here goes a graphic representation, (you have to imagine a sphere).
Here goes some Python code for those interested:
It outputs:
A visualization for $n=3$ was also made for many neighbors (black) of $S$(white):