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
69
1
Share
Box-Muller法
NearMeの技術発表資料です
PRO
October 10, 2025
More Decks by NearMeの技術発表資料です
See All by NearMeの技術発表資料です
SQL/ID抽出タスクから考える 実践的なハルシネーション対策
nearme_tech
PRO
0
15
OpenCode & Local LLM
nearme_tech
PRO
0
21
OpenCode Introduction
nearme_tech
PRO
0
28
【Browser Automation × AI】 Stagehandを試してみよう
nearme_tech
PRO
0
70
AIを用いた PID制御で部屋 の温度制御をしてみた
nearme_tech
PRO
0
82
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
3
370
Tile38 Overview
nearme_tech
PRO
0
75
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
1
1.4k
実践で使えるtorchのテンソル演算
nearme_tech
PRO
0
42
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
820
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
110
Crafting Experiences
bethany
1
130
Six Lessons from altMBA
skipperchong
29
4.2k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
900
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
480
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Fireside Chat
paigeccino
42
3.9k
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