Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

9

CHAPTER OUTLINE
9-1 Hypothesis Testing
9-1.1 Statistical Hypotheses
Tests of Hypotheses
for a Single Sample

9-4 Tests of the Variance & Standard


Tanım:
HİPOTEZ TESTLERİ

• Gözlem ya da deneme sonucu elde


9-1.2 Tests of Statistical Hypotheses Deviation of a Normal Distribution.
9-1.3 1-Sided & 2-Sided Hypotheses
9-1.4 P-Values in Hypothesis Tests
9-4.1 Hypothesis Tests on the Variance
9-4.2 Type II Error & Choice of Sample Size
edilmiş sonuçların, rastlantıya bağlı olup
9-1.5 Connection between Hypothesis
Tests & Confidence Intervals
9-5 Tests on a Population Proportion
9-5.1 Large-Sample Tests on a Proportion
olmadığının incelenmesinde kullanılan
9-1.6 General Procedure for
Hypothesis Tests
9-5.2 Type II Error & Choice of Sample Size
9-6 Summary Table of Inference Procedures
istatistiksel yöntemlere hipotez testleri
9-2 Tests on the Mean of a Normal
Distribution, Variance Known
for a Single Sample
9-7 Testing for Goodness of Fit
denir.
9-2.1 Hypothesis Tests on the Mean
9-2.2 Type II Error & Choice of Sample Size
9-8 Contingency Table Tests
9-2.3 Large-Sample Test 9-9 Non-Parametric Procedures
9-3 Tests on the Mean of a Normal 9-9.1 The Sign Test
Distribution, Variance Unknown 9-9.2 The Wilcoxon Signed-Rank Test
9-3.1 Hypothesis Tests on the Mean 9-9.3 Comparison to the t-test
9-3.2 Type II Error & Choice of Sample Size

HİPOTEZ TESTLERİ HİPOTEZ TESTLERİ


• Hipotez testi sayesinde örnek istatistiklerine • Fakat örneklem istatistiği test edilen
dayanılarak ana kütle parametreleri hakkında parametrik değerden çok farklı ise hipotez
belli bir güven seviyesinde karar verilebilir. doğru olarak kabul edilmez, hipotez
reddedilir.
• Hipotez testini uygulayabilmek için öncelikle
sıfır hipotezi (null hypothesis) ve alternatif
hipotezin belirlenmesi gerekir.

1
Hipotez Testleri Hipotez Testleri
• Uygulamada çoğu zaman örneklem istatistikleri • Elbette ki üretim prosesinde yapılan bir değişiklikten sonra
yardımıyla ana kütle parametreleri hakkında bir karara elde edilen ölçüm sonuçları ile önceki ölçüm sonuçları
varmaya da çalışılmaktadır. Meselâ arasında farklılıklar çıkacaktır.
• Bir makine üzerinde yapılan bir ayarlamanın kusurlu mamul • Bu farklılık iki sebepten kaynaklanmış olabilir.
oranını düşürüp düşürmediği,
• Birincisi rassal sebeplerden kaynaklanan farklılıklar,
• yeni geliştirilen bir ilacın hastalığın tedavisinde etkin olup
olmadığı,
ikincisi ise yapılan ayarlamadan kaynaklanan farklılıklardır.
• Üretim prosesinde yapılan bir değişikliğin mamul kalitesini • Üretim prosesinde yapılan değişikliğin kaliteyi yükselttiğine
yükseltip yükseltmediği, karar verebilmek için bu farkın rassal sebeplerden ileri
• makine ayarında yapılan bir değişikliğin varyansı değiştirip gelmeyecek kadar önemli bir fark olması gerekir.
değiştirmediği veya • Bu farkın belirlenebilmesi için bazı istatistik testlerden
• geliştirilen bir öğretim sisteminin eskisine göre bir farklılık faydalanılır.
gösterip göstermediği gibi konularda karar verilmesi gibi.
• İşte bu testlere hipotez testleri adı verilir.

Hipotez Testleri Hipotez Testleri


• Genel anlamda hipotez belli bir konu hakkında ileri sürülen • Üretilen bütün mamullerin gözlemlenmesi çoğu zaman
iddia dır. İstatistik hipotez testleri ise belli bir kütle imkansızdır.
parametresinin (µ,  vs.) değeri hakkında ileri sürülen ve • Bunun yerine bu mamulün üretimi esnasında rastgele
geçerliliği istatistik testlerle ortaya konabilen gözlemler yaparak yani örnekleme yaparak mamulün
varsayımlardır. ortalama üretim süresi hakkında ileri sürülen iddia belli bir
• Mesela belli bir mamulün üretim süresinin ortalaması için risk düzeyinde test edilebilir.
15 dakika olduğu şeklindeki varsayım bir hipotezdir. Bu • Bunun için söz konusu parametrenin (burada ortalama)
hipotezin doğru ya da yanlış olması mümkündür. Bunun örnekleme dağılımının bilinmesi gerekir.
doğruluğunu test etmek için kullanılabilecek en basit • Önceki bölümde ortalamaların, oranların, farkların,
yaklaşım ana kütle için tam sayım yapmaktır. Yani üretilen varyansların ve varyans oranlarının dağılımı incelenmiştir.
bütün mamullerin gözlemlenmesidir.
• İşte bu dağılımlar dikkate alınarak hipotezler test edilir.

