カイ2乗検定の流れ

カイ2乗検定とは帰無仮説を否定するための検定である。
「帰無仮説」とは証明したい仮説である「対立仮説」を証明するために否定されることを期待して立てる仮説である。文字通り「帰無仮説」を無に帰すことで対立仮説を証明する。
例えば「差がある」ことを証明したい場合は、「差がない」という仮説が帰無仮説となり「差がある」という仮説が対立仮説となる。
カイ2乗検定では帰無仮説が成り立つときの期待度数と実際に観測された観測度数からカイ2乗値を算出してそのカイ2乗値をカイ2乗分布に当てはめることで、帰無仮説が成り立つときにそのカイ2乗値以上の値が算出される確率であるp値を求める。
p値が検定を行うために予め決めていた有意水準(危険率)を下回った場合は帰無仮説を棄却して対立仮説を採択する。有意水準は通常5%(0.05)、厳密を要する場合は1%(0.01)と設定する。帰無仮説が成り立つときにその事象が起こる確率が5%を下回るならそもそも帰無仮説自体が間違っているというように考えるということである。
統計的有意差と臨床的意義

カイ2乗検定での統計的に有意になる差(統計的有意差)は、比較しているもの同士の差とデータ数(症例数など)で大きく変わってくる。
比較しているもの同士の差が臨床的意義がないほど小さなものだったとしても、カイ2乗値を算出する式から分かるようにデータ数(症例数など)が多いほどカイ2乗値は大きくなっていき、その差は統計的には有意となる差となってしまうのである。
そのため、統計的有意差イコール臨床的意義のある差と考えてはいけないのである。
疫学研究では研究を開始する前段階で最も評価したい主要評価項目(primary endpoint)に対する治療効果を推定して、それに合った症例数を設定する必要がある。
実際にカイ2乗検定をやってみる
生徒の総数が一学年100人である某医学部の解剖学の試験では毎年40%、つまり40人が落ちるような難易度に試験が設定されて実際に毎年40人ぐらいが落ちていた。しかし、今年試験をやってみると50人が落ちてしまった。解剖学の試験の難易度は例年と何ら変わらないものだったので解剖学の教員は50人という人数が多いと思い、今年の生徒の質が例年と比べて劣っていたとかいうような、とにかく今年と例年では「差があった」のではないかと考えてカイ2乗検定を行った。
この場合は帰無仮説が「差がなかった」という仮説になり、対立仮説が「差があった」という仮説となる。
カイ2乗値は帰無仮説が成り立つときの期待度数と実際に観測された観測度数から求められる。

今回のケースでは期待度数が合格者60人・不合格者40人であり、観測度数が合格者50人・不合格者50人であるのでカイ2乗値は4.17となる。

カイ2乗値は自由度によるカイ2乗分布に従う。
自由度とは「ある代表値や合計値があるときに自由に値をとれる数」と定義される。
このケースでの自由度は今年の合格者数を決めると自動的に今年の不合格者数が決まることから分かるように、自由に値を取れる数=自由度は1であることが分かる。

このように自由度によってカイ2乗分布は異なる。

