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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
NearMeの技術発表資料です
PRO
October 10, 2025
1
52
Box-Muller法
NearMeの技術発表資料です
PRO
October 10, 2025
Tweet
Share
More Decks by NearMeの技術発表資料です
See All by NearMeの技術発表資料です
Tile38 Overview
nearme_tech
PRO
0
24
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
160
実践で使えるtorchのテンソル演算
nearme_tech
PRO
0
17
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
420
初めてのmarimo (ハンズオン)
nearme_tech
PRO
0
33
ローカルLLM
nearme_tech
PRO
0
54
LlamaIndex Workflow: Build Practical AI Agents Fast
nearme_tech
PRO
0
32
Kiro触ってみた
nearme_tech
PRO
0
400
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
4
640
Featured
See All Featured
Music & Morning Musume
bryan
47
7.1k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Between Models and Reality
mayunak
1
180
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
49k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Crafting Experiences
bethany
1
48
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
430
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