SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
統計学

第1回
全体像
•   マスに入った日本酒の体積は?
•   1回目測定値が100.5立方センチメートル
•   2回目測定値が100.7立方センチメートル
•   100回目測定値が100.1立方センチメートル
•   100回測定したがバラツキがある
•   本当の値、真の値を求めたい
•   どのように表現したらよいか?
全体像
• 平均値は100.2立方センチメートルと出た。
• この平均値もバラツキがある(もう100回測定
  したら別の平均値が出る)
• 真の値+誤差
   というモデルを考える
• 誤差は正規分布(釣鐘型の山の形)に従うと
  知られている
全体像
• 真の値を平均値で推測する
• 100.2±誤差
• 誤差は分散で推測できる(分散とは平均値からの
  データのバラツキ度合い)
• 計算で分散の平方根(標準偏差)が0.001だと求まっ
  た
• 真の値±誤差
 → 100.2±2×0.001
上記の式で約95%は信頼できる
95%の信頼とは正規分布の中心(平均値)からのバラツ
キが標準偏差の2倍くらいになる範囲が95%信頼区間
全体像
• 以上が統計的推定、統計量の内容
• 統計量とは、平均値や分散、標準偏差などの指標の
  こと
• 統計学では「正規分布」など、「確率分布」であらかじ
  めデータがどのようにふるまうか分かっているので、
  確率分布を利用して求めたい値を推定している。
• 平均値は代表値(100回測定した値の代表)
• 分散は平均値からのデータのバラツキを表す度合い。
  データと平均値の差を2乗したものをデータ数で割って
  いる。σ^2(シグマ2乗)で表現される。
• 標準偏差は分散の平方根、σ(シグマ)で表現される、
  分散が2乗なので平方根をとっている。
全体像
• 1組の英語の平均点が70点、2組の英語の平均
  点が65点。
帰無仮説:1組と2組の平均点は等しい
対立仮説:1組と2組の平均点は異なる

帰無仮説とは「無に帰す仮説」。確率分布で「1組と
2組の平均点は等しい」が5%未満であれば珍しい
として、帰無仮説を棄却(否定)し、対立仮説を採
用する。
以上が統計的仮説検定。
全体像
• 統計学はあらかじめ知られている確率分布
  (正規分布、t分布、F分布、カイ二乗分布、幾
  何分布、二項分布、ポアソン分布、指数分布
  など)を用いて、統計的推定や統計的仮説検
  定を行っている。
全体像
• 相関係数とは2つの観測値(XとY)が直線的な
  関係(線形)の度合いを示す。たとえば、身長
  が大きければ体重も大きくなるような関係な
  ど。
• 上述の確率分布や相関係数を使って、2つ以
  上の観測値(変数X、Yなど)から変数間の関
  係をモデル式で表したり、予測したりすること
  ができる。→線形モデル
データとは?
• 情報科学
 – 現実を表しているもの
  • データ圧縮
  • DNA
  • 可視化
• 統計学
 – データを発生させる何らかのメカニズムがある
統計学のデータとは?
• データは標本の実現値
   標本



               メカニズム
   標本           母集団
                 分布

   標本
統計学で大切なことは?
• 仮説を持つということ!
統計学で大切なことは?
• ジョーカーを除いたトランプ52枚から10枚取り
  出し、トランプの値の平均値を求めた。
 – 取った10枚を元に戻して、再び10枚とって平均値
   を求める
 – 10枚とって計算した平均値はバラツク、変動する
 – どのようにバラツクのか?
• バラツキかたを知ることが構造を知るというこ
  と!
どう考えるのか?
• Simple is the Best !
  – まずはシンプルに考える


• どうしてこんなグラフの形になるのかを考える
どう考えるのか?
• 仮説0
 – 1つの構造が1つある


• 仮説1
 – 同じ構造が2つある    ←やりやすい!!


• 仮説2
 – 違う構造が2つある
どう考えるのか?
• 信念
 – 平均値は何かを表しているはず、という信念
         𝑋1 + 𝑋2 + 𝑋3 + ⋯ + 𝑋100
      𝑥=
                  100