Sıfır hipotezi (H0) ve alternatif hipotez (H1) Sıfır hipotezi ve alternatif hipotez
• İstatistik hipotezlerin testinde bir hipotezle onun karşıtı • Bir problemin çözümüne başlamadan önce
olan diğer bir hipotezden hangisinin örneklemden elde oluşturulan hipoteze göre, ana kütlenin bilinen
edilen sonuçla daha iyi bağdaştığı araştırılmaktadır. değeri ile örnekten elde edilen değeri arasında
Karşılaştırılan iki hipotezden birine ‘‘Sıfır Hipotezi (H0)’’ “önemli bir fark olmadığı’’ kabul edilir, ki buna H0
diğerine ‘‘Alternatif Hipotez (H1 veya Ha)’’ adı verilir. hipotezi denir. Söz konusu iki değer arasında
• Hipotezlerin daima örnekleme yapılmadan önce ‘‘önemli bir farkın olduğunu” ileri süren diğer
oluşturulması gerekir. hipotez ise H1 alternatif hipotez olur.
• Çünkü örnekleme yapıldıktan sonra bu sonuçlara göre • H0 hipotezi daima bir kütlenin parametresinin belli bir
mutlaka reddedilecek veya kabul edilecek hipotezler değere eşitliği şeklinde oluşturulurken, alternatif hipotez
oluşturulabilir. parametrenin bu değerden büyük, bu değerden küçük
• Bu durum bilimsel araştırmadaki objektiflik kriterine ya da bu değerden farklı olduğu şeklinde teşkil edilir.
aykırıdır. Alternatif hipotezin yönüne göre hipotez testi tek taraflı
ya da çift taraflı olarak yapılır.

2
Sıfır hipotezi ve alternatif hipotez Sıfır hipotezi ve alternatif hipotez
• Örnek: bir işletmede geçmiş kayıtlara göre belli bir • Üretim mühendisi mamulün üretim süresinin 25 dakikadan
mamulün üretim süresinin 25 dk olduğu bildiriliyor. daha az sürede yapıldığını düşünüyorsa, bu durumda
Bu departmanda çalışan üretim sorumlusu mamulün hipotezler şöyle oluşturulur.
daha uzun sürede üretildiğini düşünmektedir. Bu H0: µ = 25 dk. ( Mamulün üretim süresi 25 dakikadır.)
düşünceyi test etmek için hipotezler şöyle oluşturulur. H1: µ < 25 dk. ( Mamulün üretim süresi 25 dk’dan azdır.)
H0: µ = 25 dk. ( Mamulün üretim süresi 25 dakikadır.)
Böyle bir durumda yine hipotez testi tek taraflı olarak
H1: µ > 25 dk. ( Mamulün üretim süresi 25 dk’dan yapılacaktır. Test işlemi için dağılımın sol tarafı dikkate
fazladır.) alınacaktır. Çünkü alternatif hipotezin yönü küçüklük
Burada hipotez tek taraflıdır ( alternatif hipotez tek şeklindedir.
yönlüdür.), Test işlemi dağılımın sağ tarafı dikkate
alınarak yapılmalıdır.

Sıfır hipotezi ve alternatif hipotez 9-1 Hypothesis Testing


• Mühendis üretim süresinin 25 dakika olmadığını 9-1.3 One-Sided and Two-Sided Hypotheses
düşünüyorsa, yani 25 ten az ya da çok olabileceğini
düşünüyorsa, bu durumda hipotezler şöyle oluşturulur. Two-Sided Test:
H0: µ = 25 dk. ( Mamulün üretim süresi 25 dakikadır.)
H1: µ ≠ 25 dk. ( Mamulün üretim süresi 25 dakika değildir.)
• Böyle bir durumda hipotez testi çift taraflı olacaktır.Test işlemi
için dağılımın hem sağ, hem de sol tarafı dikkate alınacaktır.
Çünkü alternatif hipotezde her iki taraftaki farklılıklar dikkate One-Sided Tests:
alınmaktadır.

9-1 Hypothesis Testing Hipotez testlerinde yapılan hatalar

9-1.1 Statistical Hypotheses


Two-sided Alternative Hypothesis Bir Mahkeme Jürisi Hipotez Testi
null hypothesis
Gerçek Durum Gerçek Durum
alternative hypothesis Karar Masum Suçlu Karar H0 Doğru H0 Yanlış

One-sided Alternative Hypotheses Masum Doğru H0 red 1-


edilemez
I. Tip
Suçlu HATA H0 red Hata ()

H0: Masumdur

