Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Box-Muller法
Search
NearMeの技術発表資料です
PRO
October 10, 2025
1
41
Box-Muller法
NearMeの技術発表資料です
PRO
October 10, 2025
Tweet
Share
More Decks by NearMeの技術発表資料です
See All by NearMeの技術発表資料です
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
39
実践で使えるtorchのテンソル演算
nearme_tech
PRO
0
6
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
310
初めてのmarimo (ハンズオン)
nearme_tech
PRO
0
26
ローカルLLM
nearme_tech
PRO
0
47
LlamaIndex Workflow: Build Practical AI Agents Fast
nearme_tech
PRO
0
29
Kiro触ってみた
nearme_tech
PRO
0
360
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
4
600
ReactNative のアップグレード作業が (意外に)楽しかった話
nearme_tech
PRO
2
140
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
120
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
420
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
110
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
99
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
40
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
120
Scaling GitHub
holman
464
140k
My Coaching Mixtape
mlcsv
0
26
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
190
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.5k
Transcript
0 Box-Muller法 2025-10-10 第132回NearMe技術勉強会 Takuma KAKINOUE
1 概要 • そういえばコンピュータってどうやって正規分布に基づく乱数を⽣成し ているんだ? ◦ ⼀様分布に基づく乱数の⽣成法は何となくわかる • 調べてみたら、Box-Muller法(ボックス=ミュラー法)なる⼿法がある らしい
• 今回は、Box-Muller法で本当に⼀様分布から正規分布が導けるのか改め て⼿計算で証明してみる
2 Box-Muller法の⽅針 • ⼀様分布[0,1]に従う変数U1,U2に対して以下のように2回の変数変換を⾏ うと、XとYが標準正規分布に従うらしいので証明してみる ◦ 1回⽬ ◦ 2回⽬
3 1回⽬の変数変換の計算 • θ ~ ⼀様分布 • r ~ レイリー分布
4 2回⽬の変数変換の計算 • X ~ 標準正規分布 • Y ~ 標準正規分布
5 Box-Muller法を実装して正規分布を作ってみた • ちゃんと正規分布に変換されている!! ※ ⼀様分布はnp.random.randで⽣成
6 (おまけ)カイ2乗分布も作ってみた • ⾃由度: 5
7 コード • git ◦ https://github.com/kakky-hacker/algorithm_sandbox/blob/main/ box_muller
8 Thank you