カイ2乗分布では確率が面積で表されており、例えば自由度1のカイ2乗分布ではカイ2乗値=3.841以上の面積の合計が5%でありカイ2乗値=3.841以上になる確率が5%以下になることを表す。
カイ2乗値とは計算式から分かるように「期待されたもの=帰無仮説からどれだけ離れているか」を表すので、カイ2乗値が大きいほど帰無仮説は遠のいていき対立仮説が近づいてくる。カイ2乗値をカイ2乗分布に当てはめて分かるp値を検定する前に決めた有意水準と比べて帰無仮説を棄却して対立仮説を採択するかどうか決める。
話を戻すが今回のケースでは自由度1,カイ2乗値=4.17であるので、p値=0.04となり有意水準を0.05に設定していた場合は帰無仮説が棄却されて対立仮説が採択される。
p値をどうやって算出したのかということになるが、自由度とカイ2乗値が分かったらp値はパソコンで計算できる。
これで感覚的に思っていた今年と例年では「差があった」ということがカイ2乗検定をすることで統計的に証明できた。
期待度数の求め方
上記の例では分かりやすいように期待度数を「合格者60人・不合格者40人」と決めつけているが、実際には期待度数もちゃんと計算して算出しないといけない。そこで期待度数を算出するまでの流れも含めてみる。
生徒の総数が一学年100人である某医学部の解剖学の試験では毎年40%、つまり40人が落ちるような難易度に試験が設定されて実際に毎年40人ぐらいが落ちていた。しかし、今年試験をやってみると50人が落ちてしまった。解剖学の試験の難易度は例年と何ら変わらないものだったので解剖学の教員は50人という人数が多いと思い、今年の生徒の質が例年と比べて劣っていたとかいうような、とにかく今年と例年では「差があった」のではないかと考えてカイ2乗検定を行った。
教員は今年が101回目の解剖学の試験であったため、これまで行われてきた100回の試験の合計の合格者数と不合格者数のデータを用いて今年と例年を比べた。
これまで行われてきた100回の試験の合計の合格率はぴったり60%であり、100回の試験の合計の合格者数=6000人・不合格者数=4000人であった。
まず今年の群と例年の群に分けて2×2表を作成する。

次に期待度数を求める。期待度数とは帰無仮説が成り立つときに「期待される数」のことである。
このケースでの帰無仮説は「今年と例年では差がない」という仮説なので、「全101回の試験の合計の不合格者数と合格者数」はそれぞれ「今年の群:例年の群=1:100の比」で構成されていることになる。

不合格者総数と合格者総数が決まっていて「今年と例年では差がない」場合にどうなるだろうかと考えると期待度数を算出しやすい。


期待度数が分かったらカイ2乗値を算出する。