3
Hipotez testlerinde yapılan hatalar Hipotez testi ile ilgili bazı kavramlar
• : anlam düzeyi (I. Tip hata riski)
• Yukarıdaki tablo incelendiğinde hipotez testlerinde
• 1- : Güven düzeyi (Doğru hipotezin kabul olasılığı)
yapılan iki hatanın neler olduğu anlaşılmaktadır.
• β: II. Tip hata riski ( yanlış hipotezin kabul olasılığı)
• Ho Hipotezi doğru olduğu halde reddedilirse bir hata • 1- β: Testin gücü ( Yanlış hipotezin reddi olasılığı)
işlenmiş olur ki buna 1. tip hata ya da () hatası adı • Aşağıdaki şekilde yukarıdaki ifadelerin dağılım üzerindeki
verilir. Bu hataya üretici riski de denmektedir. yerleri gösterilmiştir. Şekil hipotezlerin aşağıdaki gibi olması
•  = P(H0 red / H0 doğru) durumuna göre dizayn edilmiştir.
• H0: µ = µa
• H1: µ = µb

9-1 Hypothesis Testing Tek Taraflı Z Testi Örneği


9-1.6 General Procedure for Hypothesis Tests
1. From the problem context, identify the parameter of interest. • Bir kutu mısır gevreğinin ağırlığının 368 gr’dan
2. State the null hypothesis, H0 .
fazla olduğu iddia edilmektedir. Ayrıca  = 15
gram olduğunu belirtmiştir.
3. Specify an appropriate alternative hypothesis, H1.
4. Choose a significance level, .
n= 25 kutuluk bir örnek alınmış veX = 372.5 gr.
5. Determine an appropriate tst statistic.
olarak bulunmuştur. 0.05 seviyesinde test
6. State the rejection region for the statistic. ediniz.
7. Compute any necessary sample quantities, substitute these into the
equation for the test statistic, and compute that value.
8. Decide whether or not H0 should be rejected and report that in the
problem context.

Çift Taraflı Z Testine Örnek:


Çözüm
Bir fabrikada üretilmekte olan vidaların boylarının
H0:   368 Test İstatistiği: ortalaması 100 mm, ve standart sapması 2 mm olan normal
H1:  > 368 X  372.5  368 dağılım gösterdikleri bilinmektedir. Makinalarda olan bir
 = 0.05 Z   150
. arıza giderildikten sonra üretilen vidalardan alınan 9 vidalık
 15
n = 25 bir örneğin bot ortalaması 102 mm olarak bulunmuştur.
n 25 Makinalardaki arıza giderilirken vidaların boyunun
• Kritik değer:
Karar: ayarı bozulmuş mudur? =0.05 için test ediniz ve
RED bölgesi yorumlayınız.
 = .05 için H0 hipotezi 100mm
1. Adım: Hipotezlerin belirlenmesi
=.05 reddedilemez. H 0 :   100mm
=2mm
Yorum: H1 :   100mm
0 Z 2. Adım: Test istatistiğinin hesaplanması n=9
Ortalamanın 368
X   102  100
Zhesap=1.5 Ztablo=1.645 gr.dan fazla olduğuna Z hesap   3 X  102mm
dair yeterli kanıt yoktur.  2 9
n

4
3. Adım: Kritik değerlerin belirlenmesi: 4. Adım: İstatistiksel karşılaştırmanın yapılması:
Standart Normal H0 RED H0 RED
.500 Dağılım Tablosu
- .025 
.475 Z .05 .06 .07  /2 = .025
 /2 = .025
1.6 .4505 .4515 .4525
 /2 = .025
 /2 = .025 0
1.7 .4599 .4608 .4616 Zhesap=3
 -Ztablo= -1.96 Ztablo= 1.96
-1.96 0 1.96 Z 1.8 .4678 .4686 .4693
5. Adım: Karar verme ve yorumlama:
 1.9 .4744 .4750 .4756
Zhesap değeri H0 RED bölgesine düştüğü için H0 hipotezi reddedilir, yani
vidaları boy ortalaması 100 mm’den farklıdır, makinanın ayarı
bozulmuştur.

Çift Taraflı Z testi örneği:


Hipotez Testinin Sınanması Örnekleri
HİPOTEZ TESTİ
Bu sene DEÜ.İİBF İktisat bölümünden mezun olacak Örnek 1: Bir fırının ürettiği ekmek ortalama ağırlığı 500 gram olduğu iddia edilmektedir.
Fırını denetleyen belediye yetkilileri 100 adet örneğin ortalama ağırlığını 490 gram ve
öğrencilerin mezuniyet not ortalamalarının 70 olduğu iddia
standart hatasını 30 gram bulmuşlardır. %1 anlam düzeyinde (%99 güven aralığında) ekmeğin
edilmektedir. Bu amaçla mezuniyet sonrası 36 öğrencilik bir ortalama ağırlığı 500 gram kabul edilebilir mi test ediniz.

örnek alınmış ve mezuniyet ortalamalarının 66, standart


Hipotez testini kuralım.
sapmasının 12 olduğu bulunmuştur. Bu veriler ışığında iddiayı
H0 : µ = 500 gr.
=0.01 için test ediniz.
H1 : µ ≠ 500 gr.
H0 : =70 1. Aşama: Örneklemden yola çıkılarak Zh degeri hesaplanır.

