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
応用セッション_同じデータでもP値が変わる話/key_considerations_in_NH...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
florets1
January 17, 2024
Education
1
1.2k
応用セッション_同じデータでもP値が変わる話/key_considerations_in_NHST_2
florets1
January 17, 2024
Tweet
Share
More Decks by florets1
See All by florets1
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
470
Tableauとggplot2の背景/Background_of_Tableau_and_ggplot2
florets1
0
51
Rで学ぶデータハンドリング入門/Introduction_to_Data_Handling_with_R
florets1
0
130
人工知能はクロスジョインでできている/AI_Is_Built_on_Cross_Joins
florets1
0
83
仮説の取扱説明書/User_Guide_to_a_Hypothesis
florets1
4
430
複式簿記から純資産を排除する/eliminate_net_assets_from_double-entry_bookkeeping
florets1
1
450
カイ二乗検定は何をやっているのか/What_Does_the_Chi-Square_Test_Do
florets1
7
2.5k
直積は便利/direct_product_is_useful
florets1
3
450
butterfly_effect/butterfly_effect_in-house
florets1
1
270
Other Decks in Education
See All in Education
悩める リーダー達に 届けたい書籍|レジリエントマネジメント 書籍イントロダクション-260126
mimoza60
0
290
Cifrado asimétrico
irocho
0
380
The browser strikes back
jonoalderson
0
390
子どもが自立した学習者となるデジタルの活用について
naokikato
PRO
0
180
Microsoft Office 365
matleenalaakso
0
2.1k
【ベテランCTOからのメッセージ】AIとか組織とかキャリアとか気になることはあるけどさ、個人の技術力から目を背けないでやっていきましょうよ
netmarkjp
2
2.8k
10分で学ぶ すてきなモナド
soukouki
1
150
Semantic Web and Web 3.0 - Lecture 9 - Web Technologies (1019888BNR)
signer
PRO
2
3.2k
✅ レポート採点基準 / How Your Reports Are Assessed
yasslab
PRO
0
280
AIは若者の成長機会を奪うのか?
frievea
0
180
The Next Big Step Toward Nuclear Disarmament
hide2kano
0
220
【ZEPホスト用メタバース校舎操作ガイド】
ainischool
0
170
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Building the Perfect Custom Keyboard
takai
2
690
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Navigating Weather and Climate Data
rabernat
0
110
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
110
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
53
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
Designing Powerful Visuals for Engaging Learning
tmiket
0
240
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
67
The Cult of Friendly URLs
andyhume
79
6.8k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Transcript
1 応用セッション 2024.01.20 Tokyo.R #110 同じデータでもP値が変わる話
2 統計的仮説検定 同じデータからは同じ検定結果が得られるもの と考えられがちですが 実際には必ずしもその通りではありません。
3 例えば コイン投げをして24回中7回が表になったという単純 なデータを考えてみましょう。 このようなデータでも、実験の設定や投げる回数の制 約によって、統計的仮説検定の結果が変わることがあ るのです。
4 コインを1回投げる 𝑝 𝑦 𝜃 = 𝜃𝑦(1 − 𝜃)(1−𝑦) 𝜃
= 0.5 ベルヌーイ分布 θ: 表が出る確率 y: 1 は表, 0 は裏
5 コインをN回投げる 裏裏表表裏裏表裏裏裏裏裏裏裏裏裏表裏裏表表裏裏表 表が出る確率 θ 投げる回数 N 表の回数 z 二項分布
6 統計的仮説検定の流れ 帰無仮説をたてる ↓ 標本分布を計算する ↓ データを観測してP値を求める
7 帰無仮説をたてる ある統計量がある値と等しいということを帰無仮説と して設定します。 例) コインの裏表が出る確率が50%と等しい 平均値が等しい
8 標本分布を計算する 帰無仮説が成り立つ場合にその統計量が従うであろう 確率分布(=標本分布)を計算します。 例) コインの裏表が出る確率 → 二項分布など 平均値 →
t分布など
9 データを観測してP値を求める 実際に観測された値、もしくはそれ以上に極端な値が 標本分布に占める面積、つまりそのような値が観測さ れる確率(P値)を求めます。
10 P値があらかじめ設定したしきい値(たとえば5%)よ りも小さければ、そもそも帰無仮説が間違っていたの だと結論づけます。 逆に小さくなければ帰無仮説を棄却せず、判断を保留 します。 P値で判断
11 コインを24回投げて7回表が出た このコインは公平か。 データ観測者の意図 コインを24回投げると決めていた。結果として7回表 がでた。
12 標本分布 表が出る確率 θ 投げる回数 N 表の回数 z 二項分布
13 データを観測 θ = 0.5 N = 24 z =
7 P値 = 0.064 Sample Proportion z/N p(z/N)
14 Rのコード
15 Pythonのコード
16 コインを24回投げて7回表が出た このコインは公平か。 データ観測者の意図 7回表が出るまで投げ続けると決めていた。結果として 24回投げた。 ↓ 23回投げた時点で6回表が出ており、24回目では表が 出た。
17 標本分布 N-1回投げた時点でz-1回表が出て N回目は表
18 データを観測 θ = 0.5 z = 7 N =
24 P値 = 0.017 Sample Proportion z/N p(z/N)
19 Rのコード
20 Pythonのコード
21 投げる回数N 表が出る回数 z • Nを固定する意図ではP値=0.064(判断を保留) • zを固定する意図ではP値=0.017(帰無仮説を棄却) 同じデータを観測しても、観測者の意図によって 検定結果が変わる!
22 意外にも 観察者の意図やデータ収集の方法が、統計的な結果に 影響を与える可能性があるのです。 このような現象は、統計的な検定の限界や留意すべき 要点を浮き彫りにします。単に数値を見るだけではな く、実験の文脈や条件を正しく理解することの重要性 を示しています。
23 参考書 飯塚修平. ウェブ最適化ではじめる機械学習. オライ リー・ジャパン, 2020 John K. Kruschke.
Doing Bayesian Data Analysis: A Tutorial with R, JAGS, and Stan EDITION 2. Academic Press, 2014