lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

Testing characteristics of samples.html (6523B)


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      3 <html><head><link rel="stylesheet" href="sitewide.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="exporter-version" content="Evernote Mac 7.6 (457297)"/><meta name="altitude" content="-4.235000133514404"/><meta name="author" content="Alex Balgavy"/><meta name="created" content="2018-12-16 19:24:24 +0000"/><meta name="latitude" content="52.30033088657014"/><meta name="longitude" content="4.988105169232488"/><meta name="source" content="desktop.mac"/><meta name="updated" content="2018-12-16 19:35:28 +0000"/><title>Testing characteristics of samples (goodness-of-fit, independence, homogeneity)</title></head><body><h1>Testing characteristics of samples (goodness-of-fit, independence, homogeneity)</h1><h2>Goodness-of-fit</h2><div style="margin-top: 1em; margin-bottom: 1em;-en-paragraph:true;">Checks if observed freq. distribution fits a claimed distribution.</div><div style="margin-top: 1em; margin-bottom: 1em;-en-paragraph:true;">Sample size n with k different categories.</div><div style="margin-top: 1em; margin-bottom: 1em;-en-paragraph:true;">
      4 <img src="Testing%20characteristics%20of%20samples%20(goodness-of-fit,%20independence,%20homogeneity).resources/A8B8F47E-3843-496F-A6FF-A2C3107D7898.png" height="14" width="332"/><br/></div><div style="margin-top: 1em; margin-bottom: 1em;-en-paragraph:true;">
      5 <img src="Testing%20characteristics%20of%20samples%20(goodness-of-fit,%20independence,%20homogeneity).resources/BE430A6B-D948-4F60-AEA1-ECCFF1757DE6.png" height="14" width="402"/><br/></div><div style="margin-top: 1em; margin-bottom: 1em;-en-paragraph:true;"><span style="font-style: italic;">O</span><span style="vertical-align: sub; font-style: italic;">i</span> is observed frequency count of category <span style="font-style: italic;">i</span>. 
      6 <img src="Testing%20characteristics%20of%20samples%20(goodness-of-fit,%20independence,%20homogeneity).resources/6CFA449D-6B83-4CEC-8CB3-1D4F849B6809.png" height="14" width="69"/> is the expected frequency count.</div><div style="margin-top: 1em; margin-bottom: 1em;-en-paragraph:true;">Test statistic is:</div><div style="margin-top: 1em; margin-bottom: 1em;-en-paragraph:true;"><span style="font-size: 16px;">
      7 <img src="Testing%20characteristics%20of%20samples%20(goodness-of-fit,%20independence,%20homogeneity).resources/89031541-AB87-4E37-AB8D-104952DB11FE.png" height="45" width="149"/></span><br/></div><div>and has approximately a chi-square distribution with k − 1 degrees of freedom under the null hypothesis.</div><div><br/></div><div>Critical value: </div><ul><li><div>reject null hypothesis if 
      8 <img src="Testing%20characteristics%20of%20samples%20(goodness-of-fit,%20independence,%20homogeneity).resources/F5A39700-7BFA-4611-B15F-B4B87688B65A.png" height="20" width="76"/> </div></li><li><div>P value: reject null hypothesis if 
      9 <img src="Testing%20characteristics%20of%20samples%20(goodness-of-fit,%20independence,%20homogeneity).resources/EAF66274-C9BF-4730-9345-03CD12405C24.png" height="18" width="97"/><br/></div></li></ul><div><br/></div><div>test is right-tailed since we need large values of test statistic (even if hypothesis is undirected).</div><div><br/></div><h2>Test of independence</h2><div>When: two variables in a <i>single sample</i></div><div><br/></div><div>you have a contingency table with r row categories and c column categories. checking to see if columns and variables are dependent.</div><div><br/></div><div>H0: row and column variables are independent </div><div>HA: row and column variables are dependent</div><div><br/></div><div>test statistic:</div><div><br/></div><div><span style="font-size: 16px;">
     10 <img src="Testing%20characteristics%20of%20samples%20(goodness-of-fit,%20independence,%20homogeneity).resources/4314E768-B529-4221-BA2A-8D03A5F4E7EE.png" height="45" width="133"/></span></div><div><br/></div><div>has under H0 approximately a chi-square distribution with (r − 1)(c − 1) degrees of freedom.</div><div><br/></div><div>reject null hypothesis if 
     11 <img src="Testing%20characteristics%20of%20samples%20(goodness-of-fit,%20independence,%20homogeneity).resources/8B2F81A1-DA9F-48F7-8096-535BAA746FD5.png" height="20" width="113"/></div><div><br/></div><h2>Test of homogeneity</h2><div>When: comparing <i>two or more samples</i> to see if they have the same proportions of characteristics.</div><div><br/></div><div>r different populations (rows) and c different categories (columns) of some variable checking for proportions of a characteristic in the populations.</div><div><br/></div><div>H0: different populations have same proportions of some characteristics </div><div>HA: different populations don’t have the same proportions of some characteristics.</div><div><br/></div><div>test statistic:</div><div><br/></div><div><span style="font-size: 16px;">
     12 <img src="Testing%20characteristics%20of%20samples%20(goodness-of-fit,%20independence,%20homogeneity).resources/4314E768-B529-4221-BA2A-8D03A5F4E7EE.png" height="45" width="133"/></span></div><div><br/></div><div>has under H0 approximately a chi-square distribution with (r − 1)(c − 1) degrees of freedom.</div><div><br/></div><div>reject H0 if observed 
     13 <img src="Testing%20characteristics%20of%20samples%20(goodness-of-fit,%20independence,%20homogeneity).resources/8B2F81A1-DA9F-48F7-8096-535BAA746FD5.png" height="20" width="113"/></div><div><br/></div><h2>Fisher’s exact test for 2-by-2 contingency table</h2><div>either: </div><ul><li><div>H0: row and column variables are independent </div></li><li><div>HA: occurrence of “first column category” is more common in group of “first row category” than in group of “second row category”</div></li></ul><div>or: </div><ul><li><div>H0: populations have same proportion of one characteristic </div></li><li><div>HA: the proportion of the characteristic is bigger/smaller in one population</div></li></ul><div><br/></div><div>test statistic: frequency count in cell (1,1) has under H0 and given marginals a hypergeometric distribution </div><div>parameters 
     14 <img src="Testing%20characteristics%20of%20samples%20(goodness-of-fit,%20independence,%20homogeneity).resources/C59C5FD9-E7E1-43BA-B91E-9004B43AD0C8.png" height="16" width="415"/></div><div><br/></div><div>guess we don’t need to know how to do this manually.</div></body></html>