H1 : 70 X  x X  66  70 4
Z     2
sx s 12 / 6 2 𝐗− µ 𝟒𝟗𝟎 − 𝟓𝟎𝟎
𝐙𝐡 = = = −𝟑. 𝟑
𝛔𝐱 𝟑𝟎
n 𝟏𝟎
III.   0.01 için z tablo değeri 2.58 IV. |zhes|<|ztab| H0 red edilemez.

HİPOTEZ HİPOTEZ TESTİ


TESTİ
2. Aşama: Hesaplanan Zh değeri Zk değeri ile karşılaştırılır.

Zh ( -3.3) > Zk ( -2.58) oldugundan H0 hipotezi reddedilir ve alternatif hipotez


kabul edilir.
Yorum: Fırının ürettiği ekmeklerin ortalama ağırlığı 500 gramdan farklıdır.
Not: Z değerlerini mutlak değerler olarak karşılaştırıyoruz.

-3.3 -2.58 0 +2.58

5
2- SASKİ yöneticileri, Sakarya halkının ortalama aylık su tüketimini en az 20 litre

HİPOTEZ TESTİ Değerlendirme Soruları


olabileceğini düşünmektedir. Eğer yöneticilerin bu düşüncesi doğruysa Sakarya su sorunuyla
karşı karşıya kalabilir. Bu amaçla, rassal olarak seçilen, 1000 kişiden veriler derlenmiş ve
aylık ortalama su tüketiminin 22 litre ve standart sapmasının da 8 litre olduğu tespit edilmiştir.
SASKİ yöneticilerinin kaygılanmalarının doğru olup olmadığını α = 0.01 anlam düzeyini (%
99 güven düzeyi) kullanarak karar veriniz.
2. Aşama: Hesaplanan Zh değeri Zk değeri ile karşılaştırılır.
Çözüm:

Hipotez H0 : µ = 20 litre
Zh ( 1.5) > Zk ( 1.65) olduğundan H0 hipotezi reddedilemez. H1 : µ > 20 litre

n = 1000

Yorum: %95 güven düzeyinde ilaç ağrıyı en geç 60 dakika içinde geçirmektedir. 𝑋 = 22 litre

µ = 20 litre

s = 8 litre

n > 30 olduğu için normal dağılıma sahiptir. Z değeri tablodan % 99 güven düzeyi için 2.33
bulunur. Bu bilgilerden sonra 2 aşama ile çözüme ulaşılır.

1. Aşama: Örneklemden yola çıkılarak Zh degeri hesaplanır.

𝐬 𝟖
𝐬𝐱 = = = 𝟎. 𝟐𝟓𝟑
𝒏 𝟏𝟎𝟎𝟎

1.5 1.65 𝑿− µ 𝟐𝟐 − 𝟐𝟎
𝐙𝐡 = = = 𝟕. 𝟗
𝐬𝐱 𝟎. 𝟐𝟓𝟑
2. Aşama: Hesaplanan Zh değeri Zk değeri ile karşılaştırılır.
Zh ( 7.9) > Zk ( 2.33) oldugundan H0 hipotezi reddedilir ve alternatif hipotez kabul edilir.
Yorum: Kişilerin aylık su tüketimi 20 litreden fazladır.

3- Bir çikolata firması 500 gramlık paketler halinde üretim yapmayı planlamaktadır. Üretimin
Değerlendirme Soruları Değerlendirme Soruları
planlandığı gibi gerçekleşip gerçekleşmediğini kontrol etmek için rassal olarak seçilen 100
paketin ortalama ağırlığı 495 gram ve standart sapma da 20 gram olarak bulunmuştur.
Üretimin planlandığı gibi gerçekleşip gerçekleşmediğini α = 0.05 anlam düzeyini (% 95
güven düzeyi) kullanarak karar veriniz.

Çözüm:

Hipotez H0 : µ = 500 gram

H1 : µ ≠ 500 gram

n = 100

𝑋 = 495 gram

µ = 500 gram

s = 20 gram

n > 30 olduğu için normal dağılıma sahiptir. Z değeri tablodan % 95 güven düzeyi için 1.96
bulunur. Bu bilgilerden sonra 2 aşama ile çözüme ulaşılır.

1. Aşama: Örneklemden yola çıkılarak Zh degeri hesaplanır.

𝐬 𝟐𝟎
𝐬𝐱 = = =𝟐
𝒏 𝟏𝟎𝟎

𝑿− µ 𝟒𝟗𝟓 − 𝟓𝟎𝟎
𝐙𝐡 = = = −𝟐. 𝟓
𝐬𝐱 𝟐

2. Aşama: Hesaplanan Zh değeri Zk değeri ile karşılaştırılır.


Değerlendirme Soruları
Zh ( 2.5) > Zk ( 1.96) oldugundan H0 hipotezi reddedilir ve alternatif hipotez kabul
edilir.
Yorum: Paketlerin ağırlığı 500 gramdan farklıdır.

