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
46
Box-Muller法
NearMeの技術発表資料です
PRO
October 10, 2025
Tweet
Share
More Decks by NearMeの技術発表資料です
See All by NearMeの技術発表資料です
Tile38 Overview
nearme_tech
PRO
0
8
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
89
実践で使えるtorchのテンソル演算
nearme_tech
PRO
0
13
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
370
初めてのmarimo (ハンズオン)
nearme_tech
PRO
0
27
ローカルLLM
nearme_tech
PRO
0
50
LlamaIndex Workflow: Build Practical AI Agents Fast
nearme_tech
PRO
0
30
Kiro触ってみた
nearme_tech
PRO
0
370
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
4
620
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
150
Agile that works and the tools we love
rasmusluckow
331
21k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
160
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.4k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
Paper Plane (Part 1)
katiecoart
PRO
0
3.7k
Navigating Team Friction
lara
192
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
220
Six Lessons from altMBA
skipperchong
29
4.1k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
310
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