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
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
260
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
140
First, design no harm
axbom
PRO
2
1.2k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
160
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
260
Test your architecture with Archunit
thirion
1
2.2k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
400
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
510
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