自由度1,カイ2乗値=4.1208からp値をパソコンで算出するとp値=0.0423となる。
よって、有意水準を0.05に設定していた場合は帰無仮説が棄却されて対立仮説が採択される。
コメント
I always spent my half an hour to read this blog’s content every day along with a mug of coffee.
What’s up, just wanted to say, I enjoyed this blog post.It was helpful. Keep on posting!
Bright Starts Sesame Street Cookie Mania Teether On-the-Go Take-Along Toy, Ages 3-12 months ebba Little Pitter Pattern – 14″ Hippo
Beneficial document helps make frequent advance, appreciate it write about, this pile-up connected with expertise is usually to hold finding out, focus is usually the beginning of money.
I value the article post.Really looking forward to read more. Awesome.
I think this is a real great blog article.Much thanks again.
I like what you guys are usually up too. Such clever work and reporting! Keep up the very good works guys I’ve incorporated you guys to blogroll.
Thanks on your marvelous posting! I actually enjoyed reading it, you’re a great author.I will make certain to bookmark your blog and definitely will come back very soon. I want to encourage continue your great job, have a nice morning!
Hello There. I found your blog using msn. This is an extremely well written article.I’ll be sure to bookmark it and return to read more of your useful information. Thanksfor the post. I’ll certainly return.
modalert review provigil for sale provigil
purchase essays online – write thesis ed pills online
I am now not certain the place you are getting your information,however great topic. I needs to spend a while findingout much more or figuring out more. Thank youfor excellent information I was searchingfor this information for my mission.
abortion essay argumentative essay topics how to write a personal essaywhat is a definition essay
I savor, lead to I discovered exactly whatI used to be looking for. You have ended my 4 day long hunt!God Bless you man. Have a nice day. Bye
Hi there! I simply would like to give you a huge thumbs up for your great info you have got here on this post. I will be coming back to your blog for more soon.
Very well written article. It will be beneficial to everyone who utilizes it, including myself. Keep doing what you are doing – looking forward to more posts.
A big thank you for your post.Really thank you!
You completed a few fine points there. I did a search on the theme and found the majority of people will have the same opinion with your blog.
Im grateful for the blog post.Much thanks again. Great.
Aw, this was a really nice post. Spending some time and actual effort to make a very good article… but what can I say… I put things off a whole lot and never seem to get nearly anything done.
I really enjoy the blog post.Much thanks again. Really Great.
I cannot thank you enough for the blog post.Really looking forward to read more. Really Cool.
Thanks for the blog article.Much thanks again. Really Great.
I need to to thank you for this great read!! I absolutely enjoyed every little bit of it. I have got you bookmarked to look at new stuff you post…
allegra 40 tablets purchase zyrtec – benadryl tablets
Hello! I just wanted Where To Sell Digital Productsask if you ever have any issues with hackers?My last blog (wordpress) was hacked and I ended up losing a fewmonths of hard work due to no backup. Do you have anymethods to stop hackers?
hello!,I like your writing so so much! share we keep up a correspondence extra about your post on AOL? I need an expert in this house to unravel my problem. Maybe that is you! Looking ahead to look you.
I get pleasure from, result in I found exactly what I used to be taking a look for. You’ve ended my 4 day lengthy hunt! God Bless you man. Have a nice day. Bye
Generally I do not read article on blogs, but I would like to say that this write-up very compelled me to try and do so! Your writing style has been amazed me. Thanks, very nice post.
Major thanks for the post.Thanks Again. Will read on…
blood pressure meds blood pressure wrist monitorivermectin over counter eajd61
Really informative blog article.Much thanks again. Keep writing.
I haven’t checked in here for some time as I thought it was getting boring, but the last few posts are great quality so I guess I’ll add you back to my daily bloglist. You deserve it my friend
Im grateful for the blog article.Really looking forward to read more. Will read on…
You stated that very well. Shampoo To Use With Propecia
Hey, thanks for the blog article.Thanks Again.
Really enjoyed this post.Really looking forward to read more. Fantastic.
Fantastic article post.Really thank you!
I am so grateful for your article post.Really looking forward to read more.
Incredible! This blog looks exactly like my old one!It’s on a totally different subject but it has pretty much the same layoutand design. Excellent choice of colors!
Video Game Genshin Impact Cosplay Jean Gunnhildr Dandelion Knight Cosplay Outfit Knights of Favonius 4 Winds.
Sweet blog! I found it while surfing around on YahooNews. Do you have any tips on how to get listed in Yahoo News?I’ve been trying for a while but I never seem to get there!Thanks
wow, awesome blog post.Really thank you! Keep writing.
Very neat post.Thanks Again. Really Great.
Thanks-a-mundo for the article post.Really looking forward to read more. Cool.
Thanks for sharing, this is a fantastic article.Really thank you! Fantastic.
Great, thanks for sharing this post. Will read on…
Thanks a lot for the article.Really looking forward to read more. Will read on…
Thanks for the blog post.Really thank you! Much obliged.
Hey, thanks for the article.Really thank you! Really Cool.
Very neat article.Really looking forward to read more. Will read on…
Fantastic blog post.Really thank you! Keep writing.
Hello friends, its fantastic paragraph about teachingand entirely defined, keep it up all the time.
I appreciate you sharing this blog article.Really thank you! Awesome.
Very informative blog.Thanks Again. Will read on…
Great blog post.Much thanks again. Keep writing.
Hey, thanks for the article post.Really thank you! Awesome.
Really enjoyed this blog.Really looking forward to read more. Keep writing.
I appreciate you sharing this blog article.Thanks Again. Fantastic.
Nice post. I was checking constantly this blog and I’m impressed!Very useful info specifically the last part I care for such information much.I was seeking this certain info for a long time. Thank you and good luck.
Hi! I’m at work surfing around your blog from my new iphone 4! Just wanted to say I love reading your blog and look forward to all your posts! Keep up the great work!
F*ckin’ amazing things here. I’m very glad to peer your article. Thanks so much and i am looking ahead to touch you. Will you kindly drop me a e-mail?
A big thank you for your post.Thanks Again. Great.
I am no longer positive where you are getting your info, however good topic. I must spend a while studying more or working out more. Thanks for wonderful information I was searching for this information for my mission.
fantastic issues altogether, you simply received a new reader. What might you suggest in regards to your put up that you just made a few days in the past? Any certain?
seroquel contraindications seroquel high reddit
Great, thanks for sharing this post.Thanks Again. Will read on…
Hey there! This is my first visit to your blog! We area team of volunteers and starting a new project in a community in the same niche.Your blog provided us useful information to work on. You have done a extraordinary job!
Great, thanks for sharing this blog article.Much thanks again. Will read on…
Hello, you used to write excellent, but the last few posts have been kinda boring… I miss your tremendous writings. Past several posts are just a bit out of track! come on!
I think this is a real great blog article.Really looking forward to read more. Fantastic.
losartan hydrochlorothiazide recall lisinopril and ibuprofen
Resjez – reliable essay writing service Txprkc xnckfb
Great post. Will read on…
Im obliged for the post. Much obliged.
Looking forward to reading more. Great article post.Much thanks again. Great.
Very neat post.Really looking forward to read more. Keep writing.
Im obliged for the article post.Much thanks again. Really Great.
I am so grateful for your article post.Really looking forward to read more. Cool.
Major thankies for the article post.Really thank you! Really Great.
Very informative blog article.Really looking forward to read more. Much obliged.
Say, you got a nice article.Really thank you! Much obliged.
I cannot thank you enough for the blog post.Thanks Again. Much obliged.
I am not sure where you’re getting your information, but goodtopic. I needs to spend some time learning more or understanding more.Thanks for excellent info I was looking for this information for my mission.
Im grateful for the blog article.
It’s exhausting to search out knowledgeable people on this matter, but you sound like you recognize what you’re speaking about! Thanks
great points altogether, you just received a new reader. What could you suggest in regards to your put up that you simply made some days ago?Any sure?Also visit my blog :: Infinuity CBD Gummies Reviews
Greetings! Very useful advice within this article! It’s the little changes that make the most important changes. Many thanks for sharing!
Muchos Gracias for your blog article.Really looking forward to read more. Awesome.
Great info. Lucky me I found your blog by chance (stumbleupon). I’ve saved as a favorite for later!
Usually I don’t learn article on blogs, but I wish to say that this write-up very forced me to check out and do it! Your writing taste has been surprised me. Thank you, very nice post.
Great, thanks for sharing this blog article. Cool.
Thanks for sharing, this is a fantastic blog post. Cool.
Wow, great post.Really thank you! Want more.
I really enjoy the blog post.Much thanks again. Want more.
What’s up i am kavin, its my first occasion to commenting anywhere,when i read this post i thought i could also make comment due to this sensiblepiece of writing.
I think this is a real great blog post.Much thanks again.
Hello colleagues, how is the whole thing, and what you wish for to say about this article, in my view its really remarkable in support of me.
Very informative post.Much thanks again. Really Cool.
Looking forward to reading more. Great blog.Thanks Again. Fantastic.
You stated that wonderfully. What Is The Medicine Provigil Used For modafinil side effects
You could certainly see your skills in the article you write. The sector hopes for more passionate writers like you who are not afraid to say how they believe. All the time go after your heart.
ambien cr canadian pharmacy alprazolam online pharmacy
Thank you for your article post.Really thank you! Really Great.
Appreciate you sharing, great blog article.Much thanks again. Want more.
Hey, thanks for the blog post.Really looking forward to read more. Really Great.
Aloha! Interesting material! I’m really appreciate it. It will be great if you’ll read my first article!)
A fascinating discussion is definitely worth comment. I do think that you need to write more about this topic, it might not be a taboo matter but generally people do not speak about such issues. To the next! Kind regards!!
This is one awesome post.Much thanks again. Much obliged.
Table 1Supervisory Stress Scenario201120122013Real GDP1 [See table footnote 1.
Regards for helping out, wonderful info. “Hope is the denial of reality.” by Margaret Weis.
Nice read, I just passed this onto a friend who was doing some research on that. And he just bought me lunch as I found it for him smile Therefore let me rephrase that: Thanks for lunch!
Thank you ever so for you blog post.Really thank you! Much obliged.
Thanks for the auspicious writeup. It in truth used to be a enjoyment account it.Glance complicated to far brought agreeable from you!However, how could we be in contact?
I value the post.Really thank you! Fantastic.
Very good post.Really thank you! Want more.
I really enjoy the blog post.Really looking forward to read more. Keep writing.
I loved your blog.Really thank you!
A big thank you for your blog.Really thank you! Awesome.
I truly appreciate this article.Thanks Again. Really Great.
Say, you got a nice post.Thanks Again. Want more.