確率事象
• 確率
 – あるできごとが起きたり起きなかったりするものに対
   して、起きる度合い。


• 事象
 – できごとみたいなもの。現象。


• 確率事象
 – あるできごとが起きたり起きなかったりする現象。
確率事象
• 一番シンプルなものを考える
  – 状態が2つ
    • コインの表と裏

        数値へマッピング
        (数式、数値で表現)

                X=1   ←コイン(X)が表(1)という意味
                X=0   ←コイン(X)が裏(0)という意味
表:P(コイン=表)
裏:P(コイン=裏)
                P(X=1) ←コインが表の確率
                P(X=0) ←コインが裏の確率
なぜ数式で表現するのか?
• 数式は厳密に考えられる
• 数式は世界共通語
• 話し言葉よりも数式で表現した方がシンプルになると
  きもある
• テキストに記述されている数式をまねして、手で書い
  てなぞっていくと、少しずつ慣れてくる
• 統計学は数式(数学)を道具として活用している
• 基本は足し算、引き算、掛け算、割り算で理解できる
  ので慣れることが必要
• P, pは確率(probabilityのp)、変数はX, x, Y, yなどを使う
• f(x)のfは関数(function)のf
用語への慣れ
• 変数
  – いろいろな数値が入る入れ物みたいなもの
  – X、Yなどで表現する
• 確率変数
  – 数値の入れ物が確率的な振る舞い(起きたり起こらなかったり)をする
    変数
• 関数
  – 関数f(x)という箱にxを入力するとyが出力されるようなイメージ。ある
    値を入力するとある値が出力される箱(仕組み、メカニズム、モデル)
    のようなもの。
• モデル
  – メカニズムを表現した数式や言葉を指す
• 分布
  – 確率変数の振る舞い、あらかじめ知られているメカニズム、モデルの
    ようなもの
コインの表と裏
P(X=1)>=0 ←コインが表の確率はゼロ以上
P(X=0)>=0 ←コインが裏の確率はゼロ以上
P(X=1)+P(X=0)=1 ←表と裏の確率の和は1
P(X=1)=p           ←表の確率をp
P(X=0)=1-P(X=1)=1-p ←裏の確率を1-p
P(X1=1)=p, P(X2=1)=p ←1回目投げたら表、2回目投げたら表
X1とX2は独立と仮定 ← 1回目と2回目は影響しあっていない
                      統計学では「独立」という前提が多い



P(X1=1 かつ X2=1)=P(X1=1)×P(X2=1)
← 1回目投げたら表、かつ2回目投げたら表になる確率
コインの表と裏(ベルヌーイ試行)
ベルヌーイ試行:2つの値しか出ない確率事象の試み

P(X=1)>=0
P(X1=1, X2=1)=p×p 表×表
P(X1=1, X2=0)=p×(1-p) 表×裏
P(X1=0, X2=1)=(1-p)×p 裏×表
P(X1=0, X2=0)=(1-p)^2 裏×裏

P^2+p(1-p)+(1-p)p+(1-p)^2=1
←上記4パターンの確率の合計は1
幾何分布
• コインを投げて、k回目で表が出る確率(k-1回
  目までは裏が続く)
• 裏、裏、裏、・・・、裏、表
P(X=k)=(1-p)(1-p)・・・(1-p)p
     =(1-p)^(k-1)×p
• 幾何分布とは成功するまでの確率分布を表
  す
二項分布
• ベルヌーイ試行(コインの表と裏のように確率
  変数が「0」か「1」の2値パターン)をN回行うと
  きの確率分布を表す
コインの表と裏を再考
• コインの表が出る確率をpとする
• 公平なコインであれば確率pは1/2であるとい
  えるのか?
• 本当の確率pの値が分からない
  →データから推定する

 何回目    0回目   1回目   2回目   3回目
 コインの状態 -     表     表     表
 確率p    1/2               1/2といえ
                          る?

Más contenido relacionado

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

統計学