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
67
1
Share
Box-Muller法
NearMeの技術発表資料です
PRO
October 10, 2025
More Decks by NearMeの技術発表資料です
See All by NearMeの技術発表資料です
OpenCode Introduction
nearme_tech
PRO
0
17
【Browser Automation × AI】 Stagehandを試してみよう
nearme_tech
PRO
0
58
AIを用いた PID制御で部屋 の温度制御をしてみた
nearme_tech
PRO
0
64
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
3
300
Tile38 Overview
nearme_tech
PRO
0
67
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
950
実践で使えるtorchのテンソル演算
nearme_tech
PRO
0
39
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
690
初めてのmarimo (ハンズオン)
nearme_tech
PRO
0
53
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Designing Powerful Visuals for Engaging Learning
tmiket
1
330
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
880
Producing Creativity
orderedlist
PRO
348
40k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Odyssey Design
rkendrick25
PRO
2
570
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
690
Test your architecture with Archunit
thirion
1
2.2k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.3k
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