6
ORTALAMALAR ARASI FARKLARLA İki Ortalama Farkı İçin Test İstatistiği
İLGİLİ HİPOTEZ TESTLERİ Ortalamalar arası farklarla ilgili hipotez testlerine ait test
istatistiği
H 0 : 1   2
Çift Kuyruk Testi  biliniyor ise:
H1 : 1   2
( X 1  X 2 )  ( 1   2 ) ( X1  X 2 )
H 0 : 1   2 Z 
Sol Kuyruk Testi  X X  12  22
H1 : 1   2
1 2

n1 n2

H 0 : 1   2 Anakütle varyansları bilinmediğinde bunların yerine


Sağ Kuyruk
H1 : 1   2 örnek varyansları kullanılır.Sıfır hipotezinin doğru
Testi
olduğu varsayımı ile hareket edildiğinden 1-2 farkı
sıfır kabul edilir.

 bilinmiyor fakat ÖRNEK


örnek hacimleri  30 ise: Aynı faaliyet kolunda üretim yapan fabrikaların
( X  X 2 )  ( 1   2 ) ( X 1  X 2 ) birincisinden tesadüfi olarak seçilen 80 mamulün
Z 1 
s X1  X 2 s12 s22 ortalama dayanma süresi 135 gün ve standart

n1 n2 sapması 15 gün; ikincisinden alınan 95 mamulün ise
ortalama dayanma süresi 130 gün ve standart
Sıfır hipotezi örneklerin aynı anakütleden alındığını
belirttiği için tersi ispatlanmadığı sürece s1 ve s2 sapması 18 gündür. %1 önem seviyesinde , birinci
değerlerinin birbiriyle homojen olduğunu varsayılır fabrikada üretilen mamullerin ortalama dayanma
ve ortak varyans hesaplanır. süresinin daha fazla olduğunu söyleyebilir miyiz?
( X1  X 2 ) H 0 : 1   2
n1s12  n2 s22 Zh 
s 
2
1 1
s2 (  ) H1 : 1   2   0.01
n1  n2 n1 n2 Z tab  2.33
0.5-0.01=0.4900

7
9-3 Tests on the Mean of a Normal
n s 2  n2 s22 80(15) 2  95(18) 2 Distribution, Variance Unknown
s2  1 1   286.94
n1  n2 80  90
9-3.1 Hypothesis Tests on the Mean
( X1  X 2 ) (135  130)
Zh    1.95 One-Sample t-Test
2 1
s (  )
1 1 1
286.94  
n1 n2  80 95 

P( Z  1.95)  0.5  0.4744  0.0512

%1 önem seviyesinde sıfır hipotezi kabul edilerek birinci


fabrikada üretilen mamullerin ortalama dayanma
süresinin diğerlerinden daha fazla olmadığına karar
verilir.

9-3 Tests on the Mean of a Normal


Distribution, Variance Unknown

9-3.1 Hypothesis Tests on the Mean

Figure 9-9 The reference distribution for H0:  = 0 with critical


region for (a) H1:   0 , (b) H1:  > 0, and (c) H1:  < 0.

9-3 Tests on the Mean of a Normal


Distribution, Variance Unknown
Example 9-6

Figure 9-10
Normal probability
plot of the
coefficient of
restitution data
from Example 9-6.

8
9-3 Tests on the Mean of a Normal
Distribution, Variance Unknown
16
Example 9-6

16

9-3 Tests on the Mean of a Normal 9-3 Tests on the Mean of a Normal
Distribution, Variance Unknown Distribution, Variance Unknown
Example 9-6 Example 9-6

9
9-4 Hypothesis Tests on the Variance and 9-4 Hypothesis Tests on the Variance and
Standard Deviation of a Normal Distribution Standard Deviation of a Normal Distribution
9-4.1 Hypothesis Test on the Variance 9-4.1 Hypothesis Test on the Variance

9-4 Hypothesis Tests on the Variance and 9-4 Hypothesis Tests on the Variance and
Standard Deviation of a Normal Distribution Standard Deviation of a Normal Distribution
9-4.1 Hypothesis Test on the Variance 9-4.1 Hypothesis Test on the Variance

10
9-4 Hypothesis Tests on the Variance and 9-4 Hypothesis Tests on the Variance and
Standard Deviation of a Normal Distribution Standard Deviation of a Normal Distribution
Example 9-8 Example 9-8

11
ORANLARLA İLGİLİ HİPOTEZ TESTİ Oranlar arası farklarla ilgili hipotez testlerine ait test
H 0 : P  P0
Çift Kuyruk Testi istatistiği
H1 : P  P0
( p1  p2 )  ( P1  P2 )
Sol Kuyruk H 0 : P  P0 Zh 
P1 (1  P1 ) P2 (1  P2 )
Testi H1 : P  P0 
n1 n2
H 0 : P  P0
Sağ Kuyruk Testi Anakütle oranları bilinmediğinde bunun yerine örnek
H1 : P  P0 oranları kullanılabilir. Sıfır hipotezinin doğru olabileceği
Örnekten hesaplanan oran p ile gösterilirse oranlarla ilgili test varsayımıyla hareket edildiğinden test istatistiği
istatistiği; formülündeki P1-P2 farkı sıfır kabul edilir. Test istatistiği
aşağıdaki gibidir:
pP pP
Z  ( p1  p2 )
p P(1  P) Zh 
p1 (1  p1 ) p2 (1  p2 )
n 
n1 n2

