Skip to Content
Rクックブック 第2版
book

Rクックブック 第2版

by J.D. Long, Paul Teetor, 大橋 真也, 木下 哲也
January 2020
Intermediate to advanced
584 pages
7h 18m
Japanese
O'Reilly Japan, Inc.
Content preview from Rクックブック 第2版

9章一般統計学

Rの主な適用例には統計、モデル、グラフィックスなどがあります。本章ではその中でも統計に焦点を当てます。相対度数など統計量の計算方法を示すだけのレシピもありますが、ほとんどのレシピには統計的検定や信頼区間が関係します。統計的検定では、2つの矛盾する仮説のいずれかを選択します。このパラダイムについては以下で説明します。信頼区間は母集団パラメータが取ると思われる範囲を示すもので、データ標本に基づいて計算されます。

帰無仮説、対立仮説、p値

本章の統計的検定の多くは、長い時間をかけて実証済みの統計的推測のパラダイムを使っています。このパラダイムでは、1個か2個の標本を扱います。また、そのいずれかが合理的に真となるような、2つの対立する仮説を扱います。

一方の仮説は帰無仮説と呼ばれ、何も起きないという仮説です。つまり、平均のまま、治療は効果がない、期待通りの答えが得られる、モデルは改善されない、などです。

もう一方の仮説は対立仮説と呼ばれ、何かが起こるという仮説です。つまり、平均が上がる、治療によって患者の健康が改善する、予期しない答えが得られる、モデルの適合度が上がる、などです。

データをもとにどちらの仮説の方が適しているか判断する必要があります。次のように判断します。

  1. まず、帰無仮説が真であると仮定する。
  2. 検定統計量を計算する。検定統計量は、標本の平均のように簡単な場合もあれば、複雑な場合もある。必須の要件として、統計量の分布がわかっていなければいけない。例えば、中心極限定理を使うと標本平均の分布がわかる。
  3. 統計量とその分布から、「p値」を求められる。p値は、帰無仮説が真であると仮定した場合に、観測値と比べて極端な検定統計量が得られる確率である。
  4. p値が小さすぎる場合、帰無仮説を支持しない強力な証拠になる。これを帰無仮説を ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Rクイックリファレンス 第2版

Rクイックリファレンス 第2版

Joseph Adler, 大橋 真也, 木下 哲也
ハイパフォーマンスPython 第2版

ハイパフォーマンスPython 第2版

Micha Gorelick, Ian Ozsvald, 中山 光樹
Rではじめるデータサイエンス 第2版

Rではじめるデータサイエンス 第2版

Hadley Wickham, Mine Çetinkaya-Rundel, Garrett Grolemund, 大橋 真也
Rではじめるデータサイエンス

Rではじめるデータサイエンス

Hadley Wickham, Garrett Grolemund, 黒川 利明, 大橋 真也

Publisher Resources

ISBN: 9784873118857Other