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
R を用いた分析(補講) (2) — 人工データの生成 / Generating Artifi...
Search
Kenji Saito
PRO
January 25, 2024
Business
0
100
R を用いた分析(補講) (2) — 人工データの生成 / Generating Artificial Data
早稲田大学大学院経営管理研究科「企業データ分析」2023 冬のオンデマンド教材 第11回で使用したスライドです。
Kenji Saito
PRO
January 25, 2024
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
続・インクルーシブな社会へ / Continuing Towards an Inclusive Society
ks91
PRO
0
20
AGI (人工一般知能) と創る新しく奇妙な社会 / New and Stranger Society built with AGI
ks91
PRO
0
65
回帰分析/大規模言語モデルと統計 / Regression Analysis, Large Language Models and Statistics
ks91
PRO
0
71
多重比較/相関分析 / Multiple Comparison and Correlation Analysis
ks91
PRO
0
66
アカデミーキャンプ 2025冬「考えるのは奴らだ」 / Academy Camp 2025 Winter - Live and Let Think DAY 3
ks91
PRO
0
63
アカデミーキャンプ 2025冬「考えるのは奴らだ」 / Academy Camp 2025 Winter - Live and Let Think DAY 2
ks91
PRO
0
49
アカデミーキャンプ 2025冬「考えるのは奴らだ」 / Academy Camp 2025 Winter - Live and Let Think DAY 1
ks91
PRO
1
75
インクルーシブな社会へ / Toward an Inclusive Society
ks91
PRO
0
23
P 値と有意差/分散分析 / P-value, Significant Difference and Analysis of Variance
ks91
PRO
0
73
Other Decks in Business
See All in Business
SHIFT ASIA 会社説明資料 V2.1
shiftasiarec
0
310
AmbientNavi_紹介資料.pdf
ambientnavi0329
0
390
株式会社AbemaTV 会社説明資料
abematv
2
1.9k
n=1の経験が紡ぐエンジニアリングマネジメントの可能性 / The Possibilities of Engineering Management from n=1 Experiences
iwashi86
21
6.9k
5分でわかる松鶴建設 | Shokaku Recruit
shokaku_recruit
0
730
リンクアンドモチベーション 営業コンサルタント向け紹介資料 / Introduction to Link and Motivation for Sales and Consultants
lmi
0
110k
株式会社モバイルファクトリー 会社説明資料
mobilefactory
0
650
CCBJIピッチブック
2024ccbji
0
260
アノマリーマーケティング カルチャーコード_ver1.0
anomalymarketing
1
220
アッテル会社紹介資料/culture deck
attelu
10
14k
第3回関東Kaggler会 LT Kaggleはうつ病患者の役に立つ
utm529f
2
270
27.02.2025 El mercado cuartohorario de electricidad
neuroenergia
PRO
0
120
Featured
See All Featured
Bash Introduction
62gerente
611
210k
How STYLIGHT went responsive
nonsquared
99
5.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Being A Developer After 40
akosma
89
590k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
Statistics for Hackers
jakevdp
797
220k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Designing for Performance
lara
605
68k
Documentation Writing (for coders)
carmenintech
68
4.6k
The Cost Of JavaScript in 2023
addyosmani
47
7.4k
Facilitating Awesome Meetings
lara
53
6.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Transcript
generated by Stable Diffusion XL v1.0 2023 12 R (
) (2) — (WBS) 2023 12 R ( ) (2) — — 2024-01 – p.1/14
https://speakerdeck.com/ks91/collections/corporate-data-analysis-2023-winter 2023 12 R ( ) (2) — — 2024-01
– 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/21 ) / (2 ) OK / 2023 12 R ( ) (2) — — 2024-01 – p.3/14
N(µ, σ2) ρ 2 ( : ˆ y = a
+ b1 x1 + b2 x2 + e ) 2023 12 R ( ) (2) — — 2024-01 – 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) 2023 12 R ( ) (2) — — 2024-01 – 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 2023 12 R ( ) (2) — — 2024-01 – 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) 2023 12 R ( ) (2) — — 2024-01 – 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, . . . 2023 12 R ( ) (2) — — 2024-01 – 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 2023 12 R ( ) (2) — — 2024-01 – p.9/14
0 5 10 15 20 13 14 15 16 17
18 ㈇ࡢ┦㛵ࡢ 㐌ᙜࡓࡾࡢㄢእ㐠ື㛫 100m㉮ࡢࢱ࣒ (⛊) r : -0.5932345 ( ) -0.5884094 ( ) 2023 12 R ( ) (2) — — 2024-01 – 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 2023 12 R ( ) (2) — — 2024-01 – 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 2023 12 R ( ) (2) — — 2024-01 – 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 2023 12 R ( ) (2) — — 2024-01 – p.13/14
2023 12 R ( ) (2) — — 2024-01 –
p.14/14