Örnek
Sıfır hipotezi örneklerin aynı anakütleden alındığını Bir video kaset kiralayıcısı macera filmi kiralamanın yöredeki
belirttiği için p1 ve p2 değerleri birbiriyle homojendir. erkek ve kadınlar itibariyle farklılık gösterip göstermediğini
Aşağıdaki ortak varyans hesaplanır. merak etmektedir. Söz konusu şahıs belli bir zaman dönemi
içersinde dükkanına gelen 60 erkekten 51’nin ve 40
n1 p1  n2 p2
p kadından 20’sinin macera filmi kiraladığını tespit etmiştir. Bu
n1  n2 verilere göre yöredeki erkeklerin kadınlardan daha fazla
macera filmi kiraladığını % 5 önem seviyesinde söyleyebilir
( p1  p2 )
Zh  misiniz?
p1  0.85 p2  0.50
1 1
p (1  p )(  ) H 0 : P1  P2
n1 n2 60(0.85)  40(0.50)
H1 : P1  P2 Ztab1.645 p  0.71
60  40
0.85  050
Zh   3.78 H0 RED
1 1
69 0.71(1  0.71)(  )
60 40

Hipotez testlerinde yapılan hatalar Hipotez testi ile ilgili bazı kavramlar
• : anlam düzeyi (I. Tip hata riski)
• Yukarıdaki tablo incelendiğinde hipotez testlerinde
• 1- : Güven düzeyi (Doğru hipotezin kabul olasılığı)
yapılan iki hatanın neler olduğu anlaşılmaktadır.
• β: II. Tip hata riski ( yanlış hipotezin kabul olasılığı)
• Ho Hipotezi doğru olduğu halde reddedilirse bir hata • 1- β: Testin gücü ( Yanlış hipotezin reddi olasılığı)
işlenmiş olur ki buna 1. tip hata ya da () hatası adı • Aşağıdaki şekilde yukarıdaki ifadelerin dağılım üzerindeki
verilir. Bu hataya üretici riski de denmektedir. yerleri gösterilmiştir. Şekil hipotezlerin aşağıdaki gibi olması
•  = P(H0 red / H0 doğru) durumuna göre dizayn edilmiştir.
• H0: µ = µa
• Diğer bir hata ise H0 yanlış olduğu halde kabul
edilmesidir. Buna da 2. tip hata ya da (β) hatası adı • H1: µ = µb
verilir. Bu hataya tüketici riski de denmektedir.
• β= P(H0 kabul/ H0 yanlış)

12
Hipotez testlerinde yapılan hatalar Hipotez testlerinde yapılan
hatalar
• Hipotez testlerinin daha güvenilir olması için
Bir Mahkeme Jürisi Hipotez Testi
hataların asgariye indirilmesi gerekir.
Gerçek Durum Gerçek Durum • Ancak bu o kadar kolay değildir.
Karar Masum Suçlu Karar H0 Doğru H0 Yanlış • Çünkü , I.Tip hatayı azaltmaya çalışırken II.Tip
Masum Doğru HATA H0 red 1-
II. Tip hata büyüyecektir.
Hata ()
edilemez • Yani, belli bir örnek hacmi için bu hatalardan biri
Testin
HATA Doğru
I. Tip Gücü azaltılırken diğeri artırılmış olacak.
Suçlu H0 red Hata () (1 - )

H0: Masumdur

Hipotez testlerinde yapılan


hatalar Örnek-1. Bir ilacın zehirleme tesiri
Her iki hata tipini de azaltmanın en ideal yolu yapmadığı iddia edilmektedir.
örnek hacminin büyütülmesidir.
H0 : İlacın zehirlenme tesiri vardır.
Büyük örnek alınması ise zaman kaybı ve
maliyetin yükselmesine sebep olur.
I.Tip Hata: İlacın zehirlenme tesiri var iken
H0 reddedildi. Yani ilacın zehirleme tesiri
Böyle durumlarda I.Tip ve II.Tip hatalardan olmadığına karar verildi.
hangisinin daha önemli olduğuna karar vermek
gerekir.

Hipotez testi ile ilgili bazı kavramlar


• Örnek hacmi sabit kalırken, olasılığının azalması 
Sonuç: İlacın zehirleme tesiri yok diye olasılığının artmasına sebep olurken, aksine 
hastaya verildi ve hasta zehirlendi. olasılığının artması  olasılığının azalmasına sebep
olmaktadır. Hem I. tip hatanın hem de II. tip hatanın
birlikte azaltılması isteniyorsa,örnek hacminin
II.Tip Hata arttırılması yoluna gidilir. Ancak bu çoğu zaman pahalı,
bazen de imkansızdır. Dolayısıyla böyle durumlarda
I. tip ve II. tip hatalardan hangisinin daha önemli
olduğuna karar vermek suretiyle  ve  değerleri uygun
şekilde belirlenmelidir.

