找回密码
 快速注册
搜索
查看: 16|回复: 8

[概率/统计] 球上的均匀分布

[复制链接]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2025-1-19 00:06 |阅读模式
Sampling a Uniformly Random Rotation中,使用\(r=\sqrt{z};\) \(\text{Vz}=\sqrt{2-z};\) \(\text{Vx}=r \sin (\phi );\) \(\text{Vy}=r \cos (\phi );\) 生成球上的点,为什么这样是均匀分布的?

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2025-1-19 00:09
mathworld.wolfram.com/SpherePointPicking.html 提供了一种在球面上随机选取点的方法:

为了获得在球面上任何小区域内预期包含相同数量点的点集,选择 $u$ 和 $ν$ 为 $[0,1]$ 上的随机变量。然后:$$\begin{array}{ll}\theta=2\pi u\\
\varphi=\arccos(2v - 1)\end{array}$$ 给出了均匀分布在 $\mathbb{S}^2$ 上的一组点的球面坐标。这是因为球面上的面积微元是 $dA = \sin(\varphi) d\varphi d\theta$,并且一个点落在区域 $dA$ 的概率与 $dA$ 成正比。

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2025-1-19 00:13
面积微元是 $dA = \sin(\varphi) d\varphi d\theta$,可以写成 $dA =-d(\cos\varphi) d\theta$,所以$\cos\varphi$在$[-1,1]$均匀分布。
\begin{align*}
\text {Pick }& u=\cos \varphi \\
&\begin{aligned}
& x=\sqrt{1-u^2} \cos \theta \\
& y=\sqrt{1-u^2} \sin \theta \\
& z=u
\end{aligned}
\end{align*}

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2025-1-19 00:23
这样的话 $x$ 也是在 $[-1,1]$ 均匀分布了

取球面上的均匀分布点的$x$-坐标,竟然还是均匀分布

730

主题

1万

回帖

9万

积分

积分
93593
QQ

显示全部楼层

kuing 发表于 2025-1-19 00:29
hbghlyj 发表于 2025-1-19 00:23
这样的话 $x$ 也是在 $[-1,1]$ 均匀分布了

取球面上的均匀分布点的$x$-坐标,竟然还是均匀分布 ...


不就是球冠面积与高成正比嘛?`S=2\pi Rh`

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2025-1-19 00:32
kuing 发表于 2025-1-18 16:29
不就是球冠面积与高成正比嘛?`S=2\pi Rh`


我上面是否有错呢
$u\sim U[-1,1]$和$\theta\sim U[0,2\pi)$,那么 $x=\sqrt{1-u^2} \cos \theta$ 是什么分布呢?

730

主题

1万

回帖

9万

积分

积分
93593
QQ

显示全部楼层

kuing 发表于 2025-1-19 00:34
hbghlyj 发表于 2025-1-19 00:32
我上面是否有错呢
$u\sim U[-1,1]$和$\theta\sim U[0,2\pi)$,那么 $x=\sqrt{1-u^2} \cos \theta$ 是什么 ...

emmm...... 其实那些我看不懂,我只是看了一眼 4# 的,联想到球冠面积公式,就随口一说而已O(∩_∩)O哈!

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2025-1-19 01:03
hbghlyj 发表于 2025-1-18 16:32
$u\sim U[-1,1]$和$\theta\sim U[0,2\pi)$,那么 $x=\sqrt{1-u^2} \cos \theta$ 是什么分布

用Mathematica积分
  1. PDF[TransformedDistribution[Sqrt[1-u^2]Cos[\[Theta]],{u\[Distributed]UniformDistribution[{-1,1}],\[Theta]\[Distributed]UniformDistribution[{0,2Pi}]}],x]
复制代码
\[f(x)=\left\{
\begin{array}{cl}
\frac{1}{2} & -1<x<1 \\
0 & x>1\lor x<-1 \\
\end{array}
\right.\]确实是均匀分布。

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

 楼主| hbghlyj 发表于 2025-1-19 01:09

随机旋转的角度是什么分布?

Wikipedia:如果我们将 3 × 3 旋转矩阵分解为轴–角形式,角度不应均匀分布;角度的大小至多为 $θ$ 的概率应为$$\frac{1}{\pi}(θ − \sin θ)$$其中 $0 ≤ θ ≤ π$。如何证明这个公式?

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 12:53

Powered by Discuz!

× 快速回复 返回顶部 返回列表