Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
R を用いた分析(補講) (2) — 人工データの生成 / Analysis using R ...
Search
Kenji Saito
PRO
November 30, 2024
Technology
0
70
R を用いた分析(補講) (2) — 人工データの生成 / Analysis using R (supplementary) (2) - Generating artificial data
早稲田大学大学院経営管理研究科「企業データ分析」2024 冬のオンデマンド教材 第12回で使用したスライドです。
Kenji Saito
PRO
November 30, 2024
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
成果と意思決定 / Performance and Making Decisions
ks91
PRO
0
5
ボランティア / Volunteers
ks91
PRO
0
5
理事会 / Board of Directors
ks91
PRO
0
4
成果 / Achievements
ks91
PRO
0
11
意思決定 / Decision-Making
ks91
PRO
0
14
ファンディングとデジタル市民社会 / Funding and Digital Civil Society
ks91
PRO
0
22
生成AI による論文執筆サポート・ワークショップ 論文執筆・推敲編 / Generative AI-Assisted Paper Writing Support Workshop: Drafting and Revision Edition
ks91
PRO
0
32
私たちの前提は揺るがないのか / Are Our Premises Unshakeable?
ks91
PRO
0
24
貨幣無き世界への過程 / The Process Towards a World without Money
ks91
PRO
0
11
Other Decks in Technology
See All in Technology
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
150
SQLだけでマイグレーションしたい!
makki_d
0
810
Oracle Cloud Infrastructure IaaS 新機能アップデート 2025/09 - 2025/11
oracle4engineer
PRO
0
160
ChatGPTで論⽂は読めるのか
spatial_ai_network
11
29k
.NET 10の概要
tomokusaba
0
120
LLM-Readyなデータ基盤を高速に構築するためのアジャイルデータモデリングの実例
kashira
0
270
AWS re:Invent 2025~初参加の成果と学び~
kubomasataka
0
120
Reinforcement Fine-tuning 基礎〜実践まで
ch6noota
0
190
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
930
子育てで想像してなかった「見えないダメージ」 / Unforeseen "hidden burdens" of raising children.
pauli
2
290
今年のデータ・ML系アップデートと気になるアプデのご紹介
nayuts
1
510
まだ間に合う! Agentic AI on AWSの現在地をやさしく一挙おさらい
minorun365
12
540
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
A better future with KSS
kneath
240
18k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Practical Orchestrator
shlominoach
190
11k
A Tale of Four Properties
chriscoyier
162
23k
Statistics for Hackers
jakevdp
799
230k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Why Our Code Smells
bkeepers
PRO
340
57k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
286
14k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
Transcript
Boxes and whiskers — generated by Stable Diffusion XL v1.0
2024 12 R ( ) (2) — (WBS) 2024 12 R ( ) (2) — — 2024-11 – p.1/14
https://speakerdeck.com/ks91/collections/corporate-data-analysis-2024-winter 2024 12 R ( ) (2) — — 2024-11
– p.2/14
( 20 ) 1 • 2 R • 3 •
4 • 5 • 6 ( ) • 7 (1) • 8 (2) • 9 R ( ) (1) — Welch • 10 R ( ) (2) — χ2 • 11 R ( ) (1) — • 12 R ( ) (2) — • 13 GPT-4 14 GPT-4 15 ( ) LaTeX Overleaf 8 (12/16 ) / (2 ) OK / 2024 12 R ( ) (2) — — 2024-11 – p.3/14
N(µ, σ2) ρ 2 ( : ˆ y = a
+ b1 x1 + b2 x2 + e ) 2024 12 R ( ) (2) — — 2024-11 – p.4/14
N(µ, σ2) “rnorm()” set.seed(173205) # # N(50, 10^2) 100 x
<- rnorm(n=100, mean=50, sd=10) # x # hist(x) mean(x) sd(x) 2024 12 R ( ) (2) — — 2024-11 – p.5/14
Histogram of x x Frequency 10 20 30 40 50
60 70 80 0 5 10 15 20 25 30 35 mean(x) : 50.06994 sd(x) : 10.30096 2024 12 R ( ) (2) — — 2024-11 – p.6/14
ρ 2 (1/2) MASS “mvrnorm()” “ .R” # r =
0.9 # t = 3.7 # r = 15.2 # t = 7.5 # = -0.5 # <- matrix(c( r^2, * t * r, * r * t, t^2 ), nrow=2) 2024 12 R ( ) (2) — — 2024-11 – p.7/14
“mvrnorm()” = S xx S xy S xy S yy
= S xx rS x S y rS x S y S yy ( r = S xy S x S y ) 2 x, y x, y, z, . . . 2024 12 R ( ) (2) — — 2024-11 – p.8/14
ρ 2 (2/2) MASS “mvrnorm()” “ .R” # set.seed(28284) <-
mvrnorm(n=100, mu=c( r, t), Sigma= ) <- pmin(pmax( [,1], 13.0), 19.9) <- pmin(pmax( [,2], 0.0), 20.0) “ [,1]” “ [,2]” plot 2024 12 R ( ) (2) — — 2024-11 – p.9/14
0 5 10 15 20 13 14 15 16 17
18 ㈇ࡢ┦㛵ࡢ 㐌ᙜࡓࡾࡢㄢእ㐠ື㛫 100m㉮ࡢࢱ࣒ (⛊) r : -0.5932345 ( ) -0.5884094 ( ) 2024 12 R ( ) (2) — — 2024-11 – p.10/14
(1/2) “ .R” n <- 50 # a <- 49.4
# ( (158cm ) ) # r_father <- 0.306 mean_father <- 168.78 sd_father <- 3.2 # r_mother <- 0.37 mean_mother <- 155.32 sd_mother <- 2.45 2024 12 R ( ) (2) — — 2024-11 – p.11/14
(2/2) “ .R” <- round(rnorm(n=n, mean=mean_father, sd=sd_father), digits=1) <- round(rnorm(n=n,
mean=mean_mother, sd=sd_mother), digits=1) e <- rnorm(n=n, mean=0, sd=2.8) # <- round(a + r_father * + r_mother * + e, digits=1) 1 “round()” plot 2024 12 R ( ) (2) — — 2024-11 – p.12/14
ፉ㌟㛗 160 165 170 175 152 156 160 164 160
165 170 175 ∗㌟㛗 152 156 160 164 150 154 158 150 154 158 ẕ㌟㛗 : 34.2484 : 0.3545 : 0.4137 : 0.2831 2024 12 R ( ) (2) — — 2024-11 – p.13/14
2024 12 R ( ) (2) — — 2024-11 –
p.14/14