13
Hipotez testlerinde yapılan hatalar AQL, LTPD, Consumer’s Risk (α) &
Producer’s Risk (β)
• AQL is the small % of defects that
Bir Mahkeme Jürisi Hipotez Testi consumers are willing to accept;
order of 1-2%
• LTPD is the upper limit of the
Gerçek Durum Gerçek Durum percentage of defective items
consumers are willing to tolerate
Karar Masum Suçlu Karar H0 Doğru H0 Yanlış
• Consumer’s Risk (α) is the chance
of accepting a lot that contains a
H0 red II. Tip
Masum Doğru HATA 1- greater number of defects than the
edilemez Hata () LTPD limit; Type II error
• Producer’s risk (β) is the chance a
Testin
I. Tip Gücü
lot containing an acceptable quality
Suçlu HATA Doğru H0 red Hata () (1 - ) level will be rejected; Type I error

H0: Masumdur

Producer’s Risk -  Consumer’s Risk - 


• Producer wants as many lots accepted by
consumer as possible so • Consumer wants to make sure that no bad lots are
accepted
– Producer “makes sure” the process produces a level
of fraction defective equal to or less than: – Consumer says, “I will not accept a lot if percent defective
is greater than or equal to p2”
p1 = AQL = Acceptable Quality Level p2 = LTPD = Lot Tolerance Percent Defective

 is the probability that a good lot will be rejected by  is the probability a bad lot is accepted by the consumer
the consumer even though the lot really has a fraction when the lot really has a fraction defective  p2
defective  p1
 Lot accepted given that lot 
 Lot is rejected given that process  • That is,   P 
  P   has unacceptable quality level 
• That is,  has an acceptable quality level 

  P  Lot is rejected p  AQL    P  Lot accepted p  LTPD 


5/15/2022 IENG 486 Statistical Quality & Process Control 81 5/15/2022 IENG 486 Statistical Quality & Process Control 82

Hipotez testi ile ilgili bazı kavramlar α - Criticism


• Anlam düzeyi: Doğru hipotezin reddi (I. Tip hata) riski • Generally, the analyst controls the type I error
olup, test işlemlerine geçmeden önce belirlenen bir probability α when he or she selects the critical
olasılık düzeyidir.  için genellikle 0,01, 0,05 gibi values.
olasılıklar seçilir. Birinci tip hata yapma riskini azaltmak
için ’ nın küçük seçilmesi gerekir. Ancak ’nın küçük
• Thus, it is usually easy for the analyst to set the
seçilmesi II. Tip hata (yanlış hipotezin kabulü) (β) riskini type I error probability at (or near) any desired
artırır. Yani ’yı küçük tutmak ana kütle value.
parametresinden daha uzak olan örnek istatistiklerini de
kabul bölgesi içine dahil etmek demektir.
• Because the analyst can directly control the
• Testin Gücü: H0 hipotezi yanlış olduğunda H0 hipotezini
probability of wrongly rejecting H0, we always
reddetme olasılığına testin gücü denir. Testin gücü think of rejection of the null hypothesis H0 as a
1-’ya eşittir. strong conclusion.

14
α - Criticism β - Criticism
• The type I error probability is a measure of risk,
• Because the type II error probability β is a
specifically, the risk of concluding that the null
hypothesis is false when it really is not. function of both the sample size and the extent
• So, the value of α should be chosen to reflect the
to which the null hypothesis H0 is false, it is
consequences (economic, social, etc.) of incorrectly customary to think of the decision to accept H0
rejecting the null hypothesis. as a weak conclusion unless we know that β
• Smaller values of α would reflect more serious is acceptably small.
consequences and larger values of α would be • Therefore, rather than saying we “accept H0,”
consistent with less severe consequences. we prefer the terminology “fail to reject H0.”
• This is often hard to do, so what has evolved in much
• Failing to reject H0 implies that we have not
of scientific and engineering practice is to use the
value α = 0.05 in most situations unless information is found sufficient evidence to reject H0, that is, to
available that this is an inappropriate choice. make a strong statement.

β - Criticism β - Criticism
• Failing to reject H0 does not necessarily mean • If strong evidence is found to the contrary, the
that there is a high probability that H0 is true. defendant is declared to be guilty (we reject the
• It may simply mean that more data are required null hypothesis).
to reach a strong conclusion. • If evidence is insufficient, the defendant is
• This can have important implications for the declared to be not guilty.
formulation of hypotheses. • This is not the same as proving the defendant
• A useful analog exists between hypothesis innocent and so, like failing to reject the null
testing and a jury trial. hypothesis, it is a weak conclusion.
• In a trial, the defendant is assumed innocent • An important concept that we will use is the
(this is like assuming the null hypothesis to be power of a statistical test.
true).

• For example, suppose that an engineer is designing an 9-1 Hypothesis Testing


air crew escape system that consists of an ejection seat
and a rocket motor that powers the seat. The rocket
9-1.2 Tests of Statistical Hypotheses
motor contains a propellant, and for the ejection seat to Definitions
function properly, the propellant should have a mean
burning rate of 50 cm/sec. If the burning rate is too low,
the ejection seat may not function properly, leading to an
unsafe ejection and possible injury of the pilot. Higher
burning rates may imply instability in the propellant or an
ejection seat that is too powerful, again leading to
possible pilot injury. So the practical engineering
question that must be answered is: Does the mean
burning rate of the propellant equal 50 cm/sec, or is it
some other value (either higher or lower)?

15
9-1 Hypothesis Testing 9-1 Hypothesis Testing
9-1.2 Tests of Statistical Hypotheses 9-1.2 Tests of Statistical Hypotheses

Sometimes the type I error probability is called the


significance level, or the -error, or the size of the test.

9-1 Hypothesis Testing


• To calculate β (sometimes called the a-error), we must have a
specific alternative hypothesis; that is, we must have a
particular value of μ. For example, suppose that it is important
to reject the null hypothesis H0: μ = 50 whenever the mean
burning rate μ is greater than 52 centimeters per second or
less than 48 centimeters per second. We could calculate the
probability of a type II error β for the values μ = 52 and μ = 48
and use this result to tell us something about how the test
procedure would perform. Specifically, how will the test
procedure work if we wish to detect, that is, reject H0, for a
mean value of μ = 52 or μ = 48? Because of symmetry, it is
necessary to evaluate only one of the two cases—say, find the
probability of accepting the null hypothesis H0: μ = 50
centimeters per second when the true mean is μ = 52
centimeters per second.

9-1 Hypothesis Testing β - Criticism


• Suppose that the true value of the mean is μ = 52. When n =
10, we found that β= 0.2643, so the power of this test is 1− β =
1− 0.2643 = 0.7357 when μ = 52.
• Power is a very descriptive and concise measure of the
sensitivity of a statistical test when by sensitivity we mean the
ability of the test to detect differences.
• In this case, the sensitivity of the test for detecting the
difference between a mean burning rate of 50 centimeters per
second and 52 centimeters per second is 0.7357.
• That is, if the true mean is really 52 centimeters per second,
this test will correctly reject H0: μ = 50 and “detect” this
difference 73.57% of the time.
• If this value of power is judged to be too low, the analyst can
increase either α or the sample size n.

16
9-1 Hypothesis Testing 9-1 Hypothesis Testing

Figure 9-3 The


probability of type II
error when  = 52 and
n = 10.

9-1 Hypothesis Testing


9-1 Hypothesis Testing

Figure 9-5 The


probability of type II
error when  = 2 and n
= 16.

17
’yı Etkileyen Faktörler:
 &  Ters yönlü ilişki içindedir
• Populasyon parametresinin gerçek değeri
Hipotezdeki parametre değeri ile parametrenin
Her iki hatayı da aynı
anda azaltamazsınız! gerçek değeri arasındaki fark arttıkça  da
artar.
• Önem derecesi - 

 azalırken  artar.
• Populasyon standart sapması - 
  arttıkça  artar.
• Örnek hacmi - n
n azaldıkça  artar

9-2 Tests on the Mean of a Normal 9-2 Tests on the Mean of a Normal
Distribution, Variance Known Distribution, Variance Known

Example 9-2 Example 9-2

9-2 Tests on the Mean of a Normal β - Criticism


Distribution, Variance Known • The power is computed as 1−β, and power can
be interpreted as the probability of correctly
Example 9-2 rejecting a false null hypothesis.
• We often compare statistical tests by comparing
their power properties.
• For example, consider the propellant burning
rate problem when we are testing H0: μ = 50
centimeters per second against H1: μ ≠ 50
centimeters per second.

18
TYPE II ERROR AND CHOICE OF SAMPLE SIZE Finding the Probability of Type II Error β

• In testing hypotheses, the analyst directly


selects the type I error probability.
• However, the probability of type II error β
depends on the choice of sample size. In
this section, we will show how to calculate
the probability of type II error β.
• We will also show how to select the sample
size to obtain a specifi ed value of β.

Finding the Probability of Type II Error β


Sample Size Formulas

Sample Size Formulas Sample Size Formulas

19
Using Operating Characteristic Curves

TYPE II ERROR AND CHOICE OF SAMPLE SIZE 9-4 Hypothesis Tests on the Variance and
Standard Deviation of a Normal Distribution
Example 9-8

20
9-5 Tests on a Population Proportion
9-5.1 Large-Sample Tests on a Proportion
Many engineering decision problems include hypothesis testing
about p.

An appropriate test statistic is

9-5 Tests on a Population Proportion 9-5 Tests on a Population Proportion


Example 9-10 Example 9-10

TYPE II ERROR AND CHOICE OF SAMPLE SIZE TYPE II ERROR AND CHOICE OF
SAMPLE SIZE

21
Contingency Table Tests

Contingency Table Tests

22

You might also like