<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.socr.umich.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mwolvie</id>
	<title>SOCR - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.socr.umich.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mwolvie"/>
	<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php/Special:Contributions/Mwolvie"/>
	<updated>2026-07-19T07:49:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13378</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13378"/>
		<updated>2014-08-14T18:38:26Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
&lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
*Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Location 1||Location 2&lt;br /&gt;
|-&lt;br /&gt;
|8.10||7.85&lt;br /&gt;
|-&lt;br /&gt;
|7.89||7.30&lt;br /&gt;
|-&lt;br /&gt;
|8.00||7.73&lt;br /&gt;
|-&lt;br /&gt;
|7.85||7.27&lt;br /&gt;
|-&lt;br /&gt;
|8.01||7.58&lt;br /&gt;
|-&lt;br /&gt;
|7.82||7.27&lt;br /&gt;
|-&lt;br /&gt;
|7.99||7.50&lt;br /&gt;
|-&lt;br /&gt;
|7.80||7.23&lt;br /&gt;
|-&lt;br /&gt;
|7.93||7.41&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 4.png]]&lt;br /&gt;
[[File:NonParamInference fig 5.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 6.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
*Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
**For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
**For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
*Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 7.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
*The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
**The WMW test uses rank ordering: Positive: Doesn’t depend on normality or population parameters Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
**The T-test uses the raw measurements: Positive: Incorporates all of the data into calculations Negative: Must meet normality assumption&lt;br /&gt;
**Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
*Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
*Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
*Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=3|Before Treatment&lt;br /&gt;
|-&lt;br /&gt;
|D +||D −||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|After Treatment||D +||a=101||b=59||a+b=160&lt;br /&gt;
|-&lt;br /&gt;
|D −||c=121||d=33||c+d=154&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=222||b+d=92||a+b+c+d=314&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
**The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
**The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
**An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
*General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=4|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good||Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Evaluator 1||Poor||5||15||4||24&lt;br /&gt;
|-&lt;br /&gt;
|Good||16||10||9||35&lt;br /&gt;
|-&lt;br /&gt;
|Excellent||11||17||13||41&lt;br /&gt;
|-&lt;br /&gt;
|Total||32||42||26||100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=3|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good or Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Evaluator 1||Poor||a=5||b=19||a+b=24&lt;br /&gt;
|-&lt;br /&gt;
|Good or Excellent||c=27||d=49||c+d=76&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=32||b+d=68||a+b+c+d=100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 8.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
*Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=5|Teaching Method&lt;br /&gt;
|-&lt;br /&gt;
| ||Method 1||Method 2||Method 3||Method 4&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Index||65||75||59||94&lt;br /&gt;
|-&lt;br /&gt;
|87||69||78||89&lt;br /&gt;
|-&lt;br /&gt;
|73||83||67||80&lt;br /&gt;
|-&lt;br /&gt;
|79||81||62||88&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
**Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
&lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
*The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 9.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
'''Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056'''&lt;br /&gt;
&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
*Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
**Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
**Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
===Software ===&lt;br /&gt;
&lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
&lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Rat||Before||After||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||100||50||+&lt;br /&gt;
|-&lt;br /&gt;
|2||38||12||+&lt;br /&gt;
|-&lt;br /&gt;
|3||N||45||+&lt;br /&gt;
|-&lt;br /&gt;
|4||122||62||+&lt;br /&gt;
|-&lt;br /&gt;
|5||95||90||+&lt;br /&gt;
|-&lt;br /&gt;
|6||116||100||+&lt;br /&gt;
|-&lt;br /&gt;
|7||56||75||-&lt;br /&gt;
|-&lt;br /&gt;
|8||135||52||+&lt;br /&gt;
|-&lt;br /&gt;
|9||104||44||+&lt;br /&gt;
|-&lt;br /&gt;
|10||N||50||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Index||Volume_Intensity||ROI_Name||Method1_Volume||Method2_Volume&lt;br /&gt;
|-&lt;br /&gt;
|1||0||Background||9236455||9241667&lt;br /&gt;
|-&lt;br /&gt;
|2||21||L_superior_frontal_gyrus||78874||78693&lt;br /&gt;
|-&lt;br /&gt;
|3||22||R_superior_frontal_gyrus||69575||74391&lt;br /&gt;
|-&lt;br /&gt;
|4||23||L_middle_frontal_gyrus||67336||68872&lt;br /&gt;
|-&lt;br /&gt;
|5||24||R_middle_frontal_gyrus||68344||67024&lt;br /&gt;
|-&lt;br /&gt;
|6||25||L_inferior_frontal_gyrus||31912||21479&lt;br /&gt;
|-&lt;br /&gt;
|7||26||R_inferior_frontal_gyrus||26264||29035&lt;br /&gt;
|-&lt;br /&gt;
|8||27||L_precentral_gyrus||28942||33584&lt;br /&gt;
|-&lt;br /&gt;
|9||28||R_precentral_gyrus||35192||30537&lt;br /&gt;
|-&lt;br /&gt;
|10||29||L_middle_orbitofrontal_gyrus||10141||11608&lt;br /&gt;
|-&lt;br /&gt;
|11||30||R_middle_orbitofrontal_gyrus||9142||11850&lt;br /&gt;
|-&lt;br /&gt;
|12||31||L_lateral_orbitofrontal_gyrus||7164||5382&lt;br /&gt;
|-&lt;br /&gt;
|13||32||R_lateral_orbitofrontal_gyrus||5964||4947&lt;br /&gt;
|-&lt;br /&gt;
|14||33||L_gyrus_rectus||3840||1995&lt;br /&gt;
|-&lt;br /&gt;
|15||34||R_gyrus_rectus||2672||2994&lt;br /&gt;
|-&lt;br /&gt;
|16||41||L_postcentral_gyrus||24586||27672&lt;br /&gt;
|-&lt;br /&gt;
|17||42||R_postcentral_gyrus||21736||28159&lt;br /&gt;
|-&lt;br /&gt;
|18||43||L_superior_parietal_gyrus||25791||27500&lt;br /&gt;
|-&lt;br /&gt;
|19||44||R_superior_parietal_gyrus||28850||32674&lt;br /&gt;
|-&lt;br /&gt;
|20||45||L_supramarginal_gyrus||16445||22373&lt;br /&gt;
|-&lt;br /&gt;
|21||46||R_supramarginal_gyrus||11893||11018&lt;br /&gt;
|-&lt;br /&gt;
|22||47||L_angular_gyrus||20740||22245&lt;br /&gt;
|-&lt;br /&gt;
|23||48||R_angular_gyrus||20247||17793&lt;br /&gt;
|-&lt;br /&gt;
|24||49||L_precuneus||14491||12983&lt;br /&gt;
|-&lt;br /&gt;
|25||50||R_precuneus||15589||16323&lt;br /&gt;
|-&lt;br /&gt;
|26||61||L_superior_occipital_gyrus||6842||6106&lt;br /&gt;
|-&lt;br /&gt;
|27||62||R_superior_occipital_gyrus||5673||6539&lt;br /&gt;
|-&lt;br /&gt;
|28||63||L_middle_occipital_gyrus||15011||19085&lt;br /&gt;
|-&lt;br /&gt;
|29||64||R_middle_occipital_gyrus||19063||25747&lt;br /&gt;
|-&lt;br /&gt;
|30||65||L_inferior_occipital_gyrus||10411||8675&lt;br /&gt;
|-&lt;br /&gt;
|31||66||R_inferior_occipital_gyrus||12142||12277&lt;br /&gt;
|-&lt;br /&gt;
|32||67||L_cuneus||6935||9700&lt;br /&gt;
|-&lt;br /&gt;
|33||68||R_cuneus||7491||11765&lt;br /&gt;
|-&lt;br /&gt;
|34||81||L_superior_temporal_gyrus||29962||34934&lt;br /&gt;
|-&lt;br /&gt;
|35||82||R_superior_temporal_gyrus||30630||28788&lt;br /&gt;
|-&lt;br /&gt;
|36||83||L_middle_temporal_gyrus||27558||19633&lt;br /&gt;
|-&lt;br /&gt;
|37||84||R_middle_temporal_gyrus||26314||25301&lt;br /&gt;
|-&lt;br /&gt;
|38||85||L_inferior_temporal_gyrus||24817||24885&lt;br /&gt;
|-&lt;br /&gt;
|39||86||R_inferior_temporal_gyrus||25088||20661&lt;br /&gt;
|-&lt;br /&gt;
|40||87||L_parahippocampal_gyrus||6761||6977&lt;br /&gt;
|-&lt;br /&gt;
|41||88||R_parahippocampal_gyrus||6529||7964&lt;br /&gt;
|-&lt;br /&gt;
|42||89||L_lingual_gyrus||16752||14748&lt;br /&gt;
|-&lt;br /&gt;
|43||90||R_lingual_gyrus||20914||18500&lt;br /&gt;
|-&lt;br /&gt;
|44||91||L_fusiform_gyrus||16565||15020&lt;br /&gt;
|-&lt;br /&gt;
|45||92||R_fusiform_gyrus||14409||17311&lt;br /&gt;
|-&lt;br /&gt;
|46||101||L_insular_cortex||10779||9814&lt;br /&gt;
|-&lt;br /&gt;
|47||102||R_insular_cortex||8222||5599&lt;br /&gt;
|-&lt;br /&gt;
|48||121||L_cingulate_gyrus||14662||12490&lt;br /&gt;
|-&lt;br /&gt;
|49||122||R_cingulate_gyrus||16595||14489&lt;br /&gt;
|-&lt;br /&gt;
|50||161||L_caudate||1906||1608&lt;br /&gt;
|-&lt;br /&gt;
|51||162||R_caudate||2353||1997&lt;br /&gt;
|-&lt;br /&gt;
|52||163||L_putamen||3015||2622&lt;br /&gt;
|-&lt;br /&gt;
|53||164||R_putamen||2177||3758&lt;br /&gt;
|-&lt;br /&gt;
|54||165||L_hippocampus||3791||4454&lt;br /&gt;
|-&lt;br /&gt;
|55||166||R_hippocampus||3596||4673&lt;br /&gt;
|-&lt;br /&gt;
|56||181||cerebellum||174045||158617&lt;br /&gt;
|-&lt;br /&gt;
|57||182||brainstem||32567||28225&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Polluted||Unpolluted&lt;br /&gt;
|-&lt;br /&gt;
|21.3||10.1&lt;br /&gt;
|-&lt;br /&gt;
|18.7||18.3&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|21.4||17.2&lt;br /&gt;
|-&lt;br /&gt;
|17.1||18.4&lt;br /&gt;
|-&lt;br /&gt;
|11.1||20.0&lt;br /&gt;
|-&lt;br /&gt;
|20.9||	&lt;br /&gt;
|-&lt;br /&gt;
|19.7||	&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger.  http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
&lt;br /&gt;
Sampling / Steven K. Thompson.  http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13377</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13377"/>
		<updated>2014-08-14T18:37:17Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
&lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
*Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Location 1||Location 2&lt;br /&gt;
|-&lt;br /&gt;
|8.10||7.85&lt;br /&gt;
|-&lt;br /&gt;
|7.89||7.30&lt;br /&gt;
|-&lt;br /&gt;
|8.00||7.73&lt;br /&gt;
|-&lt;br /&gt;
|7.85||7.27&lt;br /&gt;
|-&lt;br /&gt;
|8.01||7.58&lt;br /&gt;
|-&lt;br /&gt;
|7.82||7.27&lt;br /&gt;
|-&lt;br /&gt;
|7.99||7.50&lt;br /&gt;
|-&lt;br /&gt;
|7.80||7.23&lt;br /&gt;
|-&lt;br /&gt;
|7.93||7.41&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 4.png]]&lt;br /&gt;
[[File:NonParamInference fig 5.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 6.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
*Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
**For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
**For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
*Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 7.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
*The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
**The WMW test uses rank ordering: Positive: Doesn’t depend on normality or population parameters Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
**The T-test uses the raw measurements: Positive: Incorporates all of the data into calculations Negative: Must meet normality assumption&lt;br /&gt;
**Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
*Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
*Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
*Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=3|Before Treatment&lt;br /&gt;
|-&lt;br /&gt;
|D +||D −||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|After Treatment||D +||a=101||b=59||a+b=160&lt;br /&gt;
|-&lt;br /&gt;
|D −||c=121||d=33||c+d=154&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=222||b+d=92||a+b+c+d=314&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
**The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
**The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
**An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
*General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=4|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good||Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Evaluator 1||Poor||5||15||4||24&lt;br /&gt;
|-&lt;br /&gt;
|Good||16||10||9||35&lt;br /&gt;
|-&lt;br /&gt;
|Excellent||11||17||13||41&lt;br /&gt;
|-&lt;br /&gt;
|Total||32||42||26||100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=3|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good or Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Evaluator 1||Poor||a=5||b=19||a+b=24&lt;br /&gt;
|-&lt;br /&gt;
|Good or Excellent||c=27||d=49||c+d=76&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=32||b+d=68||a+b+c+d=100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 8.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
*Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=5|Teaching Method&lt;br /&gt;
|-&lt;br /&gt;
| ||Method 1||Method 2||Method 3||Method 4&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Index||65||75||59||94&lt;br /&gt;
|-&lt;br /&gt;
|87||69||78||89&lt;br /&gt;
|-&lt;br /&gt;
|73||83||67||80&lt;br /&gt;
|-&lt;br /&gt;
|79||81||62||88&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
**Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
&lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
*The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 9.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
'''Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056'''&lt;br /&gt;
&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
*Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
**Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
**Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
===Software ===&lt;br /&gt;
&lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
&lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Rat||Before||After||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||100||50||+&lt;br /&gt;
|-&lt;br /&gt;
|2||38||12||+&lt;br /&gt;
|-&lt;br /&gt;
|3||N||45||+&lt;br /&gt;
|-&lt;br /&gt;
|4||122||62||+&lt;br /&gt;
|-&lt;br /&gt;
|5||95||90||+&lt;br /&gt;
|-&lt;br /&gt;
|6||116||100||+&lt;br /&gt;
|-&lt;br /&gt;
|7||56||75||-&lt;br /&gt;
|-&lt;br /&gt;
|8||135||52||+&lt;br /&gt;
|-&lt;br /&gt;
|9||104||44||+&lt;br /&gt;
|-&lt;br /&gt;
|10||N||50||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Index||Volume_Intensity||ROI_Name||Method1_Volume||Method2_Volume&lt;br /&gt;
|-&lt;br /&gt;
|1||0||Background||9236455||9241667&lt;br /&gt;
|-&lt;br /&gt;
|2||21||L_superior_frontal_gyrus||78874||78693&lt;br /&gt;
|-&lt;br /&gt;
|3||22||R_superior_frontal_gyrus||69575||74391&lt;br /&gt;
|-&lt;br /&gt;
|4||23||L_middle_frontal_gyrus||67336||68872&lt;br /&gt;
|-&lt;br /&gt;
|5||24||R_middle_frontal_gyrus||68344||67024&lt;br /&gt;
|-&lt;br /&gt;
|6||25||L_inferior_frontal_gyrus||31912||21479&lt;br /&gt;
|-&lt;br /&gt;
|7||26||R_inferior_frontal_gyrus||26264||29035&lt;br /&gt;
|-&lt;br /&gt;
|8||27||L_precentral_gyrus||28942||33584&lt;br /&gt;
|-&lt;br /&gt;
|9||28||R_precentral_gyrus||35192||30537&lt;br /&gt;
|-&lt;br /&gt;
|10||29||L_middle_orbitofrontal_gyrus||10141||11608&lt;br /&gt;
|-&lt;br /&gt;
|11||30||R_middle_orbitofrontal_gyrus||9142||11850&lt;br /&gt;
|-&lt;br /&gt;
|12||31||L_lateral_orbitofrontal_gyrus||7164||5382&lt;br /&gt;
|-&lt;br /&gt;
|13||32||R_lateral_orbitofrontal_gyrus||5964||4947&lt;br /&gt;
|-&lt;br /&gt;
|14||33||L_gyrus_rectus||3840||1995&lt;br /&gt;
|-&lt;br /&gt;
|15||34||R_gyrus_rectus||2672||2994&lt;br /&gt;
|-&lt;br /&gt;
|16||41||L_postcentral_gyrus||24586||27672&lt;br /&gt;
|-&lt;br /&gt;
|17||42||R_postcentral_gyrus21736||28159&lt;br /&gt;
|-&lt;br /&gt;
|18||43||L_superior_parietal_gyrus||25791||27500&lt;br /&gt;
|-&lt;br /&gt;
|19||44||R_superior_parietal_gyrus||28850||32674&lt;br /&gt;
|-&lt;br /&gt;
|20||45||L_supramarginal_gyrus||16445||22373&lt;br /&gt;
|-&lt;br /&gt;
|21||46||R_supramarginal_gyrus||11893||11018&lt;br /&gt;
|-&lt;br /&gt;
|22||47||L_angular_gyrus||20740||22245&lt;br /&gt;
|-&lt;br /&gt;
|23||48||R_angular_gyrus||20247||17793&lt;br /&gt;
|-&lt;br /&gt;
|24||49||L_precuneus||14491||12983&lt;br /&gt;
|-&lt;br /&gt;
|25||50	R_precuneus||15589||16323&lt;br /&gt;
|-&lt;br /&gt;
|26||61||L_superior_occipital_gyrus||6842||6106&lt;br /&gt;
|-&lt;br /&gt;
|27||62||R_superior_occipital_gyrus||5673||6539&lt;br /&gt;
|-&lt;br /&gt;
|28||63||L_middle_occipital_gyrus||15011||19085&lt;br /&gt;
|-&lt;br /&gt;
|29||64||R_middle_occipital_gyrus||19063||25747&lt;br /&gt;
|-&lt;br /&gt;
|30||65||L_inferior_occipital_gyrus||10411||8675&lt;br /&gt;
|-&lt;br /&gt;
|31||66||R_inferior_occipital_gyrus||12142||12277&lt;br /&gt;
|-&lt;br /&gt;
|32||67||L_cuneus||6935||9700&lt;br /&gt;
|-&lt;br /&gt;
|33||68	R_cuneus||7491||11765&lt;br /&gt;
|-&lt;br /&gt;
|34||81||L_superior_temporal_gyrus||29962||34934&lt;br /&gt;
|-&lt;br /&gt;
|35||82||R_superior_temporal_gyrus||30630||28788&lt;br /&gt;
|-&lt;br /&gt;
|36||83||L_middle_temporal_gyrus||27558||19633&lt;br /&gt;
|-&lt;br /&gt;
|37||84||R_middle_temporal_gyrus||26314||25301&lt;br /&gt;
|-&lt;br /&gt;
|38||85||L_inferior_temporal_gyrus||24817||24885&lt;br /&gt;
|-&lt;br /&gt;
|39||86||R_inferior_temporal_gyrus||25088||20661&lt;br /&gt;
|-&lt;br /&gt;
|40||87||L_parahippocampal_gyrus||6761||6977&lt;br /&gt;
|-&lt;br /&gt;
|41||88||R_parahippocampal_gyrus||6529||7964&lt;br /&gt;
|-&lt;br /&gt;
|42||89||L_lingual_gyrus||16752||14748&lt;br /&gt;
|-&lt;br /&gt;
|43||90||R_lingual_gyrus||20914||18500&lt;br /&gt;
|-&lt;br /&gt;
|44||91||L_fusiform_gyrus||16565||15020&lt;br /&gt;
|-&lt;br /&gt;
|45||92||R_fusiform_gyrus||14409||17311&lt;br /&gt;
|-&lt;br /&gt;
|46||101||L_insular_cortex||10779||9814&lt;br /&gt;
|-&lt;br /&gt;
|47||102||R_insular_cortex||8222||5599&lt;br /&gt;
|-&lt;br /&gt;
|48||121||L_cingulate_gyrus||14662||12490&lt;br /&gt;
|-&lt;br /&gt;
|49||122||R_cingulate_gyrus||16595||14489&lt;br /&gt;
|-&lt;br /&gt;
|50||161||L_caudate||1906||1608&lt;br /&gt;
|-&lt;br /&gt;
|51||162||R_caudate||2353||1997&lt;br /&gt;
|-&lt;br /&gt;
|52||163||L_putamen||3015||2622&lt;br /&gt;
|-&lt;br /&gt;
|53||164||R_putamen||2177||3758&lt;br /&gt;
|-&lt;br /&gt;
|54||165||L_hippocampus||3791||4454&lt;br /&gt;
|-&lt;br /&gt;
|55||166||R_hippocampus||3596||4673&lt;br /&gt;
|-&lt;br /&gt;
|56||181||cerebellum||174045||158617&lt;br /&gt;
|-&lt;br /&gt;
|57||182||brainstem||32567||28225&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Polluted||Unpolluted&lt;br /&gt;
|-&lt;br /&gt;
|21.3||10.1&lt;br /&gt;
|-&lt;br /&gt;
|18.7||18.3&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|21.4||17.2&lt;br /&gt;
|-&lt;br /&gt;
|17.1||18.4&lt;br /&gt;
|-&lt;br /&gt;
|11.1||20.0&lt;br /&gt;
|-&lt;br /&gt;
|20.9||	&lt;br /&gt;
|-&lt;br /&gt;
|19.7||	&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger.  http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
&lt;br /&gt;
Sampling / Steven K. Thompson.  http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13376</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13376"/>
		<updated>2014-08-14T18:19:32Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Non-Parametric Inference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
&lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
*Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Location 1||Location 2&lt;br /&gt;
|-&lt;br /&gt;
|8.10||7.85&lt;br /&gt;
|-&lt;br /&gt;
|7.89||7.30&lt;br /&gt;
|-&lt;br /&gt;
|8.00||7.73&lt;br /&gt;
|-&lt;br /&gt;
|7.85||7.27&lt;br /&gt;
|-&lt;br /&gt;
|8.01||7.58&lt;br /&gt;
|-&lt;br /&gt;
|7.82||7.27&lt;br /&gt;
|-&lt;br /&gt;
|7.99||7.50&lt;br /&gt;
|-&lt;br /&gt;
|7.80||7.23&lt;br /&gt;
|-&lt;br /&gt;
|7.93||7.41&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 4.png]]&lt;br /&gt;
[[File:NonParamInference fig 5.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 6.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
*Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
**For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
**For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
*Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 7.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
*The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
**The WMW test uses rank ordering: Positive: Doesn’t depend on normality or population parameters Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
**The T-test uses the raw measurements: Positive: Incorporates all of the data into calculations Negative: Must meet normality assumption&lt;br /&gt;
**Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
*Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
*Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
*Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=3|Before Treatment&lt;br /&gt;
|-&lt;br /&gt;
|D +||D −||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|After Treatment||D +||a=101||b=59||a+b=160&lt;br /&gt;
|-&lt;br /&gt;
|D −||c=121||d=33||c+d=154&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=222||b+d=92||a+b+c+d=314&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
**The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
**The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
**An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
*General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=4|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good||Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Evaluator 1||Poor||5||15||4||24&lt;br /&gt;
|-&lt;br /&gt;
|Good||16||10||9||35&lt;br /&gt;
|-&lt;br /&gt;
|Excellent||11||17||13||41&lt;br /&gt;
|-&lt;br /&gt;
|Total||32||42||26||100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=3|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good or Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Evaluator 1||Poor||a=5||b=19||a+b=24&lt;br /&gt;
|-&lt;br /&gt;
|Good or Excellent||c=27||d=49||c+d=76&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=32||b+d=68||a+b+c+d=100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 8.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
*Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=5|Teaching Method&lt;br /&gt;
|-&lt;br /&gt;
| ||Method 1||Method 2||Method 3||Method 4&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Index||65||75||59||94&lt;br /&gt;
|-&lt;br /&gt;
|87||69||78||89&lt;br /&gt;
|-&lt;br /&gt;
|73||83||67||80&lt;br /&gt;
|-&lt;br /&gt;
|79||81||62||88&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
**Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
&lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
*The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 9.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
'''Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056'''&lt;br /&gt;
&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
*Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
**Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
**Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
===Software ===&lt;br /&gt;
&lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
&lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Rat||Before||After||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||100||50||+&lt;br /&gt;
|-&lt;br /&gt;
|2||38||12||+&lt;br /&gt;
|-&lt;br /&gt;
|3||N||45||+&lt;br /&gt;
|-&lt;br /&gt;
|4||122||62||+&lt;br /&gt;
|-&lt;br /&gt;
|5||95||90||+&lt;br /&gt;
|-&lt;br /&gt;
|6||116||100||+&lt;br /&gt;
|-&lt;br /&gt;
|7||56||75||-&lt;br /&gt;
|-&lt;br /&gt;
|8||135||52||+&lt;br /&gt;
|-&lt;br /&gt;
|9||104||44||+&lt;br /&gt;
|-&lt;br /&gt;
|10||N||50||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Polluted||Unpolluted&lt;br /&gt;
|-&lt;br /&gt;
|21.3||10.1&lt;br /&gt;
|-&lt;br /&gt;
|18.7||18.3&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|21.4||17.2&lt;br /&gt;
|-&lt;br /&gt;
|17.1||18.4&lt;br /&gt;
|-&lt;br /&gt;
|11.1||20.0&lt;br /&gt;
|-&lt;br /&gt;
|20.9||	&lt;br /&gt;
|-&lt;br /&gt;
|19.7||	&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger.  http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
&lt;br /&gt;
Sampling / Steven K. Thompson.  http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13375</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13375"/>
		<updated>2014-08-14T18:12:13Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
&lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
*Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Location 1||Location 2&lt;br /&gt;
|-&lt;br /&gt;
|8.10||7.85&lt;br /&gt;
|-&lt;br /&gt;
|7.89||7.30&lt;br /&gt;
|-&lt;br /&gt;
|8.00||7.73&lt;br /&gt;
|-&lt;br /&gt;
|7.85||7.27&lt;br /&gt;
|-&lt;br /&gt;
|8.01||7.58&lt;br /&gt;
|-&lt;br /&gt;
|7.82||7.27&lt;br /&gt;
|-&lt;br /&gt;
|7.99||7.50&lt;br /&gt;
|-&lt;br /&gt;
|7.80||7.23&lt;br /&gt;
|-&lt;br /&gt;
|7.93||7.41&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 4.png]]&lt;br /&gt;
[[File:NonParamInference fig 5.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 6.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
*Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
**For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
**For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
*Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 7.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
*The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
**The WMW test uses rank ordering: Positive: Doesn’t depend on normality or population parameters Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
**The T-test uses the raw measurements: Positive: Incorporates all of the data into calculations Negative: Must meet normality assumption&lt;br /&gt;
**Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
*Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
*Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
*Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=3|Before Treatment&lt;br /&gt;
|-&lt;br /&gt;
|D +||D −||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|After Treatment||D +||a=101||b=59||a+b=160&lt;br /&gt;
|-&lt;br /&gt;
|D −||c=121||d=33||c+d=154&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=222||b+d=92||a+b+c+d=314&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
**The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
**The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
**An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
*General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=4|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good||Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Evaluator 1||Poor||5||15||4||24&lt;br /&gt;
|-&lt;br /&gt;
|Good||16||10||9||35&lt;br /&gt;
|-&lt;br /&gt;
|Excellent||11||17||13||41&lt;br /&gt;
|-&lt;br /&gt;
|Total||32||42||26||100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=3|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good or Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Evaluator 1||Poor||a=5||b=19||a+b=24&lt;br /&gt;
|-&lt;br /&gt;
|Good or Excellent||c=27||d=49||c+d=76&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=32||b+d=68||a+b+c+d=100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 8.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
*Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=5|Teaching Method&lt;br /&gt;
|-&lt;br /&gt;
| ||Method 1||Method 2||Method 3||Method 4&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Index||65||75||59||94&lt;br /&gt;
|-&lt;br /&gt;
|87||69||78||89&lt;br /&gt;
|-&lt;br /&gt;
|73||83||67||80&lt;br /&gt;
|-&lt;br /&gt;
|79||81||62||88&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
**Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
&lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
*The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 9.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
'''Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056'''&lt;br /&gt;
&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
*Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
**Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
**Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
===Software ===&lt;br /&gt;
&lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
&lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_9.png&amp;diff=13374</id>
		<title>File:NonParamInference fig 9.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_9.png&amp;diff=13374"/>
		<updated>2014-08-14T18:09:45Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13373</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13373"/>
		<updated>2014-08-14T18:09:28Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
&lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
*Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Location 1||Location 2&lt;br /&gt;
|-&lt;br /&gt;
|8.10||7.85&lt;br /&gt;
|-&lt;br /&gt;
|7.89||7.30&lt;br /&gt;
|-&lt;br /&gt;
|8.00||7.73&lt;br /&gt;
|-&lt;br /&gt;
|7.85||7.27&lt;br /&gt;
|-&lt;br /&gt;
|8.01||7.58&lt;br /&gt;
|-&lt;br /&gt;
|7.82||7.27&lt;br /&gt;
|-&lt;br /&gt;
|7.99||7.50&lt;br /&gt;
|-&lt;br /&gt;
|7.80||7.23&lt;br /&gt;
|-&lt;br /&gt;
|7.93||7.41&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 4.png]]&lt;br /&gt;
[[File:NonParamInference fig 5.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 6.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
*Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
**For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
**For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
*Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 7.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
*The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
**The WMW test uses rank ordering: Positive: Doesn’t depend on normality or population parameters Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
**The T-test uses the raw measurements: Positive: Incorporates all of the data into calculations Negative: Must meet normality assumption&lt;br /&gt;
**Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
*Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
*Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
*Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=3|Before Treatment&lt;br /&gt;
|-&lt;br /&gt;
|D +||D −||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|After Treatment||D +||a=101||b=59||a+b=160&lt;br /&gt;
|-&lt;br /&gt;
|D −||c=121||d=33||c+d=154&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=222||b+d=92||a+b+c+d=314&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
**The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
**The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
**An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
*General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=4|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good||Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Evaluator 1||Poor||5||15||4||24&lt;br /&gt;
|-&lt;br /&gt;
|Good||16||10||9||35&lt;br /&gt;
|-&lt;br /&gt;
|Excellent||11||17||13||41&lt;br /&gt;
|-&lt;br /&gt;
|Total||32||42||26||100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=3|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good or Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Evaluator 1||Poor||a=5||b=19||a+b=24&lt;br /&gt;
|-&lt;br /&gt;
|Good or Excellent||c=27||d=49||c+d=76&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=32||b+d=68||a+b+c+d=100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 8.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
*Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=5|Teaching Method&lt;br /&gt;
|-&lt;br /&gt;
| ||Method 1||Method 2||Method 3||Method 4&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Index||65||75||59||94&lt;br /&gt;
|-&lt;br /&gt;
|87||69||78||89&lt;br /&gt;
|-&lt;br /&gt;
|73||83||67||80&lt;br /&gt;
|-&lt;br /&gt;
|79||81||62||88&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
**Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
&lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
*The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 9.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
	Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
	Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
	Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_8.png&amp;diff=13372</id>
		<title>File:NonParamInference fig 8.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_8.png&amp;diff=13372"/>
		<updated>2014-08-14T18:01:34Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13371</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13371"/>
		<updated>2014-08-14T18:01:20Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
&lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
*Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Location 1||Location 2&lt;br /&gt;
|-&lt;br /&gt;
|8.10||7.85&lt;br /&gt;
|-&lt;br /&gt;
|7.89||7.30&lt;br /&gt;
|-&lt;br /&gt;
|8.00||7.73&lt;br /&gt;
|-&lt;br /&gt;
|7.85||7.27&lt;br /&gt;
|-&lt;br /&gt;
|8.01||7.58&lt;br /&gt;
|-&lt;br /&gt;
|7.82||7.27&lt;br /&gt;
|-&lt;br /&gt;
|7.99||7.50&lt;br /&gt;
|-&lt;br /&gt;
|7.80||7.23&lt;br /&gt;
|-&lt;br /&gt;
|7.93||7.41&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 4.png]]&lt;br /&gt;
[[File:NonParamInference fig 5.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 6.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
*Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
**For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
**For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
*Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 7.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
*The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
**The WMW test uses rank ordering: Positive: Doesn’t depend on normality or population parameters Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
**The T-test uses the raw measurements: Positive: Incorporates all of the data into calculations Negative: Must meet normality assumption&lt;br /&gt;
**Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
*Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
*Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
*Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=3|Before Treatment&lt;br /&gt;
|-&lt;br /&gt;
|D +||D −||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|After Treatment||D +||a=101||b=59||a+b=160&lt;br /&gt;
|-&lt;br /&gt;
|D −||c=121||d=33||c+d=154&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=222||b+d=92||a+b+c+d=314&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
**The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
**The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
**An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
*General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=4|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good||Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Evaluator 1||Poor||5||15||4||24&lt;br /&gt;
|-&lt;br /&gt;
|Good||16||10||9||35&lt;br /&gt;
|-&lt;br /&gt;
|Excellent||11||17||13||41&lt;br /&gt;
|-&lt;br /&gt;
|Total||32||42||26||100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=3|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good or Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Evaluator 1||Poor||a=5||b=19||a+b=24&lt;br /&gt;
|-&lt;br /&gt;
|Good or Excellent||c=27||d=49||c+d=76&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=32||b+d=68||a+b+c+d=100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 8.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
	Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&lt;br /&gt;
Teaching Method&lt;br /&gt;
	Method 1	Method 2	Method 3	Method 4&lt;br /&gt;
Index	65	75	59	94&lt;br /&gt;
	87	69	78	89&lt;br /&gt;
	73	83	67	80&lt;br /&gt;
	79	81	62	88&lt;br /&gt;
&lt;br /&gt;
	The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
	Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
	The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
	Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
	Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
	Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13370</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13370"/>
		<updated>2014-08-14T17:59:47Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
&lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
*Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Location 1||Location 2&lt;br /&gt;
|-&lt;br /&gt;
|8.10||7.85&lt;br /&gt;
|-&lt;br /&gt;
|7.89||7.30&lt;br /&gt;
|-&lt;br /&gt;
|8.00||7.73&lt;br /&gt;
|-&lt;br /&gt;
|7.85||7.27&lt;br /&gt;
|-&lt;br /&gt;
|8.01||7.58&lt;br /&gt;
|-&lt;br /&gt;
|7.82||7.27&lt;br /&gt;
|-&lt;br /&gt;
|7.99||7.50&lt;br /&gt;
|-&lt;br /&gt;
|7.80||7.23&lt;br /&gt;
|-&lt;br /&gt;
|7.93||7.41&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 4.png]]&lt;br /&gt;
[[File:NonParamInference fig 5.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 6.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
*Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
**For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
**For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
*Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 7.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
*The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
**The WMW test uses rank ordering: Positive: Doesn’t depend on normality or population parameters Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
**The T-test uses the raw measurements: Positive: Incorporates all of the data into calculations Negative: Must meet normality assumption&lt;br /&gt;
**Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
*Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
*Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
*Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=3|Before Treatment&lt;br /&gt;
|-&lt;br /&gt;
|D +||D −||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|After Treatment||D +||a=101||b=59||a+b=160&lt;br /&gt;
|-&lt;br /&gt;
|D −||c=121||d=33||c+d=154&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=222||b+d=92||a+b+c+d=314&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
**The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
**The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
**An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
*General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=4|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good||Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|Evaluator 1||Poor||5||15||4||24&lt;br /&gt;
|-&lt;br /&gt;
|Good||16||10||9||35&lt;br /&gt;
|-&lt;br /&gt;
|Excellent||11||17||13||41&lt;br /&gt;
|-&lt;br /&gt;
|Total||32||42||26||100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || ||colspan=3|Evaluator 2&lt;br /&gt;
|-&lt;br /&gt;
| || ||Poor||Good or Excellent||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Evaluator 1||Poor||a=5||b=19||a+b=24&lt;br /&gt;
|-&lt;br /&gt;
|Good or Excellent||c=27||d=49||c+d=76&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=32||b+d=68||a+b+c+d=100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
	Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&lt;br /&gt;
Teaching Method&lt;br /&gt;
	Method 1	Method 2	Method 3	Method 4&lt;br /&gt;
Index	65	75	59	94&lt;br /&gt;
	87	69	78	89&lt;br /&gt;
	73	83	67	80&lt;br /&gt;
	79	81	62	88&lt;br /&gt;
&lt;br /&gt;
	The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
	Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
	The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
	Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
	Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
	Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13369</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13369"/>
		<updated>2014-08-14T17:52:35Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
&lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
*Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Location 1||Location 2&lt;br /&gt;
|-&lt;br /&gt;
|8.10||7.85&lt;br /&gt;
|-&lt;br /&gt;
|7.89||7.30&lt;br /&gt;
|-&lt;br /&gt;
|8.00||7.73&lt;br /&gt;
|-&lt;br /&gt;
|7.85||7.27&lt;br /&gt;
|-&lt;br /&gt;
|8.01||7.58&lt;br /&gt;
|-&lt;br /&gt;
|7.82||7.27&lt;br /&gt;
|-&lt;br /&gt;
|7.99||7.50&lt;br /&gt;
|-&lt;br /&gt;
|7.80||7.23&lt;br /&gt;
|-&lt;br /&gt;
|7.93||7.41&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 4.png]]&lt;br /&gt;
[[File:NonParamInference fig 5.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 6.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
*Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
**For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
**For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
*Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 7.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
*The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
**The WMW test uses rank ordering: Positive: Doesn’t depend on normality or population parameters Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
**The T-test uses the raw measurements: Positive: Incorporates all of the data into calculations Negative: Must meet normality assumption&lt;br /&gt;
**Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
*Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
*Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
*Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=3|Before Treatment&lt;br /&gt;
|-&lt;br /&gt;
|D +||D −||Total&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|After Treatment||D +||a=101||b=59||a+b=160&lt;br /&gt;
|-&lt;br /&gt;
|D −||c=121||d=33||c+d=154&lt;br /&gt;
|-&lt;br /&gt;
|Total||a+c=222||b+d=92||a+b+c+d=314&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
**Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
**The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
**The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
**An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
*General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good	Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	5	15	4	24&lt;br /&gt;
	Good	16	10	9	35&lt;br /&gt;
	Excellent	11	17	13	41&lt;br /&gt;
	Total	32	42	26	100&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good or Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	a=5	b=19	a+b=24&lt;br /&gt;
	Good or Excellent	c=27	d=49	c+d=76&lt;br /&gt;
	Total	a+c=32	b+d=68	a+b+c+d=100&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
	Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&lt;br /&gt;
Teaching Method&lt;br /&gt;
	Method 1	Method 2	Method 3	Method 4&lt;br /&gt;
Index	65	75	59	94&lt;br /&gt;
	87	69	78	89&lt;br /&gt;
	73	83	67	80&lt;br /&gt;
	79	81	62	88&lt;br /&gt;
&lt;br /&gt;
	The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
	Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
	The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
	Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
	Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
	Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_7.png&amp;diff=13368</id>
		<title>File:NonParamInference fig 7.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_7.png&amp;diff=13368"/>
		<updated>2014-08-14T17:45:24Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13367</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13367"/>
		<updated>2014-08-14T17:44:50Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
&lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
*Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Location 1||Location 2&lt;br /&gt;
|-&lt;br /&gt;
|8.10||7.85&lt;br /&gt;
|-&lt;br /&gt;
|7.89||7.30&lt;br /&gt;
|-&lt;br /&gt;
|8.00||7.73&lt;br /&gt;
|-&lt;br /&gt;
|7.85||7.27&lt;br /&gt;
|-&lt;br /&gt;
|8.01||7.58&lt;br /&gt;
|-&lt;br /&gt;
|7.82||7.27&lt;br /&gt;
|-&lt;br /&gt;
|7.99||7.50&lt;br /&gt;
|-&lt;br /&gt;
|7.80||7.23&lt;br /&gt;
|-&lt;br /&gt;
|7.93||7.41&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 4.png]]&lt;br /&gt;
[[File:NonParamInference fig 5.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 6.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
*Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
**For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
**For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
*Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 7.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
	The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
	The WMW test uses rank ordering&lt;br /&gt;
Positive: Doesn’t depend on normality or population parameters&lt;br /&gt;
Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
	The T-test uses the raw measurements&lt;br /&gt;
Positive: Incorporates all of the data into calculations&lt;br /&gt;
Negative: Must meet normality assumption&lt;br /&gt;
	Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
	Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
	Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
	Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&lt;br /&gt;
 	Before Treatment&lt;br /&gt;
	D +	D −	Total&lt;br /&gt;
After Treatment	D +	a=101	b=59	a+b=160&lt;br /&gt;
	D −	c=121	d=33	c+d=154&lt;br /&gt;
	Total	a+c=222	b+d=92	a+b+c+d=314&lt;br /&gt;
&lt;br /&gt;
	Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
	The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
	The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
	An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
	General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good	Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	5	15	4	24&lt;br /&gt;
	Good	16	10	9	35&lt;br /&gt;
	Excellent	11	17	13	41&lt;br /&gt;
	Total	32	42	26	100&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good or Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	a=5	b=19	a+b=24&lt;br /&gt;
	Good or Excellent	c=27	d=49	c+d=76&lt;br /&gt;
	Total	a+c=32	b+d=68	a+b+c+d=100&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
	Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&lt;br /&gt;
Teaching Method&lt;br /&gt;
	Method 1	Method 2	Method 3	Method 4&lt;br /&gt;
Index	65	75	59	94&lt;br /&gt;
	87	69	78	89&lt;br /&gt;
	73	83	67	80&lt;br /&gt;
	79	81	62	88&lt;br /&gt;
&lt;br /&gt;
	The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
	Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
	The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
	Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
	Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
	Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_6.png&amp;diff=13366</id>
		<title>File:NonParamInference fig 6.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_6.png&amp;diff=13366"/>
		<updated>2014-08-14T17:43:09Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13365</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13365"/>
		<updated>2014-08-14T17:42:57Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
&lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
*Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Location 1||Location 2&lt;br /&gt;
|-&lt;br /&gt;
|8.10||7.85&lt;br /&gt;
|-&lt;br /&gt;
|7.89||7.30&lt;br /&gt;
|-&lt;br /&gt;
|8.00||7.73&lt;br /&gt;
|-&lt;br /&gt;
|7.85||7.27&lt;br /&gt;
|-&lt;br /&gt;
|8.01||7.58&lt;br /&gt;
|-&lt;br /&gt;
|7.82||7.27&lt;br /&gt;
|-&lt;br /&gt;
|7.99||7.50&lt;br /&gt;
|-&lt;br /&gt;
|7.80||7.23&lt;br /&gt;
|-&lt;br /&gt;
|7.93||7.41&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 4.png]]&lt;br /&gt;
[[File:NonParamInference fig 5.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 6.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
*Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
	For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
	For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
	Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
	The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
	The WMW test uses rank ordering&lt;br /&gt;
Positive: Doesn’t depend on normality or population parameters&lt;br /&gt;
Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
	The T-test uses the raw measurements&lt;br /&gt;
Positive: Incorporates all of the data into calculations&lt;br /&gt;
Negative: Must meet normality assumption&lt;br /&gt;
	Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
	Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
	Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
	Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&lt;br /&gt;
 	Before Treatment&lt;br /&gt;
	D +	D −	Total&lt;br /&gt;
After Treatment	D +	a=101	b=59	a+b=160&lt;br /&gt;
	D −	c=121	d=33	c+d=154&lt;br /&gt;
	Total	a+c=222	b+d=92	a+b+c+d=314&lt;br /&gt;
&lt;br /&gt;
	Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
	The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
	The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
	An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
	General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good	Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	5	15	4	24&lt;br /&gt;
	Good	16	10	9	35&lt;br /&gt;
	Excellent	11	17	13	41&lt;br /&gt;
	Total	32	42	26	100&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good or Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	a=5	b=19	a+b=24&lt;br /&gt;
	Good or Excellent	c=27	d=49	c+d=76&lt;br /&gt;
	Total	a+c=32	b+d=68	a+b+c+d=100&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
	Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&lt;br /&gt;
Teaching Method&lt;br /&gt;
	Method 1	Method 2	Method 3	Method 4&lt;br /&gt;
Index	65	75	59	94&lt;br /&gt;
	87	69	78	89&lt;br /&gt;
	73	83	67	80&lt;br /&gt;
	79	81	62	88&lt;br /&gt;
&lt;br /&gt;
	The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
	Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
	The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
	Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
	Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
	Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_5.png&amp;diff=13364</id>
		<title>File:NonParamInference fig 5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_5.png&amp;diff=13364"/>
		<updated>2014-08-14T17:40:56Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_4.png&amp;diff=13363</id>
		<title>File:NonParamInference fig 4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_4.png&amp;diff=13363"/>
		<updated>2014-08-14T17:40:34Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13362</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13362"/>
		<updated>2014-08-14T17:40:17Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
&lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
*Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:40%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Location 1||Location 2&lt;br /&gt;
|-&lt;br /&gt;
|8.10||7.85&lt;br /&gt;
|-&lt;br /&gt;
|7.89||7.30&lt;br /&gt;
|-&lt;br /&gt;
|8.00||7.73&lt;br /&gt;
|-&lt;br /&gt;
|7.85||7.27&lt;br /&gt;
|-&lt;br /&gt;
|8.01||7.58&lt;br /&gt;
|-&lt;br /&gt;
|7.82||7.27&lt;br /&gt;
|-&lt;br /&gt;
|7.99||7.50&lt;br /&gt;
|-&lt;br /&gt;
|7.80||7.23&lt;br /&gt;
|-&lt;br /&gt;
|7.93||7.41&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 4.png]]&lt;br /&gt;
[[File:NonParamInference fig 5.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
	The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
	Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
	For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
	For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
	Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
	The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
	The WMW test uses rank ordering&lt;br /&gt;
Positive: Doesn’t depend on normality or population parameters&lt;br /&gt;
Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
	The T-test uses the raw measurements&lt;br /&gt;
Positive: Incorporates all of the data into calculations&lt;br /&gt;
Negative: Must meet normality assumption&lt;br /&gt;
	Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
	Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
	Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
	Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&lt;br /&gt;
 	Before Treatment&lt;br /&gt;
	D +	D −	Total&lt;br /&gt;
After Treatment	D +	a=101	b=59	a+b=160&lt;br /&gt;
	D −	c=121	d=33	c+d=154&lt;br /&gt;
	Total	a+c=222	b+d=92	a+b+c+d=314&lt;br /&gt;
&lt;br /&gt;
	Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
	The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
	The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
	An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
	General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good	Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	5	15	4	24&lt;br /&gt;
	Good	16	10	9	35&lt;br /&gt;
	Excellent	11	17	13	41&lt;br /&gt;
	Total	32	42	26	100&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good or Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	a=5	b=19	a+b=24&lt;br /&gt;
	Good or Excellent	c=27	d=49	c+d=76&lt;br /&gt;
	Total	a+c=32	b+d=68	a+b+c+d=100&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
	Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&lt;br /&gt;
Teaching Method&lt;br /&gt;
	Method 1	Method 2	Method 3	Method 4&lt;br /&gt;
Index	65	75	59	94&lt;br /&gt;
	87	69	78	89&lt;br /&gt;
	73	83	67	80&lt;br /&gt;
	79	81	62	88&lt;br /&gt;
&lt;br /&gt;
	The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
	Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
	The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
	Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
	Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
	Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_3.png&amp;diff=13361</id>
		<title>File:NonParamInference fig 3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_3.png&amp;diff=13361"/>
		<updated>2014-08-14T17:35:01Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13360</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13360"/>
		<updated>2014-08-14T17:34:50Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Patient||On Admission||At 6 Hours||Difference||Rank&lt;br /&gt;
|-&lt;br /&gt;
|2||59.1||56.7||-2.4||1&lt;br /&gt;
|-&lt;br /&gt;
|7||58.2||60.7||2.5||2&lt;br /&gt;
|-&lt;br /&gt;
|9||56.0||59.5||3.5||3&lt;br /&gt;
|-&lt;br /&gt;
|10||65.3||59.8||-5.5||4&lt;br /&gt;
|-&lt;br /&gt;
|3||56.1||61.9||5.8||5&lt;br /&gt;
|-&lt;br /&gt;
|5||60.6||67.7||7.1||6&lt;br /&gt;
|-&lt;br /&gt;
|6||37.8||50.0||12.2||7&lt;br /&gt;
|-&lt;br /&gt;
|1||39.7||52.9||13.2||8&lt;br /&gt;
|-&lt;br /&gt;
|4||57.7||71.4||13.7||9&lt;br /&gt;
|-&lt;br /&gt;
|8||33.6||51.3||17.7||10&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
	Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&lt;br /&gt;
Location 1	Location 2&lt;br /&gt;
8.10	7.85&lt;br /&gt;
7.89	7.30&lt;br /&gt;
8.00	7.73&lt;br /&gt;
7.85	7.27&lt;br /&gt;
8.01	7.58&lt;br /&gt;
7.82	7.27&lt;br /&gt;
7.99	7.50&lt;br /&gt;
7.80	7.23&lt;br /&gt;
7.93	7.41&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
	The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
	Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
	For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
	For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
	Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
	The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
	The WMW test uses rank ordering&lt;br /&gt;
Positive: Doesn’t depend on normality or population parameters&lt;br /&gt;
Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
	The T-test uses the raw measurements&lt;br /&gt;
Positive: Incorporates all of the data into calculations&lt;br /&gt;
Negative: Must meet normality assumption&lt;br /&gt;
	Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
	Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
	Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
	Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&lt;br /&gt;
 	Before Treatment&lt;br /&gt;
	D +	D −	Total&lt;br /&gt;
After Treatment	D +	a=101	b=59	a+b=160&lt;br /&gt;
	D −	c=121	d=33	c+d=154&lt;br /&gt;
	Total	a+c=222	b+d=92	a+b+c+d=314&lt;br /&gt;
&lt;br /&gt;
	Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
	The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
	The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
	An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
	General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good	Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	5	15	4	24&lt;br /&gt;
	Good	16	10	9	35&lt;br /&gt;
	Excellent	11	17	13	41&lt;br /&gt;
	Total	32	42	26	100&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good or Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	a=5	b=19	a+b=24&lt;br /&gt;
	Good or Excellent	c=27	d=49	c+d=76&lt;br /&gt;
	Total	a+c=32	b+d=68	a+b+c+d=100&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
	Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&lt;br /&gt;
Teaching Method&lt;br /&gt;
	Method 1	Method 2	Method 3	Method 4&lt;br /&gt;
Index	65	75	59	94&lt;br /&gt;
	87	69	78	89&lt;br /&gt;
	73	83	67	80&lt;br /&gt;
	79	81	62	88&lt;br /&gt;
&lt;br /&gt;
	The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
	Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
	The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
	Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
	Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
	Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_2.png&amp;diff=13359</id>
		<title>File:NonParamInference fig 2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_2.png&amp;diff=13359"/>
		<updated>2014-08-14T17:28:54Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13358</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13358"/>
		<updated>2014-08-14T17:28:41Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Non-Parametric Inference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 2.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
*The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
**Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&lt;br /&gt;
Patient	On Admission	At 6 Hours	Difference	Rank&lt;br /&gt;
2	59.1	56.7	-2.4	1&lt;br /&gt;
7	58.2	60.7	2.5	2&lt;br /&gt;
9	56.0	59.5	3.5	3&lt;br /&gt;
10	65.3	59.8	-5.5	4&lt;br /&gt;
3	56.1	61.9	5.8	5&lt;br /&gt;
5	60.6	67.7	7.1	6&lt;br /&gt;
6	37.8	50.0	12.2	7&lt;br /&gt;
1	39.7	52.9	13.2	8&lt;br /&gt;
4	57.7	71.4	13.7	9&lt;br /&gt;
8	33.6	51.3	17.7	10&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
	Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&lt;br /&gt;
Location 1	Location 2&lt;br /&gt;
8.10	7.85&lt;br /&gt;
7.89	7.30&lt;br /&gt;
8.00	7.73&lt;br /&gt;
7.85	7.27&lt;br /&gt;
8.01	7.58&lt;br /&gt;
7.82	7.27&lt;br /&gt;
7.99	7.50&lt;br /&gt;
7.80	7.23&lt;br /&gt;
7.93	7.41&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
	The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
	Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
	For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
	For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
	Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
	The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
	The WMW test uses rank ordering&lt;br /&gt;
Positive: Doesn’t depend on normality or population parameters&lt;br /&gt;
Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
	The T-test uses the raw measurements&lt;br /&gt;
Positive: Incorporates all of the data into calculations&lt;br /&gt;
Negative: Must meet normality assumption&lt;br /&gt;
	Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
	Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
	Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
	Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&lt;br /&gt;
 	Before Treatment&lt;br /&gt;
	D +	D −	Total&lt;br /&gt;
After Treatment	D +	a=101	b=59	a+b=160&lt;br /&gt;
	D −	c=121	d=33	c+d=154&lt;br /&gt;
	Total	a+c=222	b+d=92	a+b+c+d=314&lt;br /&gt;
&lt;br /&gt;
	Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
	The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
	The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
	An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
	General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good	Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	5	15	4	24&lt;br /&gt;
	Good	16	10	9	35&lt;br /&gt;
	Excellent	11	17	13	41&lt;br /&gt;
	Total	32	42	26	100&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good or Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	a=5	b=19	a+b=24&lt;br /&gt;
	Good or Excellent	c=27	d=49	c+d=76&lt;br /&gt;
	Total	a+c=32	b+d=68	a+b+c+d=100&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
	Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&lt;br /&gt;
Teaching Method&lt;br /&gt;
	Method 1	Method 2	Method 3	Method 4&lt;br /&gt;
Index	65	75	59	94&lt;br /&gt;
	87	69	78	89&lt;br /&gt;
	73	83	67	80&lt;br /&gt;
	79	81	62	88&lt;br /&gt;
&lt;br /&gt;
	The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
	Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
	The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
	Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
	Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
	Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_1.png&amp;diff=13357</id>
		<title>File:NonParamInference fig 1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:NonParamInference_fig_1.png&amp;diff=13357"/>
		<updated>2014-08-14T17:26:58Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13356</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13356"/>
		<updated>2014-08-14T17:26:45Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Non-Parametric Inference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:NonParamInference fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
 &lt;br /&gt;
	The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
	Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&lt;br /&gt;
Patient	On Admission	At 6 Hours	Difference	Rank&lt;br /&gt;
2	59.1	56.7	-2.4	1&lt;br /&gt;
7	58.2	60.7	2.5	2&lt;br /&gt;
9	56.0	59.5	3.5	3&lt;br /&gt;
10	65.3	59.8	-5.5	4&lt;br /&gt;
3	56.1	61.9	5.8	5&lt;br /&gt;
5	60.6	67.7	7.1	6&lt;br /&gt;
6	37.8	50.0	12.2	7&lt;br /&gt;
1	39.7	52.9	13.2	8&lt;br /&gt;
4	57.7	71.4	13.7	9&lt;br /&gt;
8	33.6	51.3	17.7	10&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
	Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&lt;br /&gt;
Location 1	Location 2&lt;br /&gt;
8.10	7.85&lt;br /&gt;
7.89	7.30&lt;br /&gt;
8.00	7.73&lt;br /&gt;
7.85	7.27&lt;br /&gt;
8.01	7.58&lt;br /&gt;
7.82	7.27&lt;br /&gt;
7.99	7.50&lt;br /&gt;
7.80	7.23&lt;br /&gt;
7.93	7.41&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
	The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
	Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
	For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
	For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
	Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
	The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
	The WMW test uses rank ordering&lt;br /&gt;
Positive: Doesn’t depend on normality or population parameters&lt;br /&gt;
Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
	The T-test uses the raw measurements&lt;br /&gt;
Positive: Incorporates all of the data into calculations&lt;br /&gt;
Negative: Must meet normality assumption&lt;br /&gt;
	Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
	Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
	Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
	Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&lt;br /&gt;
 	Before Treatment&lt;br /&gt;
	D +	D −	Total&lt;br /&gt;
After Treatment	D +	a=101	b=59	a+b=160&lt;br /&gt;
	D −	c=121	d=33	c+d=154&lt;br /&gt;
	Total	a+c=222	b+d=92	a+b+c+d=314&lt;br /&gt;
&lt;br /&gt;
	Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
	The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
	The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
	An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
	General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good	Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	5	15	4	24&lt;br /&gt;
	Good	16	10	9	35&lt;br /&gt;
	Excellent	11	17	13	41&lt;br /&gt;
	Total	32	42	26	100&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good or Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	a=5	b=19	a+b=24&lt;br /&gt;
	Good or Excellent	c=27	d=49	c+d=76&lt;br /&gt;
	Total	a+c=32	b+d=68	a+b+c+d=100&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
	Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&lt;br /&gt;
Teaching Method&lt;br /&gt;
	Method 1	Method 2	Method 3	Method 4&lt;br /&gt;
Index	65	75	59	94&lt;br /&gt;
	87	69	78	89&lt;br /&gt;
	73	83	67	80&lt;br /&gt;
	79	81	62	88&lt;br /&gt;
&lt;br /&gt;
	The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
	Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
	The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
	Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
	Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
	Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13355</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13355"/>
		<updated>2014-08-14T17:15:43Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Non-Parametric Inference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Non-Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Nonparametric inference is descriptive and inferential statistics made that are not based on parametrized families of probability distributions, which is the basis of the parametric inference we discussed in HS 550. That is, nonparametric inference made no assumptions about the probability distributions of the variables assessed and the model structure is not specified a priori but is determined from data instead. The term nonparametric is not strictly referring to models completely lack of parameters but that the number and nature of the parameters are flexible and not fixed in advance. In this lecture, we are going to introduce to the area of nonparametric inference and illustrate various nonparametric inference applications with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have discussed about parametric inference where the inference is made based on the assumptions of the probability distributions of the variables being assessed. What if such an assumption is violated and variables studied cannot be categorized into a parametrized family of probability distribution? Distribution-free (nonparametric) statistical methods would be the answer to solving problems in such situation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Differences of Median of Two Paired Samples: the sign test and the Wilcoxon signed rand test are the simplest nonparametric tests, which are also alternatives to the one-sample and paired t-test.&lt;br /&gt;
&lt;br /&gt;
*Motivational Clinical Example: the relative risk of mortality from 16 studies of septic patients is reported, which measures whether the patients developed complications of acute renal failure. A relative risk of 1.0 means no effect and relative risk ≠1 suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal was to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality from the cumulative evidence in these 16 studies and the data is recorded as below. The data is heavily skewed and not bell-shaped and apparently not normally distributed, so the traditional paired t-test fails here.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Study||Relative Risk||Sign (Relative Risk -1)&lt;br /&gt;
|-&lt;br /&gt;
|1||0.75||-&lt;br /&gt;
|-&lt;br /&gt;
|2||2.03||+&lt;br /&gt;
|-&lt;br /&gt;
|3||2.29||+&lt;br /&gt;
|-&lt;br /&gt;
|4||2.11||+&lt;br /&gt;
|-&lt;br /&gt;
|5||0.80||-&lt;br /&gt;
|-&lt;br /&gt;
|6||1.50||+&lt;br /&gt;
|-&lt;br /&gt;
|7||0.79||-&lt;br /&gt;
|-&lt;br /&gt;
|8||1.01||+&lt;br /&gt;
|-&lt;br /&gt;
|9||1.23||+&lt;br /&gt;
|-&lt;br /&gt;
|10||1.48||+&lt;br /&gt;
|-&lt;br /&gt;
|11||2.45||+&lt;br /&gt;
|-&lt;br /&gt;
|12||1.02||+&lt;br /&gt;
|-&lt;br /&gt;
|13||1.03||+&lt;br /&gt;
|-&lt;br /&gt;
|14||1.30||+&lt;br /&gt;
|-&lt;br /&gt;
|15||1.54||+&lt;br /&gt;
|-&lt;br /&gt;
|16||1.27||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The Sign Test: a nonparametric alternative to the One-Sample and Paired T-Test and doesn’t require the data to be normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. It measures the difference between the ± signs and how distinct the difference is from our expectations to observe by chance alone. For the motivational example, if there were no effects of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a &amp;quot;-&amp;quot; sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a &amp;quot;+&amp;quot; sign). In the actual data, 3 studies had &amp;quot;-&amp;quot; signs and the remaining 13 studies had &amp;quot;+&amp;quot; signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. &lt;br /&gt;
**Calculations: suppose N_+ is the number of “+” signs and the significance level α=0.05; the hypotheses: H_0:N_+=8;vs.H_a: N_+≠8 (the effect of developing acute renal failure is not significant on the outcome from sepsis vs. the effect of developing acute renal failure is significant on the outcome from sepsis). Define the following test statistics: B_S=max⁡(N_+,N_- ), where N_+ and N_- are the number of positive and negative sings respectively. For the example above, we have B_S=max⁡(N_+,N_- )=max⁡(13,3)=13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13))=0.010635. Therefore, we can reject the null hypothesis H_0 and conclude that the significant effect of developing acute renal failure on the outcome from sepsis.&lt;br /&gt;
**Example of set of 12 identical twins given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of nature pairing in a set of twins these data can be considered paired.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Twin-Index||1st Born||2nd Born||Sign&lt;br /&gt;
|-&lt;br /&gt;
|1||86||88||-&lt;br /&gt;
|-&lt;br /&gt;
|2||71||77||-&lt;br /&gt;
|-&lt;br /&gt;
|3||77||76||+&lt;br /&gt;
|-&lt;br /&gt;
|4||68||64||+&lt;br /&gt;
|-&lt;br /&gt;
|5||91||96||-&lt;br /&gt;
|-&lt;br /&gt;
|6||72||72||0 (Drop)&lt;br /&gt;
|-&lt;br /&gt;
|7||77||65||+&lt;br /&gt;
|-&lt;br /&gt;
|8||91||90||+&lt;br /&gt;
|-&lt;br /&gt;
|9||70||65||+&lt;br /&gt;
|-&lt;br /&gt;
|10||71||80||-&lt;br /&gt;
|-&lt;br /&gt;
|11||88||81||+&lt;br /&gt;
|-&lt;br /&gt;
|12||87||72||+&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First plot the data using SOCR Linear Chart (http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_LineChart) and observe that there seems to be no strong effect of the order of birth on baby’s regression.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Next, use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby’s aggressiveness. (p-value of 0.274 =&amp;gt; don’t reject the null hypothesis at 5% level of significance.)&lt;br /&gt;
 &lt;br /&gt;
	The Wilcoxon Signed Rank Test: comparisons of differences between measurements and requires that the data are measured at an interval level of measurements but does not require assumptions about the form of the distribution of the measurements. It is used whenever the distributional assumption of the t-test is not satisfied.&lt;br /&gt;
	Motivational example: data on the central venous oxygen saturation (SvO2 (%)) from 10 consecutive patients at 2 time points, at admission and 6 hours after admission to the intensive care unit (ICU) are recorded. H_0: there is no effect of 6 hours of ICU treatment on SvO2, which states that the mean of the differences between SvO2 at admission and that 6 hours after admission should be zero. The data are recorded as below:&lt;br /&gt;
&lt;br /&gt;
Patient	On Admission	At 6 Hours	Difference	Rank&lt;br /&gt;
2	59.1	56.7	-2.4	1&lt;br /&gt;
7	58.2	60.7	2.5	2&lt;br /&gt;
9	56.0	59.5	3.5	3&lt;br /&gt;
10	65.3	59.8	-5.5	4&lt;br /&gt;
3	56.1	61.9	5.8	5&lt;br /&gt;
5	60.6	67.7	7.1	6&lt;br /&gt;
6	37.8	50.0	12.2	7&lt;br /&gt;
1	39.7	52.9	13.2	8&lt;br /&gt;
4	57.7	71.4	13.7	9&lt;br /&gt;
8	33.6	51.3	17.7	10&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Result: the one-sided and two-sided alternative hypotheses p-values for the Wilcoxon Signed Rank Test reported by the SOCR Analysis are 0.011 and 0.022 respectively.&lt;br /&gt;
Result output and interpretation: &lt;br /&gt;
Variable 1 = At_Admission&lt;br /&gt;
Variable 2 = 6_Hrs_Later&lt;br /&gt;
Results of Two Paired Sample Wilcoxon Signed Rank Test:&lt;br /&gt;
Wilcoxon Signed-Rank Statistic = 5.000: [data-driven estimate of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
E(W+), Wilcoxon Signed-Rank Score = 27.500: [Wilcoxon Signed-Rank Score = expectation of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Var(W+), Variance of Score = 96.250: [Variance of Score = variance of the Wilcoxon Signed-Rank Statistic].&lt;br /&gt;
Wilcoxon Signed-Rank Z-Score = -2.293 [Z-score=(W_stat-E(W_+))/√(Var(W_+))].&lt;br /&gt;
One-Sided P-Value = .011: [the one-sided (uni-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
Two-Sided P-Value = .022: [the double-sided (non-directional) probability value expressing the strength of the evidence in the data to reject the null hypothesis that the two populations have the same medians (based on Gaussian, standard Normal, distribution)].&lt;br /&gt;
&lt;br /&gt;
3.2) Difference of Medians of Two Independent Samples: the Wilcoxon-Mann-Whitney (WMW) test is nonparametric test of assessing whether two samples from the same distribution.&lt;br /&gt;
&lt;br /&gt;
	Motivational Example: 9 observations of surface soil PH were made at two different independent locations. There is no pairing in this design though this is a balanced design with 9 observations in each group. The question is does the data suggest that the true mean soil PH values differs for the two locations. Testing using α=0.05 and be sure to check any necessary assumptions for the validity of the test.&lt;br /&gt;
&lt;br /&gt;
Location 1	Location 2&lt;br /&gt;
8.10	7.85&lt;br /&gt;
7.89	7.30&lt;br /&gt;
8.00	7.73&lt;br /&gt;
7.85	7.27&lt;br /&gt;
8.01	7.58&lt;br /&gt;
7.82	7.27&lt;br /&gt;
7.99	7.50&lt;br /&gt;
7.80	7.23&lt;br /&gt;
7.93	7.41&lt;br /&gt;
Plot the data and we can see that the distributions may be different or not even symmetric, unimodal and bell-shaped. Therefore, the independent t-test fails to test a Null-hypothesis that the centers of the two distributions are identical.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
The first figure shows the index plot of the pH levels for both samples. The second figure shows the sample histograms of these samples, which are clearly not Normal-like. Therefore, the independent t-test would not be appropriate to analyze these data.&lt;br /&gt;
&lt;br /&gt;
Intuitively, we may consider these group differences significantly large, especially if we look at the Box-and-Whisker Plots, but this is a qualitative inference that demands a more quantitative statistical analysis that can back up our intuition.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
	The Wilcoxon-Mann-Whitney Test (WMW): a non-parametric test for assessing whether two samples come from the same distribution. The null hypothesis is that the two samples are drawn from a single population, and therefore that their probability distributions are equal. It requires that the two samples are independent, and that the observations are ordinal or continuous measurements.&lt;br /&gt;
	Calculations: The U statistic for the WMW test may be approximated for sample sizes above about 20 using the normal distribution. The U test is provided as part of SOCR analyses http://socr.umich.edu/html/ana/ &lt;br /&gt;
	For small samples: (1) Choose the sample for which the ranks seem to be smaller. Call this Sample 1, and call the other sample Sample 2; (2) Taking each observation in Sample 2, count the number of observations in Sample 1 that are smaller than it (count 0.5 for any that are equal to it); (3) The total of these counts is U.&lt;br /&gt;
	For larger samples: (1) Arrange all the observations into a single ranked series. That is, rank all the observations without regard to which sample they come from; (2) Add up the ranks in Sample 1, The sum of ranks in Sample 2 follows by calculation, since the sum of all the ranks equals N (N + 1)/2, where N is the total number of observations; (3) U is given by the formula: U_1=R_1-(n_1 (n_1+1))/2, where n_1 is the two sample size for Sample 1, and R_1 is the sum of the ranks in Sample 1. there is no specification as to which sample is considered Sample 1. An equally valid formula for U is U_2=R_2-(n_2 (n_2+1))/2, the sum of the two values is given by U_1+U_2=R_1-(n_1 (n_1+1))/2+R_2-(n_2 (n_2+1))/2. Given that R_1+R_2=N(N+1)/2 and N=n_1+n_2, hence we have U_1+U_2=n_1 n_2. The maximum value of U is the product of the sample sizes.&lt;br /&gt;
	Application using SOCR analyses: it is much quicker to use SOCR analyses to compute the statistical significance of the sign test. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clearly the p value &amp;lt; 0.05 and therefore our data provides sufficient evidence to reject the null hypothesis. So we assume that there were significant PH differences between the two soil lots tested in this experiment.&lt;br /&gt;
One-sided P-value for Sample 2 &amp;lt; Sample 1 = 0.00040.&lt;br /&gt;
Two-sided P-value for Sample 1 not equal to Sample 2 = 0.00079.&lt;br /&gt;
 &lt;br /&gt;
	The WMW Tess vs. Independent T-test: Both types of tests answer the same question but they treat data differently.&lt;br /&gt;
	The WMW test uses rank ordering&lt;br /&gt;
Positive: Doesn’t depend on normality or population parameters&lt;br /&gt;
Negative: Distribution free lacks power because it doesn't use all the info in the data&lt;br /&gt;
	The T-test uses the raw measurements&lt;br /&gt;
Positive: Incorporates all of the data into calculations&lt;br /&gt;
Negative: Must meet normality assumption&lt;br /&gt;
	Neither test is uniformly superior. If the data are normally distributed we use the T-test. If the data are not normal use the WMW test.&lt;br /&gt;
&lt;br /&gt;
3.3) Differences of Proportions of Two Samples: depending upon whether the samples are dependent or independent where different statistical tests are applied.&lt;br /&gt;
&lt;br /&gt;
	Differences of proportions of two independent samples: If the samples are independent and we are interested in the differences in the proportions of subjects of the same trait (a characteristic of each observation, e.g., gender) we need to use the standard proportion tests. For small sample sizes, we use corrected proportion (p ̃) that and we use the raw sample proportion (p ̂) in large samples. &lt;br /&gt;
	Differences of proportions of two paired samples: If the samples are paired, then we can employ the McNemar's non-parametric test for differences in proportions in matched pair samples. It is most often used when the observed variable is a dichotomous variable (presence or absence of a trait/characteristic for each observation).&lt;br /&gt;
	Example: suppose a medical doctor is interested in determining the effect of a drug on a particular disease (D). Suppose the doctor conducts a study and records the frequencies of incidence of the disease (D+ and D− ) in a random population before the treatment with the new drug takes place. Then the doctor prescribes the treatment to all subjects and records the incidence of the disease in the rows following the treatment. The test requires the same subjects to be included in the before- and after-treatment measurements (matched pairs).&lt;br /&gt;
&lt;br /&gt;
 	Before Treatment&lt;br /&gt;
	D +	D −	Total&lt;br /&gt;
After Treatment	D +	a=101	b=59	a+b=160&lt;br /&gt;
	D −	c=121	d=33	c+d=154&lt;br /&gt;
	Total	a+c=222	b+d=92	a+b+c+d=314&lt;br /&gt;
&lt;br /&gt;
	Marginal homogeneity occurs when the row totals equal to the column totals, a and d in each equation can be cancelled; leaving b equal to c: a+b=a+c, c+d=b+d. In this example, marginal homogeneity would mean there was no effect of the treatment.&lt;br /&gt;
	The mcNemar statistic is shown: χ_0^2=(b-c)^2/(b+c)~χ_(df=1)^2&lt;br /&gt;
	The marginal frequencies are not homogeneous if the χ_0^2 result is significant p &amp;lt; 0.05. If b and/or c are small (b + c &amp;lt; 20) then χ_0^2 is not approximated by the Chi-Square Distribution and a Sign Test should instead be used.&lt;br /&gt;
	An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if (in the above example) pre- or post-treatment condition is more favorable.&lt;br /&gt;
	General McNemar test of marginal homogeneity for a single category: If we have observed measurements on a K-level categorical variable -- e.g., agreement between two evaluators summarized by a K×K classification table, where each row or column contains the number of individuals rated as part of this group by each evaluator. For instance, two instructors may evaluate students as 1=poor, 2=good and 3=excellent. There could be significant differences in the evaluations of the same students by the 2 instructors. Suppose we are interested in whether the proportions of students rated excellent by the 2 instructors are the same. Then we'll pool the poor and good categories together and form a 2x2 table that we can then use the 2x2 McNemar test statistics on, as shown below.&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good	Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	5	15	4	24&lt;br /&gt;
	Good	16	10	9	35&lt;br /&gt;
	Excellent	11	17	13	41&lt;br /&gt;
	Total	32	42	26	100&lt;br /&gt;
&lt;br /&gt;
		Evaluator 2&lt;br /&gt;
		Poor	Good or Excellent	Total&lt;br /&gt;
Evaluator 1	Poor	a=5	b=19	a+b=24&lt;br /&gt;
	Good or Excellent	c=27	d=49	c+d=76&lt;br /&gt;
	Total	a+c=32	b+d=68	a+b+c+d=100&lt;br /&gt;
&lt;br /&gt;
To test marginal homogeneity for one single category (in this case poor evaluation) means to test row/column marginal homogeneity for the first category (poor). This is achieved by collapsing all rows and columns corresponding to the other categories.&lt;br /&gt;
χ_o^2=(b-c)^2/(b+c)=(-8)^2/46=1.39 ~ χ_(df=1)^2&lt;br /&gt;
P( χ_(df=1)^2&amp;gt;1.39)=0.238405&lt;br /&gt;
Therefore, we don’t have sufficient evidence to reject the null hypothesis of two evaluators were consistent in their ratings of students.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
3.4) Differences of Means of Several Independent Samples: extend the multi-sample inference discussed in ANOVA to the situation where ANOVA assumptions are invalid.&lt;br /&gt;
	Motivational Example: Suppose four groups of students are randomly assigned to be taught with four different techniques, and their achievement test scores are recorded. Are the distributions of test scores the same, or do they differ in location? The data is presented in the table below. The small sample sizes and the lack of distribution information of each sample illustrate how ANOVA may not be appropriate for analyzing these types of data.&lt;br /&gt;
&lt;br /&gt;
Teaching Method&lt;br /&gt;
	Method 1	Method 2	Method 3	Method 4&lt;br /&gt;
Index	65	75	59	94&lt;br /&gt;
	87	69	78	89&lt;br /&gt;
	73	83	67	80&lt;br /&gt;
	79	81	62	88&lt;br /&gt;
&lt;br /&gt;
	The Kruskal-Wallis Test: Kruskal-Wallis One-Way Analysis of Variance by ranks is a non-parametric method for testing equality of two or more population medians. Intuitively, it is identical to a One-way Analysis of Variance with the raw data (observed measurements) replaced by their ranks. Since it is a non-parametric method, the Kruskal-Wallis Test does not assume a normal population, unlike the analogous one-way ANOVA. However, the test does assume identically-shaped distributions for all groups, except for any difference in their centers (e.g., medians).&lt;br /&gt;
	Calculations: Let N be the total number of observations and N=∑_(i=1)^k▒n_i  and R(X_ij) be the rank assigned to X_ij and let R_i be the sum of ranks assigned to the i^th sample and R_i=∑_(i=1)^(n_i)▒〖R(X_ij)〗,i=1,2,…,k. &lt;br /&gt;
The SOCR program computes R_i for each sample. The test statistic is defined for the following formulation of hypotheses:&lt;br /&gt;
H_o: All of the k population distribution functions are identical.&lt;br /&gt;
H_a: At least one of the populations tends to yield larger observations than at least one of the other populations.&lt;br /&gt;
Suppose {X_(i,1),X_(i,2),…,X_(i,n_i ) } represents the values of the i^th sample, where i≤i≤k.&lt;br /&gt;
Test statistics: T=(1/S^2)∑_(i=1)^k▒R_i^2 /n_i-N(N+1)^2/4, where S^2=(1/(N-1) ∑▒〖R(X_ij )^2 〗-N(N+1))^2/4.&lt;br /&gt;
Note: If there are no ties, then the test statistic is reduced to:&lt;br /&gt;
T=12/N(N+1)  ∑_(i=1)^k▒(R_i^2)/n_i -3(N+1).&lt;br /&gt;
However, the SOCR implementation allows for the possibility of having ties; so it uses the non-simplified, exact method of computation. Multiple comparisons have to be done here. For each pair of groups, the following is computed and printed at the Result Panel.&lt;br /&gt;
|R_i/n_i -R_j/n_j |&amp;gt;t_(1-α/2) ((S^2 (N-1-T))/(N-K))^(1/2)/(1/n_i +1/n_j )^(1/2)&lt;br /&gt;
The SOCR computation employs the exact method instead of the approximate one (Conover 1980), since computation is easy and fast to implement and the exact method is somewhat more accurate.&lt;br /&gt;
	The Kruskal-Wallis Test Using SOCR Analyses: It is much quicker to use SOCR Analyses to compute the statistical significance of this test. This SOCR Kruskal-Wallis Test Activity may also be helpful in understanding how to use this test in SOCR. For the teaching-methods example above, we can easily compute the statistical significance of the differences between the group medians (centers):&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Clearly, there is only one significant group difference between medians, after the multiple testing correction, for the group1 vs. group4 comparison (see below):&lt;br /&gt;
Group Method1 vs. Group Method2: 1.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method3: 4.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method1 vs. Group Method4: 6.0 &amp;gt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method3: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method2 vs. Group Method4: 5.0 &amp;lt; 5.2056&lt;br /&gt;
Group Method3 vs. Group Method4: 10.0 &amp;gt; 5.2056&lt;br /&gt;
&lt;br /&gt;
3.5) Differences of Variances of Independent Samples (variance homogeneity): different tests for variance equality can be applied. It is frequently necessary to test if k samples have equal variances. Homogeneity of variances is often a reference to equal variances across samples. Some statistical tests, for example the analysis of variance, assume that variances are equal across groups or samples.&lt;br /&gt;
	Calculation: The (modified) Fligner-Killeen test (the median-centering Fligner-Killeen test) provides the means for studying the homogeneity of variances of k populations { X_ij, for 1≤i≤n_j and 1≤j≤k}. The test jointly ranks the absolute values of |X_ij-(X_j ) ̃| and assigns increasing scores a_Ni=Φ^(-1)  ((1+i/(N+1)))/2, based on the ranks of all observations. In this test, (X_j ) ̃ is the sample median of the j^th population, and Φ(.) is the cumulative distribution function for Normal distribution. &lt;br /&gt;
	Fligner-Killeen test statistics: χ_o^2=(∑_(j=1)^k▒〖n_j ((A_j ) ̅-a ̅ )^2 〗)/V^2 , where (A_j ) ̅ is the mean score for the j^th sample, a ̅ is the overall mean score of all a_Nj and V^2 is the sample variance of all scores. We have N=∑_(j=1)^k▒n_j ,(A_j ) ̅=1/n_j  ∑_(j=1)^(n_j)▒a_(Nm_i ) , where a_(Nm_i ) is the increasing rank score for the i^th observation in the j^th sample, a ̅=1/N ∑_(i=1)^N▒a_Ni ,V^2=1/(N-1) ∑_(i=1)^N▒(a_Ni-a ̅ )^2 .&lt;br /&gt;
	Fligner-Killeen probabilities: for large sample size, the modified Fligner-Killeen test statistic has an asymptotic chi-square distribution with k-1 degrees of freedom χ_o^2~χ_(k-1)^2. &lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.jstor.org/discover/10.2307/2958850?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103957523251) presents a general introduction to nonparametric inference and the model involved and studied the existence of complete and sufficient statistics for this model. It gives an empirical process estimating the model and generalized the empirical cumulative hazard rate from survival analysis. Consistency and weak convergence results were given and tests for comparison of two counting processes, generalizing the two sample rank tests are defined and studied. Finally, it gives an application to a set of biological data.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://projecteuclid.org/euclid.aos/1033066215) presents a study relates a different solution to the challenge of constructing a sequence of functions, each based on only finite segments of the past, which together provide a strongly consistent estimator for the conditional probability of the next observation, given the infinite past. It also studied on some extensions to regression, pattern recognition and on-line forecasting.&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_TwoPairedSign &lt;br /&gt;
http://www.socr.ucla.edu/htmls/ana/TwoPairedSampleSign-Test_Analysis.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose 10 randomly selected rats were chosen to see if they could be trained to escape a maze. The rats were released and timed (seconds) before and after 2 weeks of training (N means the rat did not complete the maze-test). Do the data provide evidence to suggest that the escape time of rats is different after 2 weeks of training? Test using α = 0.05.&lt;br /&gt;
Rat	Before	After	Sign&lt;br /&gt;
1	100	50	+&lt;br /&gt;
2	38	12	+&lt;br /&gt;
3	N	45	+&lt;br /&gt;
4	122	62	+&lt;br /&gt;
5	95	90	+&lt;br /&gt;
6	116	100	+&lt;br /&gt;
7	56	75	-&lt;br /&gt;
8	135	52	+&lt;br /&gt;
9	104	44	+&lt;br /&gt;
10	N	50	+&lt;br /&gt;
&lt;br /&gt;
6.2) Automated brain volume segmentation is an important step in many modern computational brain mapping studies. Suppose we have two separate and competing versions of automated brain parsing (segmentation) algorithms that automatically tessellate (partition) the brain into 57 separate regions of interest (ROI’s). An important question then is how consistent are these 2 different techniques, across the 57 ROIs. We can use the ROI volume as a measure of the resulting automated brain parcellation and compare the paired differences between the 2 methods across all ROIs. The image shows an example of a brain parcellated into these 57 regions and the table below contains the volumes of the 57 ROIs for the 2 different brain tessellation techniques. Use appropriate SOCR analyses and relevant SOCR charts to argue whether or not the 2 different methods are consistent and agree on their ROI labels.&lt;br /&gt;
&lt;br /&gt;
Index	Volume_Intensity	ROI_Name	Method1_Volume	Method2_Volume&lt;br /&gt;
1	0	Background	9236455	9241667&lt;br /&gt;
2	21	L_superior_frontal_gyrus	78874	78693&lt;br /&gt;
3	22	R_superior_frontal_gyrus	69575	74391&lt;br /&gt;
4	23	L_middle_frontal_gyrus	67336	68872&lt;br /&gt;
5	24	R_middle_frontal_gyrus	68344	67024&lt;br /&gt;
6	25	L_inferior_frontal_gyrus	31912	21479&lt;br /&gt;
7	26	R_inferior_frontal_gyrus	26264	29035&lt;br /&gt;
8	27	L_precentral_gyrus	28942	33584&lt;br /&gt;
9	28	R_precentral_gyrus	35192	30537&lt;br /&gt;
10	29	L_middle_orbitofrontal_gyrus	10141	11608&lt;br /&gt;
11	30	R_middle_orbitofrontal_gyrus	9142	11850&lt;br /&gt;
12	31	L_lateral_orbitofrontal_gyrus	7164	5382&lt;br /&gt;
13	32	R_lateral_orbitofrontal_gyrus	5964	4947&lt;br /&gt;
14	33	L_gyrus_rectus	3840	1995&lt;br /&gt;
15	34	R_gyrus_rectus	2672	2994&lt;br /&gt;
16	41	L_postcentral_gyrus	24586	27672&lt;br /&gt;
17	42	R_postcentral_gyrus	21736	28159&lt;br /&gt;
18	43	L_superior_parietal_gyrus	25791	27500&lt;br /&gt;
19	44	R_superior_parietal_gyrus	28850	32674&lt;br /&gt;
20	45	L_supramarginal_gyrus	16445	22373&lt;br /&gt;
21	46	R_supramarginal_gyrus	11893	11018&lt;br /&gt;
22	47	L_angular_gyrus	20740	22245&lt;br /&gt;
23	48	R_angular_gyrus	20247	17793&lt;br /&gt;
24	49	L_precuneus	14491	12983&lt;br /&gt;
25	50	R_precuneus	15589	16323&lt;br /&gt;
26	61	L_superior_occipital_gyrus	6842	6106&lt;br /&gt;
27	62	R_superior_occipital_gyrus	5673	6539&lt;br /&gt;
28	63	L_middle_occipital_gyrus	15011	19085&lt;br /&gt;
29	64	R_middle_occipital_gyrus	19063	25747&lt;br /&gt;
30	65	L_inferior_occipital_gyrus	10411	8675&lt;br /&gt;
31	66	R_inferior_occipital_gyrus	12142	12277&lt;br /&gt;
32	67	L_cuneus	6935	9700&lt;br /&gt;
33	68	R_cuneus	7491	11765&lt;br /&gt;
34	81	L_superior_temporal_gyrus	29962	34934&lt;br /&gt;
35	82	R_superior_temporal_gyrus	30630	28788&lt;br /&gt;
36	83	L_middle_temporal_gyrus	27558	19633&lt;br /&gt;
37	84	R_middle_temporal_gyrus	26314	25301&lt;br /&gt;
38	85	L_inferior_temporal_gyrus	24817	24885&lt;br /&gt;
39	86	R_inferior_temporal_gyrus	25088	20661&lt;br /&gt;
40	87	L_parahippocampal_gyrus	6761	6977&lt;br /&gt;
41	88	R_parahippocampal_gyrus	6529	7964&lt;br /&gt;
42	89	L_lingual_gyrus	16752	14748&lt;br /&gt;
43	90	R_lingual_gyrus	20914	18500&lt;br /&gt;
44	91	L_fusiform_gyrus	16565	15020&lt;br /&gt;
45	92	R_fusiform_gyrus	14409	17311&lt;br /&gt;
46	101	L_insular_cortex	10779	9814&lt;br /&gt;
47	102	R_insular_cortex	8222	5599&lt;br /&gt;
48	121	L_cingulate_gyrus	14662	12490&lt;br /&gt;
49	122	R_cingulate_gyrus	16595	14489&lt;br /&gt;
50	161	L_caudate	1906	1608&lt;br /&gt;
51	162	R_caudate	2353	1997&lt;br /&gt;
52	163	L_putamen	3015	2622&lt;br /&gt;
53	164	R_putamen	2177	3758&lt;br /&gt;
54	165	L_hippocampus	3791	4454&lt;br /&gt;
55	166	R_hippocampus	3596	4673&lt;br /&gt;
56	181	cerebellum	174045	158617&lt;br /&gt;
57	182	brainstem	32567	28225&lt;br /&gt;
&lt;br /&gt;
6.3) Urinary Fluoride Concentration in Cattle: The urinary fluoride concentration (ppm) was measured both for a sample of livestock grazing in an area previously exposed to fluoride pollution and also for a similar sample of livestock grazing in an unpolluted area.&lt;br /&gt;
Polluted	Unpolluted&lt;br /&gt;
21.3	10.1&lt;br /&gt;
18.7	18.3&lt;br /&gt;
21.4	17.2&lt;br /&gt;
17.1	18.4&lt;br /&gt;
11.1	20.0&lt;br /&gt;
20.9	&lt;br /&gt;
19.7	&lt;br /&gt;
&lt;br /&gt;
6.4) To study whether the variances in certain time period (e.g. 1981 to 2006) of the consumer-price-indices (CPI) of several items were significantly different. Use the SOCR CPI dataset (http://wiki.socr.umich.edu/index.php/SOCR_Data_Dinov_021808_ConsumerPriceIndex) to answer this question for the Fuel, Oil, Bananas, Tomatoes, Orange juice, Beef and Gasoline items. (Apply the methods introduced in Differences of variances of independent samples).&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13354</id>
		<title>SMHS ReliabilityValidity</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13354"/>
		<updated>2014-08-14T14:25:19Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Measurement Reliability and Validity ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Reliability and validity are two of the most commonly used criteria in choosing the ideal measurement. Reliability is the overall consistency of a measure that is the ability to produce similar results under consistent conditions. Validity is the extent to which a measurement is accurately to reflect the real fact that is the extent to which the measurement measures what it claims to measure. In the perfect situation, we would expect the measurement to be reliable and valid, though it is not always achievable. In fact, in many cases, we need to strike a balance between reliability and validity based on our objectives of the study in choosing the ideal measurement. In this section, we are going to discuss about the measurement reliability and validity and illustrate their application with examples and we are going to focus on the application of these two criteria in the field of epidemiology as an example.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In choosing an ideal measurement in the study, we are always encountered with the problem of whether it is capable of producing the similar results with consistent conditions and whether it is capable to measure what it claims to measure. Ideally, we would prefer to be able to measure the exact situation and to produce similar results when measured repeatedly in consistent conditions. In real studies, we would need to choose between measurements to strike a balance between these two aspects given the restrictions in real world. So, how do we choose between validity and reliability? How these two would influence the results of the test?&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Measurement: refers to the systematic, replicable process through which the objects are quantified or classified with respect to a particular dimension and is usually achieved by assigning numerical values to the objects measured. &lt;br /&gt;
*There are four levels of measurements (the relationship among the values assigned to the attributes for a variable): (1) Nominal measure: the numerical values just ‘name’ the attributes uniquely and no ordering of the cases is implied; (2) Ordinal measure: where the attributes can be rank-ordered while the distances between attributes don’t have any meaning. For example, the education background of the participants are measured in a study where 0=less than high school; 1=some high school; 2=high school degree; 3=some college; 4=college degree; 5=post college. (3) Interval measure: where the distance is meaningful in the measurement. For example, the temperature of the participants. (4) Ratio measure: an absolute zero is meaningful meaning that you can construct a meaningful fraction with a ratio variable.&lt;br /&gt;
*Variation in a repeated measure can be caused by (1) pure chance or unsystematic events caused by subject, observer, situations, instrument or data processing; (2) systematic inconsistency; (3) actual change in the underlying event being measured.&lt;br /&gt;
*Validity of a measure is the extent to which the measurement can describe or quantify what it intends to measure; reliability of a measure is the extent to which a measure can be depended upon to secure consistent results in repeated application.&lt;br /&gt;
&lt;br /&gt;
The following charts shows the three possible outcomes: (from left to right) valid not reliable, reliable not valid and valid and reliable.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:ReliabilityValidity Fig 1.png]][[File:ReliabilityValidity Fig 2.png]][[File:ReliabilityValidity Fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
3.2) Validity: validity is the extent to which the assessment measures what it is supposed to measure while reliability is the ability to replicate results on same sample if test if repeated. Within validity, we don’t always expect the measurements to produce the similar results in repeated tests. Similarly, a measure may not be valid within reliability. &lt;br /&gt;
&lt;br /&gt;
There are different types of validity:&lt;br /&gt;
*Construct validity: refers to the extent to which the operation actually measures what the theory intends to. It involves the empirical and theoretical support for the interpretation of the measure. (1) Convergent validity: refers to the extent to which a measure is correlated with other measures that it is theoretically correlated to; (2) Discriminant validity: refers to whether the measurement is supposed to be unrelated are unrelated.&lt;br /&gt;
*Content validity: refers to the non-statistical type of validity, which is to test the extent to which the content of the test matches the content associated with the construct. (1) Representation validity: the extent to which an abstract theoretical construct can be turned into a specific practical test; (2) Face validity: test whether the test appears to measure a certain criterion. &lt;br /&gt;
*Criterion validity: involves the correlation between the test and a criterion variable taken as representative of the construct and compares the test with other measures or outcomes. (1) Concurrent validity: refers to the extent to which the operation correlates with other measures with the same construct measured at the same time; (2) Predictive validity: refers to the extent to which the operation can predict other measures of the same construct measured at the same time.&lt;br /&gt;
*Experimental validity: validity of design of experimental research studies. (1) statistical conclusion validity: the extent to which conclusions about the relationship among variables based on the data are correct or reasonable, it involves ensuring the use of adequate sampling procedures, appropriate statistical tests and reliable measurement procedures; (2) internal validity: estimate the extent to which conclusions about causal relationships be made; (3) external validity: concerns the extent to which the results of the study can be held to be true in general case.&lt;br /&gt;
&lt;br /&gt;
3.3) Reliability (repeatability) of tests: can the results be replicated if the test is redone? The results may be influenced by three factors: (1) Intrasubject variation: variation within individual subjects; (2) Intraobserver variation: variation in reading of results by the same reader; (3) Interobserver variation: variation between those reading results.&lt;br /&gt;
*Types of Reliability: (1) Test-retest reliability: measure of reliability obtained by administering the same test twice over a period of time to a group of individuals; (2) Parallel forms reliability: measure of reliability obtained by administering different versions of an assessment tool to the same group of individuals; (3) Inter-rater reliability: measure of reliability used to assess the extent to which different judges or raters agree in their assessment decisions; (4) Internal consistency reliability: measure of reliability used to evaluate the extent to which different test items that probe the same construct produce similar results.&lt;br /&gt;
&lt;br /&gt;
3.4) Kappa statistic: Answers the question of ‘How much better is the agreement between observers than would be expected by chance alone?’&lt;br /&gt;
Kappa=((% agreement observed)-(% agreement expected by chance alone))/(100%-(% agreement expected by chance alone))&lt;br /&gt;
Percent agreement=(number in cells that 'agree')/(Total number readings)*100&lt;br /&gt;
Calculation of Kappa:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| ||colspan=3|Reader 1&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Reader 2|| ||Positive||Negative&lt;br /&gt;
|-&lt;br /&gt;
|Positive||180||40&lt;br /&gt;
|-&lt;br /&gt;
|Negative||50||230&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
*Percent agreement: (1) proportion of tests reader 1 rate as positive =(180+50)/500=46%; proportion of tests reader 1 rate as negative =54%; if the results from reader 1 and reader 2 are independent, then reader 1 should have 46% positives regardless of reader 2’s scores.&lt;br /&gt;
*Expected agreement based on chance alone: for 220 times reader 2 is positive, we expect reader 1 will be positive 46% of the time; for 280 times reader 2 is negative, we expect reader 1 will be negative 54% of the time:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| ||colspan=3|Reader 1&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Reader 2|| ||Positive||Negative&lt;br /&gt;
|-&lt;br /&gt;
|Positive||101||119&lt;br /&gt;
|-&lt;br /&gt;
|Negative||129||151&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
*Expected agreement by chance =(101+151)/500=50.4%.&lt;br /&gt;
*Observed agreement = 82%; expected agreement based on chance = 50.4%. Kappa=((% agreement observed)-(% agreement expected by chance alone))/(100%-(% agreement expected by chance alone))=(82%-50.4%)/(100%-50.4%)=63.71%&lt;br /&gt;
Interpretation of Kappa: &amp;gt; 0.75 excellent; 0.4 – 0.75 intermediate to good; &amp;lt; 0.40 poor reliability.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.socialresearchmethods.net/kb/constval.php) presents a comprehensive introduction to measurements, validity and reliability and illustrate the concepts and application with examples. It is very well developed and would be a great introduction to the material we are going to cover in this lecture.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.egadconnection.org/Reliability%20and%20validity.pdf) presents a general introduction to reliability, validity and generalizability and studied on various problems with measurement. It gives comprehensive analysis of reliability and validity with definitions, different ways to measure reliability and validity as well as problems associated with these characteristics. This would be a great start to get to know measurement reliability and validity.&lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://psycnet.apa.org/psycinfo/1995-00092-001) assessed the reliability and validity of the Childhood Trauma Questionnaire (CTQ), a retrospective measure of child abuse and neglect. 286 drug- or alcohol-dependent patients (aged 24–68 years) were given the CTQ as part of a larger test battery, and 40 of these patients were given the questionnaire again after an interval of 2–6 months. 68 Ss were also given the Childhood Trauma Interview. Principal-components analysis of responses on the CTQ yielded 4 rotated orthogonal factors: physical and emotional abuse, emotional neglect, sexual abuse, and physical neglect. The CTQ demonstrated high internal consistency and good test-retest reliability over an interval of 2–6 months. The CTQ also demonstrated convergence with the Childhood Trauma Interview indicating that Ss' reports of child abuse and neglect based on the CTQ were highly stable, both over time and across types of instruments. &lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
none&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
6.1) In public health practice, optimizing the validity of tests is important in order to:&lt;br /&gt;
&lt;br /&gt;
a. reduce health care costs&lt;br /&gt;
&lt;br /&gt;
b. reduce unnecessary stress for patients&lt;br /&gt;
&lt;br /&gt;
c. Be able to identify opportunities for intervention early in the course of disease&lt;br /&gt;
&lt;br /&gt;
d. all of the above&lt;br /&gt;
&lt;br /&gt;
6.2) The Kappa statistic is used to measure ___ of a test?&lt;br /&gt;
&lt;br /&gt;
a. sensitivity&lt;br /&gt;
&lt;br /&gt;
b. reliability&lt;br /&gt;
&lt;br /&gt;
c. positive predictive value&lt;br /&gt;
&lt;br /&gt;
d. specificity&lt;br /&gt;
&lt;br /&gt;
6.3) Randomization of treatment groups ensures the study’s external validity.&lt;br /&gt;
&lt;br /&gt;
a. True&lt;br /&gt;
&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.4) In a study investigating whether a new serum-based screening test for pancreatic cancer allowed for earlier detection than traditional tests, the researchers found that those who enrolled in the study were more likely to have a family history of pancreatic cancer than those who did not. This characteristic of the study population affects the study’s:&lt;br /&gt;
&lt;br /&gt;
a. Internal validity&lt;br /&gt;
&lt;br /&gt;
b. External validity&lt;br /&gt;
&lt;br /&gt;
c. Both&lt;br /&gt;
&lt;br /&gt;
d. Neither&lt;br /&gt;
&lt;br /&gt;
6.5) As sample size increases:&lt;br /&gt;
&lt;br /&gt;
a. Sampling variability increases and the chance of selecting an unrepresentative sample increases&lt;br /&gt;
&lt;br /&gt;
b. Sampling variability increases and the chance of selecting an unrepresentative sample decreases&lt;br /&gt;
&lt;br /&gt;
c. Sampling variability decreases and the chance of selecting an unrepresentative sample decreases&lt;br /&gt;
&lt;br /&gt;
d. Sampling variability decreases and the chance of selecting an unrepresentative sample increases &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger.  http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
&lt;br /&gt;
Sampling / Steven K. Thompson.  http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13353</id>
		<title>SMHS ReliabilityValidity</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13353"/>
		<updated>2014-08-14T14:24:04Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Measurement Reliability and Validity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Measurement Reliability and Validity ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Reliability and validity are two of the most commonly used criteria in choosing the ideal measurement. Reliability is the overall consistency of a measure that is the ability to produce similar results under consistent conditions. Validity is the extent to which a measurement is accurately to reflect the real fact that is the extent to which the measurement measures what it claims to measure. In the perfect situation, we would expect the measurement to be reliable and valid, though it is not always achievable. In fact, in many cases, we need to strike a balance between reliability and validity based on our objectives of the study in choosing the ideal measurement. In this section, we are going to discuss about the measurement reliability and validity and illustrate their application with examples and we are going to focus on the application of these two criteria in the field of epidemiology as an example.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In choosing an ideal measurement in the study, we are always encountered with the problem of whether it is capable of producing the similar results with consistent conditions and whether it is capable to measure what it claims to measure. Ideally, we would prefer to be able to measure the exact situation and to produce similar results when measured repeatedly in consistent conditions. In real studies, we would need to choose between measurements to strike a balance between these two aspects given the restrictions in real world. So, how do we choose between validity and reliability? How these two would influence the results of the test?&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Measurement: refers to the systematic, replicable process through which the objects are quantified or classified with respect to a particular dimension and is usually achieved by assigning numerical values to the objects measured. &lt;br /&gt;
*There are four levels of measurements (the relationship among the values assigned to the attributes for a variable): (1) Nominal measure: the numerical values just ‘name’ the attributes uniquely and no ordering of the cases is implied; (2) Ordinal measure: where the attributes can be rank-ordered while the distances between attributes don’t have any meaning. For example, the education background of the participants are measured in a study where 0=less than high school; 1=some high school; 2=high school degree; 3=some college; 4=college degree; 5=post college. (3) Interval measure: where the distance is meaningful in the measurement. For example, the temperature of the participants. (4) Ratio measure: an absolute zero is meaningful meaning that you can construct a meaningful fraction with a ratio variable.&lt;br /&gt;
*Variation in a repeated measure can be caused by (1) pure chance or unsystematic events caused by subject, observer, situations, instrument or data processing; (2) systematic inconsistency; (3) actual change in the underlying event being measured.&lt;br /&gt;
*Validity of a measure is the extent to which the measurement can describe or quantify what it intends to measure; reliability of a measure is the extent to which a measure can be depended upon to secure consistent results in repeated application.&lt;br /&gt;
&lt;br /&gt;
The following charts shows the three possible outcomes: (from left to right) valid not reliable, reliable not valid and valid and reliable.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:ReliabilityValidity Fig 1.png]][[File:ReliabilityValidity Fig 2.png]][[File:ReliabilityValidity Fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
3.2) Validity: validity is the extent to which the assessment measures what it is supposed to measure while reliability is the ability to replicate results on same sample if test if repeated. Within validity, we don’t always expect the measurements to produce the similar results in repeated tests. Similarly, a measure may not be valid within reliability. &lt;br /&gt;
&lt;br /&gt;
There are different types of validity:&lt;br /&gt;
*Construct validity: refers to the extent to which the operation actually measures what the theory intends to. It involves the empirical and theoretical support for the interpretation of the measure. (1) Convergent validity: refers to the extent to which a measure is correlated with other measures that it is theoretically correlated to; (2) Discriminant validity: refers to whether the measurement is supposed to be unrelated are unrelated.&lt;br /&gt;
*Content validity: refers to the non-statistical type of validity, which is to test the extent to which the content of the test matches the content associated with the construct. (1) Representation validity: the extent to which an abstract theoretical construct can be turned into a specific practical test; (2) Face validity: test whether the test appears to measure a certain criterion. &lt;br /&gt;
*Criterion validity: involves the correlation between the test and a criterion variable taken as representative of the construct and compares the test with other measures or outcomes. (1) Concurrent validity: refers to the extent to which the operation correlates with other measures with the same construct measured at the same time; (2) Predictive validity: refers to the extent to which the operation can predict other measures of the same construct measured at the same time.&lt;br /&gt;
*Experimental validity: validity of design of experimental research studies. (1) statistical conclusion validity: the extent to which conclusions about the relationship among variables based on the data are correct or reasonable, it involves ensuring the use of adequate sampling procedures, appropriate statistical tests and reliable measurement procedures; (2) internal validity: estimate the extent to which conclusions about causal relationships be made; (3) external validity: concerns the extent to which the results of the study can be held to be true in general case.&lt;br /&gt;
&lt;br /&gt;
3.3) Reliability (repeatability) of tests: can the results be replicated if the test is redone? The results may be influenced by three factors: (1) Intrasubject variation: variation within individual subjects; (2) Intraobserver variation: variation in reading of results by the same reader; (3) Interobserver variation: variation between those reading results.&lt;br /&gt;
*Types of Reliability: (1) Test-retest reliability: measure of reliability obtained by administering the same test twice over a period of time to a group of individuals; (2) Parallel forms reliability: measure of reliability obtained by administering different versions of an assessment tool to the same group of individuals; (3) Inter-rater reliability: measure of reliability used to assess the extent to which different judges or raters agree in their assessment decisions; (4) Internal consistency reliability: measure of reliability used to evaluate the extent to which different test items that probe the same construct produce similar results.&lt;br /&gt;
&lt;br /&gt;
3.4) Kappa statistic: Answers the question of ‘How much better is the agreement between observers than would be expected by chance alone?’&lt;br /&gt;
Kappa=((% agreement observed)-(% agreement expected by chance alone))/(100%-(% agreement expected by chance alone))&lt;br /&gt;
Percent agreement=(number in cells that 'agree')/(Total number readings)*100&lt;br /&gt;
Calculation of Kappa:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| ||colspan=3|Reader 1&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Reader 2|| ||Positive||Negative&lt;br /&gt;
|-&lt;br /&gt;
|Positive||180||40&lt;br /&gt;
|-&lt;br /&gt;
|Negative||50||230&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
*Percent agreement: (1) proportion of tests reader 1 rate as positive =(180+50)/500=46%; proportion of tests reader 1 rate as negative =54%; if the results from reader 1 and reader 2 are independent, then reader 1 should have 46% positives regardless of reader 2’s scores.&lt;br /&gt;
*Expected agreement based on chance alone: for 220 times reader 2 is positive, we expect reader 1 will be positive 46% of the time; for 280 times reader 2 is negative, we expect reader 1 will be negative 54% of the time:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| ||colspan=3|Reader 1&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Reader 2|| ||Positive||Negative&lt;br /&gt;
|-&lt;br /&gt;
|Positive||101||119&lt;br /&gt;
|-&lt;br /&gt;
|Negative||129||151&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
*Expected agreement by chance =(101+151)/500=50.4%.&lt;br /&gt;
*Observed agreement = 82%; expected agreement based on chance = 50.4%. Kappa=((% agreement observed)-(% agreement expected by chance alone))/(100%-(% agreement expected by chance alone))=(82%-50.4%)/(100%-50.4%)=63.71%&lt;br /&gt;
Interpretation of Kappa: &amp;gt; 0.75 excellent; 0.4 – 0.75 intermediate to good; &amp;lt; 0.40 poor reliability.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.socialresearchmethods.net/kb/constval.php) presents a comprehensive introduction to measurements, validity and reliability and illustrate the concepts and application with examples. It is very well developed and would be a great introduction to the material we are going to cover in this lecture.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.egadconnection.org/Reliability%20and%20validity.pdf) presents a general introduction to reliability, validity and generalizability and studied on various problems with measurement. It gives comprehensive analysis of reliability and validity with definitions, different ways to measure reliability and validity as well as problems associated with these characteristics. This would be a great start to get to know measurement reliability and validity.&lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://psycnet.apa.org/psycinfo/1995-00092-001) assessed the reliability and validity of the Childhood Trauma Questionnaire (CTQ), a retrospective measure of child abuse and neglect. 286 drug- or alcohol-dependent patients (aged 24–68 years) were given the CTQ as part of a larger test battery, and 40 of these patients were given the questionnaire again after an interval of 2–6 months. 68 Ss were also given the Childhood Trauma Interview. Principal-components analysis of responses on the CTQ yielded 4 rotated orthogonal factors: physical and emotional abuse, emotional neglect, sexual abuse, and physical neglect. The CTQ demonstrated high internal consistency and good test-retest reliability over an interval of 2–6 months. The CTQ also demonstrated convergence with the Childhood Trauma Interview indicating that Ss' reports of child abuse and neglect based on the CTQ were highly stable, both over time and across types of instruments. &lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
none&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
6.1) In public health practice, optimizing the validity of tests is important in order to:&lt;br /&gt;
&lt;br /&gt;
a. reduce health care costs&lt;br /&gt;
&lt;br /&gt;
b. reduce unnecessary stress for patients&lt;br /&gt;
&lt;br /&gt;
c. Be able to identify opportunities for intervention early in the course of disease&lt;br /&gt;
&lt;br /&gt;
d. all of the above&lt;br /&gt;
&lt;br /&gt;
6.2) The Kappa statistic is used to measure ___ of a test?&lt;br /&gt;
&lt;br /&gt;
a. sensitivity&lt;br /&gt;
&lt;br /&gt;
b. reliability&lt;br /&gt;
&lt;br /&gt;
c. positive predictive value&lt;br /&gt;
&lt;br /&gt;
d. specificity&lt;br /&gt;
&lt;br /&gt;
6.3) Randomization of treatment groups ensures the study’s external validity.&lt;br /&gt;
&lt;br /&gt;
a. True&lt;br /&gt;
&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.4) In a study investigating whether a new serum-based screening test for pancreatic cancer allowed for earlier detection than traditional tests, the researchers found that those who enrolled in the study were more likely to have a family history of pancreatic cancer than those who did not. This characteristic of the study population affects the study’s:&lt;br /&gt;
&lt;br /&gt;
a. Internal validity&lt;br /&gt;
&lt;br /&gt;
b. External validity&lt;br /&gt;
&lt;br /&gt;
c. Both&lt;br /&gt;
&lt;br /&gt;
d. Neither&lt;br /&gt;
&lt;br /&gt;
6.5) As sample size increases:&lt;br /&gt;
&lt;br /&gt;
a. Sampling variability increases and the chance of selecting an unrepresentative sample increases&lt;br /&gt;
&lt;br /&gt;
b. Sampling variability increases and the chance of selecting an unrepresentative sample decreases&lt;br /&gt;
&lt;br /&gt;
c. Sampling variability decreases and the chance of selecting an unrepresentative sample decreases&lt;br /&gt;
&lt;br /&gt;
d. Sampling variability decreases and the chance of selecting an unrepresentative sample increases &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13352</id>
		<title>SMHS ReliabilityValidity</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13352"/>
		<updated>2014-08-14T14:21:02Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Measurement Reliability and Validity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Measurement Reliability and Validity ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Reliability and validity are two of the most commonly used criteria in choosing the ideal measurement. Reliability is the overall consistency of a measure that is the ability to produce similar results under consistent conditions. Validity is the extent to which a measurement is accurately to reflect the real fact that is the extent to which the measurement measures what it claims to measure. In the perfect situation, we would expect the measurement to be reliable and valid, though it is not always achievable. In fact, in many cases, we need to strike a balance between reliability and validity based on our objectives of the study in choosing the ideal measurement. In this section, we are going to discuss about the measurement reliability and validity and illustrate their application with examples and we are going to focus on the application of these two criteria in the field of epidemiology as an example.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In choosing an ideal measurement in the study, we are always encountered with the problem of whether it is capable of producing the similar results with consistent conditions and whether it is capable to measure what it claims to measure. Ideally, we would prefer to be able to measure the exact situation and to produce similar results when measured repeatedly in consistent conditions. In real studies, we would need to choose between measurements to strike a balance between these two aspects given the restrictions in real world. So, how do we choose between validity and reliability? How these two would influence the results of the test?&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Measurement: refers to the systematic, replicable process through which the objects are quantified or classified with respect to a particular dimension and is usually achieved by assigning numerical values to the objects measured. &lt;br /&gt;
*There are four levels of measurements (the relationship among the values assigned to the attributes for a variable): (1) Nominal measure: the numerical values just ‘name’ the attributes uniquely and no ordering of the cases is implied; (2) Ordinal measure: where the attributes can be rank-ordered while the distances between attributes don’t have any meaning. For example, the education background of the participants are measured in a study where 0=less than high school; 1=some high school; 2=high school degree; 3=some college; 4=college degree; 5=post college. (3) Interval measure: where the distance is meaningful in the measurement. For example, the temperature of the participants. (4) Ratio measure: an absolute zero is meaningful meaning that you can construct a meaningful fraction with a ratio variable.&lt;br /&gt;
*Variation in a repeated measure can be caused by (1) pure chance or unsystematic events caused by subject, observer, situations, instrument or data processing; (2) systematic inconsistency; (3) actual change in the underlying event being measured.&lt;br /&gt;
*Validity of a measure is the extent to which the measurement can describe or quantify what it intends to measure; reliability of a measure is the extent to which a measure can be depended upon to secure consistent results in repeated application.&lt;br /&gt;
&lt;br /&gt;
The following charts shows the three possible outcomes: (from left to right) valid not reliable, reliable not valid and valid and reliable.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:ReliabilityValidity Fig 1.png]][[File:ReliabilityValidity Fig 2.png]][[File:ReliabilityValidity Fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
3.2) Validity: validity is the extent to which the assessment measures what it is supposed to measure while reliability is the ability to replicate results on same sample if test if repeated. Within validity, we don’t always expect the measurements to produce the similar results in repeated tests. Similarly, a measure may not be valid within reliability. &lt;br /&gt;
&lt;br /&gt;
There are different types of validity:&lt;br /&gt;
*Construct validity: refers to the extent to which the operation actually measures what the theory intends to. It involves the empirical and theoretical support for the interpretation of the measure. (1) Convergent validity: refers to the extent to which a measure is correlated with other measures that it is theoretically correlated to; (2) Discriminant validity: refers to whether the measurement is supposed to be unrelated are unrelated.&lt;br /&gt;
*Content validity: refers to the non-statistical type of validity, which is to test the extent to which the content of the test matches the content associated with the construct. (1) Representation validity: the extent to which an abstract theoretical construct can be turned into a specific practical test; (2) Face validity: test whether the test appears to measure a certain criterion. &lt;br /&gt;
*Criterion validity: involves the correlation between the test and a criterion variable taken as representative of the construct and compares the test with other measures or outcomes. (1) Concurrent validity: refers to the extent to which the operation correlates with other measures with the same construct measured at the same time; (2) Predictive validity: refers to the extent to which the operation can predict other measures of the same construct measured at the same time.&lt;br /&gt;
*Experimental validity: validity of design of experimental research studies. (1) statistical conclusion validity: the extent to which conclusions about the relationship among variables based on the data are correct or reasonable, it involves ensuring the use of adequate sampling procedures, appropriate statistical tests and reliable measurement procedures; (2) internal validity: estimate the extent to which conclusions about causal relationships be made; (3) external validity: concerns the extent to which the results of the study can be held to be true in general case.&lt;br /&gt;
&lt;br /&gt;
3.3) Reliability (repeatability) of tests: can the results be replicated if the test is redone? The results may be influenced by three factors: (1) Intrasubject variation: variation within individual subjects; (2) Intraobserver variation: variation in reading of results by the same reader; (3) Interobserver variation: variation between those reading results.&lt;br /&gt;
*Types of Reliability: (1) Test-retest reliability: measure of reliability obtained by administering the same test twice over a period of time to a group of individuals; (2) Parallel forms reliability: measure of reliability obtained by administering different versions of an assessment tool to the same group of individuals; (3) Inter-rater reliability: measure of reliability used to assess the extent to which different judges or raters agree in their assessment decisions; (4) Internal consistency reliability: measure of reliability used to evaluate the extent to which different test items that probe the same construct produce similar results.&lt;br /&gt;
&lt;br /&gt;
3.4) Kappa statistic: Answers the question of ‘How much better is the agreement between observers than would be expected by chance alone?’&lt;br /&gt;
Kappa=((% agreement observed)-(% agreement expected by chance alone))/(100%-(% agreement expected by chance alone))&lt;br /&gt;
Percent agreement=(number in cells that 'agree')/(Total number readings)*100&lt;br /&gt;
Calculation of Kappa:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| ||colspan=3|Reader 1&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=3|Reader 2|| ||Positive||Negative&lt;br /&gt;
|-&lt;br /&gt;
|Positive||180||40&lt;br /&gt;
|-&lt;br /&gt;
|Negative||50||230&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Percent agreement: (1) proportion of tests reader 1 rate as positive =(180+50)/500=46%; proportion of tests reader 1 rate as negative =54%; if the results from reader 1 and reader 2 are independent, then reader 1 should have 46% positives regardless of reader 2’s scores.&lt;br /&gt;
	Expected agreement based on chance alone: for 220 times reader 2 is positive, we expect reader 1 will be positive 46% of the time; for 280 times reader 2 is negative, we expect reader 1 will be negative 54% of the time:&lt;br /&gt;
&lt;br /&gt;
	Reader 1&lt;br /&gt;
Reader 2		Positive	Negative&lt;br /&gt;
	Positive	101	119&lt;br /&gt;
	Negative	129	151&lt;br /&gt;
&lt;br /&gt;
Expected agreement by chance =(101+151)/500=50.4%.&lt;br /&gt;
	Observed agreement = 82%; expected agreement based on chance = 50.4%. Kappa=((% agreement observed)-(% agreement expected by chance alone))/(100%-(% agreement expected by chance alone))=(82%-50.4%)/(100%-50.4%)=63.71%&lt;br /&gt;
Interpretation of Kappa: &amp;gt; 0.75 excellent; 0.4 – 0.75 intermediate to good; &amp;lt; 0.40 poor reliability.&lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.socialresearchmethods.net/kb/constval.php) presents a comprehensive introduction to measurements, validity and reliability and illustrate the concepts and application with examples. It is very well developed and would be a great introduction to the material we are going to cover in this lecture.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.egadconnection.org/Reliability%20and%20validity.pdf) presents a general introduction to reliability, validity and generalizability and studied on various problems with measurement. It gives comprehensive analysis of reliability and validity with definitions, different ways to measure reliability and validity as well as problems associated with these characteristics. This would be a great start to get to know measurement reliability and validity.&lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://psycnet.apa.org/psycinfo/1995-00092-001) assessed the reliability and validity of the Childhood Trauma Questionnaire (CTQ), a retrospective measure of child abuse and neglect. 286 drug- or alcohol-dependent patients (aged 24–68 years) were given the CTQ as part of a larger test battery, and 40 of these patients were given the questionnaire again after an interval of 2–6 months. 68 Ss were also given the Childhood Trauma Interview. Principal-components analysis of responses on the CTQ yielded 4 rotated orthogonal factors: physical and emotional abuse, emotional neglect, sexual abuse, and physical neglect. The CTQ demonstrated high internal consistency and good test-retest reliability over an interval of 2–6 months. The CTQ also demonstrated convergence with the Childhood Trauma Interview indicating that Ss' reports of child abuse and neglect based on the CTQ were highly stable, both over time and across types of instruments. &lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
none&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) In public health practice, optimizing the validity of tests is important in order to:&lt;br /&gt;
a. reduce health care costs&lt;br /&gt;
b. reduce unnecessary stress for patients&lt;br /&gt;
c. Be able to identify opportunities for intervention early in the course of disease&lt;br /&gt;
d. all of the above&lt;br /&gt;
&lt;br /&gt;
6.2) The Kappa statistic is used to measure ___ of a test?&lt;br /&gt;
a. sensitivity&lt;br /&gt;
b. reliability&lt;br /&gt;
c. positive predictive value&lt;br /&gt;
d. specificity&lt;br /&gt;
&lt;br /&gt;
6.3) Randomization of treatment groups ensures the study’s external validity.&lt;br /&gt;
a. True&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.4) In a study investigating whether a new serum-based screening test for pancreatic cancer allowed for earlier detection than traditional tests, the researchers found that those who enrolled in the study were more likely to have a family history of pancreatic cancer than those who did not. This characteristic of the study population affects the study’s:&lt;br /&gt;
a. Internal validity&lt;br /&gt;
b. External validity&lt;br /&gt;
c. Both&lt;br /&gt;
d. Neither&lt;br /&gt;
&lt;br /&gt;
6.5) As sample size increases:&lt;br /&gt;
a. Sampling variability increases and the chance of selecting an unrepresentative sample increases&lt;br /&gt;
b. Sampling variability increases and the chance of selecting an unrepresentative sample decreases&lt;br /&gt;
c. Sampling variability decreases and the chance of selecting an unrepresentative sample decreases&lt;br /&gt;
d. Sampling variability decreases and the chance of selecting an unrepresentative sample increases &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13351</id>
		<title>SMHS ReliabilityValidity</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13351"/>
		<updated>2014-08-14T14:16:15Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Measurement Reliability and Validity ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Reliability and validity are two of the most commonly used criteria in choosing the ideal measurement. Reliability is the overall consistency of a measure that is the ability to produce similar results under consistent conditions. Validity is the extent to which a measurement is accurately to reflect the real fact that is the extent to which the measurement measures what it claims to measure. In the perfect situation, we would expect the measurement to be reliable and valid, though it is not always achievable. In fact, in many cases, we need to strike a balance between reliability and validity based on our objectives of the study in choosing the ideal measurement. In this section, we are going to discuss about the measurement reliability and validity and illustrate their application with examples and we are going to focus on the application of these two criteria in the field of epidemiology as an example.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In choosing an ideal measurement in the study, we are always encountered with the problem of whether it is capable of producing the similar results with consistent conditions and whether it is capable to measure what it claims to measure. Ideally, we would prefer to be able to measure the exact situation and to produce similar results when measured repeatedly in consistent conditions. In real studies, we would need to choose between measurements to strike a balance between these two aspects given the restrictions in real world. So, how do we choose between validity and reliability? How these two would influence the results of the test?&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Measurement: refers to the systematic, replicable process through which the objects are quantified or classified with respect to a particular dimension and is usually achieved by assigning numerical values to the objects measured. &lt;br /&gt;
*There are four levels of measurements (the relationship among the values assigned to the attributes for a variable): (1) Nominal measure: the numerical values just ‘name’ the attributes uniquely and no ordering of the cases is implied; (2) Ordinal measure: where the attributes can be rank-ordered while the distances between attributes don’t have any meaning. For example, the education background of the participants are measured in a study where 0=less than high school; 1=some high school; 2=high school degree; 3=some college; 4=college degree; 5=post college. (3) Interval measure: where the distance is meaningful in the measurement. For example, the temperature of the participants. (4) Ratio measure: an absolute zero is meaningful meaning that you can construct a meaningful fraction with a ratio variable.&lt;br /&gt;
*Variation in a repeated measure can be caused by (1) pure chance or unsystematic events caused by subject, observer, situations, instrument or data processing; (2) systematic inconsistency; (3) actual change in the underlying event being measured.&lt;br /&gt;
*Validity of a measure is the extent to which the measurement can describe or quantify what it intends to measure; reliability of a measure is the extent to which a measure can be depended upon to secure consistent results in repeated application.&lt;br /&gt;
&lt;br /&gt;
The following charts shows the three possible outcomes: (from left to right) valid not reliable, reliable not valid and valid and reliable.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:ReliabilityValidity Fig 1.png]][[File:ReliabilityValidity Fig 2.png]][[File:ReliabilityValidity Fig 3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
3.2) Validity: validity is the extent to which the assessment measures what it is supposed to measure while reliability is the ability to replicate results on same sample if test if repeated. Within validity, we don’t always expect the measurements to produce the similar results in repeated tests. Similarly, a measure may not be valid within reliability. &lt;br /&gt;
&lt;br /&gt;
There are different types of validity:&lt;br /&gt;
*Construct validity: refers to the extent to which the operation actually measures what the theory intends to. It involves the empirical and theoretical support for the interpretation of the measure. (1) Convergent validity: refers to the extent to which a measure is correlated with other measures that it is theoretically correlated to; (2) Discriminant validity: refers to whether the measurement is supposed to be unrelated are unrelated.&lt;br /&gt;
*Content validity: refers to the non-statistical type of validity, which is to test the extent to which the content of the test matches the content associated with the construct. (1) Representation validity: the extent to which an abstract theoretical construct can be turned into a specific practical test; (2) Face validity: test whether the test appears to measure a certain criterion. &lt;br /&gt;
*Criterion validity: involves the correlation between the test and a criterion variable taken as representative of the construct and compares the test with other measures or outcomes. (1) Concurrent validity: refers to the extent to which the operation correlates with other measures with the same construct measured at the same time; (2) Predictive validity: refers to the extent to which the operation can predict other measures of the same construct measured at the same time.&lt;br /&gt;
*Experimental validity: validity of design of experimental research studies. (1) statistical conclusion validity: the extent to which conclusions about the relationship among variables based on the data are correct or reasonable, it involves ensuring the use of adequate sampling procedures, appropriate statistical tests and reliable measurement procedures; (2) internal validity: estimate the extent to which conclusions about causal relationships be made; (3) external validity: concerns the extent to which the results of the study can be held to be true in general case.&lt;br /&gt;
&lt;br /&gt;
3.3) Reliability (repeatability) of tests: can the results be replicated if the test is redone? The results may be influenced by three factors: (1) Intrasubject variation: variation within individual subjects; (2) Intraobserver variation: variation in reading of results by the same reader; (3) Interobserver variation: variation between those reading results.&lt;br /&gt;
*Types of Reliability: (1) Test-retest reliability: measure of reliability obtained by administering the same test twice over a period of time to a group of individuals; (2) Parallel forms reliability: measure of reliability obtained by administering different versions of an assessment tool to the same group of individuals; (3) Inter-rater reliability: measure of reliability used to assess the extent to which different judges or raters agree in their assessment decisions; (4) Internal consistency reliability: measure of reliability used to evaluate the extent to which different test items that probe the same construct produce similar results.&lt;br /&gt;
&lt;br /&gt;
3.4) Kappa statistic: Answers the question of ‘How much better is the agreement between observers than would be expected by chance alone?’&lt;br /&gt;
Kappa=((% agreement observed)-(% agreement expected by chance alone))/(100%-(% agreement expected by chance alone))&lt;br /&gt;
Percent agreement=(number in cells that 'agree')/(Total number readings)*100&lt;br /&gt;
Calculation of Kappa:&lt;br /&gt;
	Reader 1&lt;br /&gt;
Reader 2		Positive	Negative&lt;br /&gt;
	Positive	180	40&lt;br /&gt;
	Negative	50	230&lt;br /&gt;
&lt;br /&gt;
	Percent agreement: (1) proportion of tests reader 1 rate as positive =(180+50)/500=46%; proportion of tests reader 1 rate as negative =54%; if the results from reader 1 and reader 2 are independent, then reader 1 should have 46% positives regardless of reader 2’s scores.&lt;br /&gt;
	Expected agreement based on chance alone: for 220 times reader 2 is positive, we expect reader 1 will be positive 46% of the time; for 280 times reader 2 is negative, we expect reader 1 will be negative 54% of the time:&lt;br /&gt;
&lt;br /&gt;
	Reader 1&lt;br /&gt;
Reader 2		Positive	Negative&lt;br /&gt;
	Positive	101	119&lt;br /&gt;
	Negative	129	151&lt;br /&gt;
&lt;br /&gt;
Expected agreement by chance =(101+151)/500=50.4%.&lt;br /&gt;
	Observed agreement = 82%; expected agreement based on chance = 50.4%. Kappa=((% agreement observed)-(% agreement expected by chance alone))/(100%-(% agreement expected by chance alone))=(82%-50.4%)/(100%-50.4%)=63.71%&lt;br /&gt;
Interpretation of Kappa: &amp;gt; 0.75 excellent; 0.4 – 0.75 intermediate to good; &amp;lt; 0.40 poor reliability.&lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.socialresearchmethods.net/kb/constval.php) presents a comprehensive introduction to measurements, validity and reliability and illustrate the concepts and application with examples. It is very well developed and would be a great introduction to the material we are going to cover in this lecture.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.egadconnection.org/Reliability%20and%20validity.pdf) presents a general introduction to reliability, validity and generalizability and studied on various problems with measurement. It gives comprehensive analysis of reliability and validity with definitions, different ways to measure reliability and validity as well as problems associated with these characteristics. This would be a great start to get to know measurement reliability and validity.&lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://psycnet.apa.org/psycinfo/1995-00092-001) assessed the reliability and validity of the Childhood Trauma Questionnaire (CTQ), a retrospective measure of child abuse and neglect. 286 drug- or alcohol-dependent patients (aged 24–68 years) were given the CTQ as part of a larger test battery, and 40 of these patients were given the questionnaire again after an interval of 2–6 months. 68 Ss were also given the Childhood Trauma Interview. Principal-components analysis of responses on the CTQ yielded 4 rotated orthogonal factors: physical and emotional abuse, emotional neglect, sexual abuse, and physical neglect. The CTQ demonstrated high internal consistency and good test-retest reliability over an interval of 2–6 months. The CTQ also demonstrated convergence with the Childhood Trauma Interview indicating that Ss' reports of child abuse and neglect based on the CTQ were highly stable, both over time and across types of instruments. &lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
none&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) In public health practice, optimizing the validity of tests is important in order to:&lt;br /&gt;
a. reduce health care costs&lt;br /&gt;
b. reduce unnecessary stress for patients&lt;br /&gt;
c. Be able to identify opportunities for intervention early in the course of disease&lt;br /&gt;
d. all of the above&lt;br /&gt;
&lt;br /&gt;
6.2) The Kappa statistic is used to measure ___ of a test?&lt;br /&gt;
a. sensitivity&lt;br /&gt;
b. reliability&lt;br /&gt;
c. positive predictive value&lt;br /&gt;
d. specificity&lt;br /&gt;
&lt;br /&gt;
6.3) Randomization of treatment groups ensures the study’s external validity.&lt;br /&gt;
a. True&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.4) In a study investigating whether a new serum-based screening test for pancreatic cancer allowed for earlier detection than traditional tests, the researchers found that those who enrolled in the study were more likely to have a family history of pancreatic cancer than those who did not. This characteristic of the study population affects the study’s:&lt;br /&gt;
a. Internal validity&lt;br /&gt;
b. External validity&lt;br /&gt;
c. Both&lt;br /&gt;
d. Neither&lt;br /&gt;
&lt;br /&gt;
6.5) As sample size increases:&lt;br /&gt;
a. Sampling variability increases and the chance of selecting an unrepresentative sample increases&lt;br /&gt;
b. Sampling variability increases and the chance of selecting an unrepresentative sample decreases&lt;br /&gt;
c. Sampling variability decreases and the chance of selecting an unrepresentative sample decreases&lt;br /&gt;
d. Sampling variability decreases and the chance of selecting an unrepresentative sample increases &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:ReliabilityValidity_Fig_3.png&amp;diff=13350</id>
		<title>File:ReliabilityValidity Fig 3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:ReliabilityValidity_Fig_3.png&amp;diff=13350"/>
		<updated>2014-08-14T14:14:47Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:ReliabilityValidity_Fig_2.png&amp;diff=13349</id>
		<title>File:ReliabilityValidity Fig 2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:ReliabilityValidity_Fig_2.png&amp;diff=13349"/>
		<updated>2014-08-14T14:14:33Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:ReliabilityValidity_Fig_1.png&amp;diff=13348</id>
		<title>File:ReliabilityValidity Fig 1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:ReliabilityValidity_Fig_1.png&amp;diff=13348"/>
		<updated>2014-08-14T14:14:10Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13347</id>
		<title>SMHS ReliabilityValidity</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13347"/>
		<updated>2014-08-14T14:13:55Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Measurement Reliability and Validity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Measurement Reliability and Validity ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Reliability and validity are two of the most commonly used criteria in choosing the ideal measurement. Reliability is the overall consistency of a measure that is the ability to produce similar results under consistent conditions. Validity is the extent to which a measurement is accurately to reflect the real fact that is the extent to which the measurement measures what it claims to measure. In the perfect situation, we would expect the measurement to be reliable and valid, though it is not always achievable. In fact, in many cases, we need to strike a balance between reliability and validity based on our objectives of the study in choosing the ideal measurement. In this section, we are going to discuss about the measurement reliability and validity and illustrate their application with examples and we are going to focus on the application of these two criteria in the field of epidemiology as an example.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In choosing an ideal measurement in the study, we are always encountered with the problem of whether it is capable of producing the similar results with consistent conditions and whether it is capable to measure what it claims to measure. Ideally, we would prefer to be able to measure the exact situation and to produce similar results when measured repeatedly in consistent conditions. In real studies, we would need to choose between measurements to strike a balance between these two aspects given the restrictions in real world. So, how do we choose between validity and reliability? How these two would influence the results of the test?&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Measurement: refers to the systematic, replicable process through which the objects are quantified or classified with respect to a particular dimension and is usually achieved by assigning numerical values to the objects measured. &lt;br /&gt;
*There are four levels of measurements (the relationship among the values assigned to the attributes for a variable): (1) Nominal measure: the numerical values just ‘name’ the attributes uniquely and no ordering of the cases is implied; (2) Ordinal measure: where the attributes can be rank-ordered while the distances between attributes don’t have any meaning. For example, the education background of the participants are measured in a study where 0=less than high school; 1=some high school; 2=high school degree; 3=some college; 4=college degree; 5=post college. (3) Interval measure: where the distance is meaningful in the measurement. For example, the temperature of the participants. (4) Ratio measure: an absolute zero is meaningful meaning that you can construct a meaningful fraction with a ratio variable.&lt;br /&gt;
*Variation in a repeated measure can be caused by (1) pure chance or unsystematic events caused by subject, observer, situations, instrument or data processing; (2) systematic inconsistency; (3) actual change in the underlying event being measured.&lt;br /&gt;
*Validity of a measure is the extent to which the measurement can describe or quantify what it intends to measure; reliability of a measure is the extent to which a measure can be depended upon to secure consistent results in repeated application.&lt;br /&gt;
&lt;br /&gt;
The following charts shows the three possible outcomes: (from left to right) valid not reliable, reliable not valid and valid and reliable.&lt;br /&gt;
&lt;br /&gt;
[[File:ReliabilityValidity Fig 1.png]][[File:ReliabilityValidity Fig 2.png]][[File:ReliabilityValidity Fig 3.png]]&lt;br /&gt;
&lt;br /&gt;
3.2) Validity: validity is the extent to which the assessment measures what it is supposed to measure while reliability is the ability to replicate results on same sample if test if repeated. Within validity, we don’t always expect the measurements to produce the similar results in repeated tests. Similarly, a measure may not be valid within reliability. &lt;br /&gt;
	There are different types of validity:&lt;br /&gt;
	Construct validity: refers to the extent to which the operation actually measures what the theory intends to. It involves the empirical and theoretical support for the interpretation of the measure. (1) Convergent validity: refers to the extent to which a measure is correlated with other measures that it is theoretically correlated to; (2) Discriminant validity: refers to whether the measurement is supposed to be unrelated are unrelated.&lt;br /&gt;
	Content validity: refers to the non-statistical type of validity, which is to test the extent to which the content of the test matches the content associated with the construct. (1) Representation validity: the extent to which an abstract theoretical construct can be turned into a specific practical test; (2) Face validity: test whether the test appears to measure a certain criterion. &lt;br /&gt;
	Criterion validity: involves the correlation between the test and a criterion variable taken as representative of the construct and compares the test with other measures or outcomes. (1) Concurrent validity: refers to the extent to which the operation correlates with other measures with the same construct measured at the same time; (2) Predictive validity: refers to the extent to which the operation can predict other measures of the same construct measured at the same time.&lt;br /&gt;
	Experimental validity: validity of design of experimental research studies. (1) statistical conclusion validity: the extent to which conclusions about the relationship among variables based on the data are correct or reasonable, it involves ensuring the use of adequate sampling procedures, appropriate statistical tests and reliable measurement procedures; (2) internal validity: estimate the extent to which conclusions about causal relationships be made; (3) external validity: concerns the extent to which the results of the study can be held to be true in general case.&lt;br /&gt;
&lt;br /&gt;
3.3) Reliability (repeatability) of tests: can the results be replicated if the test is redone? The results may be influenced by three factors: (1) Intrasubject variation: variation within individual subjects; (2) Intraobserver variation: variation in reading of results by the same reader; (3) Interobserver variation: variation between those reading results.&lt;br /&gt;
	Types of Reliability: (1) Test-retest reliability: measure of reliability obtained by administering the same test twice over a period of time to a group of individuals; (2) Parallel forms reliability: measure of reliability obtained by administering different versions of an assessment tool to the same group of individuals; (3) Inter-rater reliability: measure of reliability used to assess the extent to which different judges or raters agree in their assessment decisions; (4) Internal consistency reliability: measure of reliability used to evaluate the extent to which different test items that probe the same construct produce similar results.&lt;br /&gt;
&lt;br /&gt;
3.4) Kappa statistic: Answers the question of ‘How much better is the agreement between observers than would be expected by chance alone?’&lt;br /&gt;
Kappa=((% agreement observed)-(% agreement expected by chance alone))/(100%-(% agreement expected by chance alone))&lt;br /&gt;
Percent agreement=(number in cells that 'agree')/(Total number readings)*100&lt;br /&gt;
Calculation of Kappa:&lt;br /&gt;
	Reader 1&lt;br /&gt;
Reader 2		Positive	Negative&lt;br /&gt;
	Positive	180	40&lt;br /&gt;
	Negative	50	230&lt;br /&gt;
&lt;br /&gt;
	Percent agreement: (1) proportion of tests reader 1 rate as positive =(180+50)/500=46%; proportion of tests reader 1 rate as negative =54%; if the results from reader 1 and reader 2 are independent, then reader 1 should have 46% positives regardless of reader 2’s scores.&lt;br /&gt;
	Expected agreement based on chance alone: for 220 times reader 2 is positive, we expect reader 1 will be positive 46% of the time; for 280 times reader 2 is negative, we expect reader 1 will be negative 54% of the time:&lt;br /&gt;
&lt;br /&gt;
	Reader 1&lt;br /&gt;
Reader 2		Positive	Negative&lt;br /&gt;
	Positive	101	119&lt;br /&gt;
	Negative	129	151&lt;br /&gt;
&lt;br /&gt;
Expected agreement by chance =(101+151)/500=50.4%.&lt;br /&gt;
	Observed agreement = 82%; expected agreement based on chance = 50.4%. Kappa=((% agreement observed)-(% agreement expected by chance alone))/(100%-(% agreement expected by chance alone))=(82%-50.4%)/(100%-50.4%)=63.71%&lt;br /&gt;
Interpretation of Kappa: &amp;gt; 0.75 excellent; 0.4 – 0.75 intermediate to good; &amp;lt; 0.40 poor reliability.&lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://www.socialresearchmethods.net/kb/constval.php) presents a comprehensive introduction to measurements, validity and reliability and illustrate the concepts and application with examples. It is very well developed and would be a great introduction to the material we are going to cover in this lecture.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.egadconnection.org/Reliability%20and%20validity.pdf) presents a general introduction to reliability, validity and generalizability and studied on various problems with measurement. It gives comprehensive analysis of reliability and validity with definitions, different ways to measure reliability and validity as well as problems associated with these characteristics. This would be a great start to get to know measurement reliability and validity.&lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://psycnet.apa.org/psycinfo/1995-00092-001) assessed the reliability and validity of the Childhood Trauma Questionnaire (CTQ), a retrospective measure of child abuse and neglect. 286 drug- or alcohol-dependent patients (aged 24–68 years) were given the CTQ as part of a larger test battery, and 40 of these patients were given the questionnaire again after an interval of 2–6 months. 68 Ss were also given the Childhood Trauma Interview. Principal-components analysis of responses on the CTQ yielded 4 rotated orthogonal factors: physical and emotional abuse, emotional neglect, sexual abuse, and physical neglect. The CTQ demonstrated high internal consistency and good test-retest reliability over an interval of 2–6 months. The CTQ also demonstrated convergence with the Childhood Trauma Interview indicating that Ss' reports of child abuse and neglect based on the CTQ were highly stable, both over time and across types of instruments. &lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
none&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) In public health practice, optimizing the validity of tests is important in order to:&lt;br /&gt;
a. reduce health care costs&lt;br /&gt;
b. reduce unnecessary stress for patients&lt;br /&gt;
c. Be able to identify opportunities for intervention early in the course of disease&lt;br /&gt;
d. all of the above&lt;br /&gt;
&lt;br /&gt;
6.2) The Kappa statistic is used to measure ___ of a test?&lt;br /&gt;
a. sensitivity&lt;br /&gt;
b. reliability&lt;br /&gt;
c. positive predictive value&lt;br /&gt;
d. specificity&lt;br /&gt;
&lt;br /&gt;
6.3) Randomization of treatment groups ensures the study’s external validity.&lt;br /&gt;
a. True&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.4) In a study investigating whether a new serum-based screening test for pancreatic cancer allowed for earlier detection than traditional tests, the researchers found that those who enrolled in the study were more likely to have a family history of pancreatic cancer than those who did not. This characteristic of the study population affects the study’s:&lt;br /&gt;
a. Internal validity&lt;br /&gt;
b. External validity&lt;br /&gt;
c. Both&lt;br /&gt;
d. Neither&lt;br /&gt;
&lt;br /&gt;
6.5) As sample size increases:&lt;br /&gt;
a. Sampling variability increases and the chance of selecting an unrepresentative sample increases&lt;br /&gt;
b. Sampling variability increases and the chance of selecting an unrepresentative sample decreases&lt;br /&gt;
c. Sampling variability decreases and the chance of selecting an unrepresentative sample decreases&lt;br /&gt;
d. Sampling variability decreases and the chance of selecting an unrepresentative sample increases &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13346</id>
		<title>SMHS ROC</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13346"/>
		<updated>2014-08-14T14:08:58Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Receiver Operating Characteristic (ROC) Curve ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Receiver operating characteristic (ROC curve) is a graphical plot, which illustrates the performance of a binary classifier system as its discrimination threshold varies. The ROC curve is created by plotting the fraction of true positive out of the total actual positives vs. the fraction of false positives out of the total actual negatives at various threshold settings. In this section, we are going to introduce the ROC curve and illustrate applications of this method with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have talked about the cases with a binary classification where the outcomes are either absent or present and the test results are positive or negative. We have also discussed about sensitivity and specificity of a test and are familiar with the concepts of true positive and true negatives. With ROC curve, we are looking to demonstrate the following aspects:&lt;br /&gt;
*To show the tradeoff between sensitivity and specificity;&lt;br /&gt;
*The closer the curve follows the left-hand border and top border of ROC space, the more accurate is the test;&lt;br /&gt;
*The closer the curve comes to the 45-degree diagonal, the less accurate is the test;&lt;br /&gt;
*The slope of the tangent line at a cut-point gives the likelihood ratio for the value of the test; &lt;br /&gt;
*The area under the curve is a measure of text accuracy.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=2|Actual condition&lt;br /&gt;
|-&lt;br /&gt;
|Absent (H_0 is true)||Present (H_1 is true)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Test Result||Negative (fail to reject H_0)||Condition absent + Negative result = True (accurate) Negative (TN, 0.98505)||Condition present + Negative result = False (invalid) Negative (FN, 0.00025)Type II error (β)&lt;br /&gt;
|-&lt;br /&gt;
|Positive||(reject H_0)	Condition absent + Positive result = False Positive (FP, 0.00995) Type I error (α)||Condition Present + Positive result = True Positive (TP, 0.00475)&lt;br /&gt;
|-&lt;br /&gt;
|Test Interpretation||Power = 1-FN=1-0.00025 = 0.99975||Specificity: TN/(TN+FP) =0.98505/(0.98505+0.00995) = 0.99||Sensitivity: TP/(TP+FN) =0.00475/(0.00475+ 0.00025)= 0.95&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Review of basic concepts in a binary classification:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2| ||rowspan=2| ||colspan=2|Disease Status||colspan=2|Metrics&lt;br /&gt;
|-&lt;br /&gt;
|Disease||No Disease||Prevalence=(∑▒〖Condition positive〗)/(∑▒〖Total population〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Screening Test||Positive||a (True positives)||b (False positives)||Positive predictive value (PPV)=(∑▒〖Ture positive〗)/(∑▒〖Test positives〗)||False discovery rate (FDR)==(∑▒〖False positive〗)/(∑▒〖Test positive〗)&lt;br /&gt;
|-&lt;br /&gt;
|Negative||c (False negatives)||d (True negatives)||False omission rate (FOR)=(∑▒〖False negative〗)/(∑▒〖Test negative〗)||Negative predictive value (NPV)=(∑▒〖True negative〗)/(∑▒〖Test negative〗)&lt;br /&gt;
|-&lt;br /&gt;
| ||Positive Likelihood Ratio=TPR/FBR||True positive rate (TPR)=(∑▒〖True positive〗)/(∑▒〖condition positive〗)||False positive rate (FPR)=(∑▒〖False positve〗)/(∑▒〖condition positive〗)||Accuracy(ACC)=(∑▒〖True positive〗+∑▒〖True negative〗)/(∑▒〖Total population 〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
| ||Negative Likelihood Ratio=FNR/TNR||False negative rate (FNR)=(∑▒〖False negative〗)/(∑▒〖condition negative〗)||True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)||True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)| || &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;		&lt;br /&gt;
&lt;br /&gt;
3.2) Introduction of ROC Curve:&lt;br /&gt;
&lt;br /&gt;
Sensitivity and specificity are both characteristics of a test but they also depend on the definition of what constitutes an abnormal test. Consider a medical test on diagnostic tests where the cut-points would without doubt influence the test results. We can use the hypothyroidism data from the likelihood ratio to illustrate how these two characteristics change depending on the choice of T4 level that defines hypothyroidism. Recall the data where patients with suspected hypothyroidism are reported.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4||&amp;lt;1||1-2||2-3||3-4||4-5||5-6||6-7||7-8||8-9||9-10||10-11||11-12||&amp;gt;12&lt;br /&gt;
|-&lt;br /&gt;
|Hypothyroid||2||3||1||8||4||4||3||3||1||0||2||1||0&lt;br /&gt;
|-&lt;br /&gt;
|Euthyroid||0||0||0||0||1||6||11||19||17||20||11||4||4&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the following cut-points, we have the data listed:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|5.1 - 7||7||17&lt;br /&gt;
|-&lt;br /&gt;
|7.1 - 9||4||36&lt;br /&gt;
|-&lt;br /&gt;
|9 or more||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that patients with T4 of 5 or less are considered to be hypothyroid, then the data would be displayed as the following and the sensitivity is 0.56 and specificity is 0.99 in this case.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|More than 5||14||92&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Now suppose, we decided to be less stringent on the disease and consider the patients with T4 values of 7 or less to be hypothyroid, then the data would be recorded as the following and the sensitivity in this case would be 0.78 and specificity 0.81:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|7 or less||25||18&lt;br /&gt;
|-&lt;br /&gt;
|More than 7||7||75&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we move the cut-point for hypothyroidism a little bit higher, say 9, we would have the sensitivity of 0.91 and specificity 0.42:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|9 or less||29||54&lt;br /&gt;
|-&lt;br /&gt;
|More than 9||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
To sum up, we have the pairs of sensitivity an specificity with corresponding cut-points in the following table:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||Sensitivity||Specificity&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.99&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.81&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.42&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
From the table above, we observe that the sensitivity improves with increasing cut-point T4 value while specificity increases with decreasing cut-point T4 value. That is a tradeoff between sensitivity and specificity. The table above can also be shown as TP and FP. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||True positives||False positives&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.01&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.19&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.58&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plot sensitivity vs. specificity, we have the ROC curve:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:ROC Fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
*Accuracy of a test is measured by the area under the ROC Curve and a rough guide for classifying the accuracy of a diagnostic test is traditional academic point system: 0.90-1:excellent;0.8-0.9: good (B);0.7-0.8:fair (C);0.6-0.7:poor (D);0.5-0.7:fail (F).&lt;br /&gt;
With our example above, the area under the T4 ROC curve is 0.86, which shows that the accuracy of the test is good in separating hypothyroid from euthyroid patients.&lt;br /&gt;
&lt;br /&gt;
*How to calculate the area under the curve? The area measures discrimination, which is the ability of the test to correctly classify those with and without the disease. The area under the curve is the percentage of randomly drawn pairs for which this is true. Two methods are commonly used to calculate the area of the scope: (1) non-parametric method based on constructing trapezoids under the curve as approximation of area; (2) a parametric method using a MLE to fit a smooth curve to data points.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://pubs.rsna.org/doi/abs/10.1148/radiology.143.1.7063747) titled The Meaning And the Use Of The Area Under A Receiver Operating Characteristic (ROC) Curve presented a representation and interpretation of the area under a ROC curve obtained by the ‘rating’ method, or by mathematical predictions based on patient characteristics. It showed that that in such a setting the area represents the probability that a randomly chosen diseased subject is (correctly) rated or ranked with greater suspicion than a randomly chosen non-diseased subject. &lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.sciencedirect.com/science/article/pii/S0001299878800142) illustrated practical experimental techniques for measuring ROC curves and discussed about the issues of case selection and curve-fitting. It also talked about possible generalizations of conventional ROC analysis to account for decision performance in complex diagnostic tasks and showed ROC analysis related in direct and natural way to cost/benefit analysis of diagnostic decision making. This paper developed the concepts of ‘average diagnostic cost’ and ‘average net benefit’ to identify the optimal compromise among various kinds of diagnostic error and suggested ways in ROC analysis to optimize diagnostic strategies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
&lt;br /&gt;
&amp;quot;#&amp;quot;With the given example in R:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose that a new study is conducted on lung cancer and the following data is collected in identify between two types of lung cancers (say type a and type b). Conduct the ROC curve for this example by varying the cut-points from 2 to 10 by increasing 2 units each time. Calculate the area under the curve and interpret on the accuracy of the test.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|measurements||&amp;lt;1||1-2||2-3||3-4||4-5||5-6||6-7||7-8||8-9||9-10||10-11||11-12||&amp;gt;12&lt;br /&gt;
|-&lt;br /&gt;
|Type a||2||1||4||2||8||7||4||3||0||0||1||2||2&lt;br /&gt;
|-&lt;br /&gt;
|Type b||1||3||0||2||2||5||10||23||18||20||15||8||2&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
6.2) When a serious disease can be treated if it is caught early, it is more important to have a test with high specificity than high sensitivity.&lt;br /&gt;
&lt;br /&gt;
a. True&lt;br /&gt;
&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.3) The positive predictive value of a test is calculated by dividing the number of:&lt;br /&gt;
&lt;br /&gt;
(a) True positives in the population&lt;br /&gt;
&lt;br /&gt;
(b) True negatives in the population&lt;br /&gt;
&lt;br /&gt;
(c) People who test positive&lt;br /&gt;
&lt;br /&gt;
(d) People who test negative&lt;br /&gt;
&lt;br /&gt;
6.4) A new screening test has been developed for diabetes. The table below represents the results of the new test compared to the current gold standard. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| ||Condition positive||Condition negative||Total&lt;br /&gt;
|-&lt;br /&gt;
|Test positive||80||70||150&lt;br /&gt;
|-&lt;br /&gt;
|Test negative||10||240||250&lt;br /&gt;
|-&lt;br /&gt;
|Total||90||310||400&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
What is the sensitivity of the test?&lt;br /&gt;
&lt;br /&gt;
(a) 77%&lt;br /&gt;
&lt;br /&gt;
(b) 89%&lt;br /&gt;
&lt;br /&gt;
(c) 80%&lt;br /&gt;
&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.5) What is the specificity of the test?&lt;br /&gt;
&lt;br /&gt;
(a) 77%&lt;br /&gt;
&lt;br /&gt;
(b) 89%&lt;br /&gt;
&lt;br /&gt;
(c) 80%&lt;br /&gt;
&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
6.6) What is the positive predictive value of the test?&lt;br /&gt;
&lt;br /&gt;
(a) 77%&lt;br /&gt;
&lt;br /&gt;
(b) 89%&lt;br /&gt;
&lt;br /&gt;
(c) 80%&lt;br /&gt;
&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger.  http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
&lt;br /&gt;
Sampling / Steven K. Thompson. http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
&lt;br /&gt;
Introduction to ROC Curves http://gim.unmc.edu/dxtests/roc1.htm&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13345</id>
		<title>SMHS ROC</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13345"/>
		<updated>2014-08-14T14:07:44Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Receiver Operating Characteristic (ROC) Curve ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Receiver operating characteristic (ROC curve) is a graphical plot, which illustrates the performance of a binary classifier system as its discrimination threshold varies. The ROC curve is created by plotting the fraction of true positive out of the total actual positives vs. the fraction of false positives out of the total actual negatives at various threshold settings. In this section, we are going to introduce the ROC curve and illustrate applications of this method with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have talked about the cases with a binary classification where the outcomes are either absent or present and the test results are positive or negative. We have also discussed about sensitivity and specificity of a test and are familiar with the concepts of true positive and true negatives. With ROC curve, we are looking to demonstrate the following aspects:&lt;br /&gt;
*To show the tradeoff between sensitivity and specificity;&lt;br /&gt;
*The closer the curve follows the left-hand border and top border of ROC space, the more accurate is the test;&lt;br /&gt;
*The closer the curve comes to the 45-degree diagonal, the less accurate is the test;&lt;br /&gt;
*The slope of the tangent line at a cut-point gives the likelihood ratio for the value of the test; &lt;br /&gt;
*The area under the curve is a measure of text accuracy.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=2|Actual condition&lt;br /&gt;
|-&lt;br /&gt;
|Absent (H_0 is true)||Present (H_1 is true)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Test Result||Negative (fail to reject H_0)||Condition absent + Negative result = True (accurate) Negative (TN, 0.98505)||Condition present + Negative result = False (invalid) Negative (FN, 0.00025)Type II error (β)&lt;br /&gt;
|-&lt;br /&gt;
|Positive||(reject H_0)	Condition absent + Positive result = False Positive (FP, 0.00995) Type I error (α)||Condition Present + Positive result = True Positive (TP, 0.00475)&lt;br /&gt;
|-&lt;br /&gt;
|Test Interpretation||Power = 1-FN=1-0.00025 = 0.99975||Specificity: TN/(TN+FP) =0.98505/(0.98505+0.00995) = 0.99||Sensitivity: TP/(TP+FN) =0.00475/(0.00475+ 0.00025)= 0.95&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Review of basic concepts in a binary classification:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2| ||rowspan=2| ||colspan=2|Disease Status||colspan=2|Metrics&lt;br /&gt;
|-&lt;br /&gt;
|Disease||No Disease||Prevalence=(∑▒〖Condition positive〗)/(∑▒〖Total population〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Screening Test||Positive||a (True positives)||b (False positives)||Positive predictive value (PPV)=(∑▒〖Ture positive〗)/(∑▒〖Test positives〗)||False discovery rate (FDR)==(∑▒〖False positive〗)/(∑▒〖Test positive〗)&lt;br /&gt;
|-&lt;br /&gt;
|Negative||c (False negatives)||d (True negatives)||False omission rate (FOR)=(∑▒〖False negative〗)/(∑▒〖Test negative〗)||Negative predictive value (NPV)=(∑▒〖True negative〗)/(∑▒〖Test negative〗)&lt;br /&gt;
|-&lt;br /&gt;
| ||Positive Likelihood Ratio=TPR/FBR||True positive rate (TPR)=(∑▒〖True positive〗)/(∑▒〖condition positive〗)||False positive rate (FPR)=(∑▒〖False positve〗)/(∑▒〖condition positive〗)||Accuracy(ACC)=(∑▒〖True positive〗+∑▒〖True negative〗)/(∑▒〖Total population 〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
| ||Negative Likelihood Ratio=FNR/TNR||False negative rate (FNR)=(∑▒〖False negative〗)/(∑▒〖condition negative〗)||True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)||True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)| || &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;		&lt;br /&gt;
&lt;br /&gt;
3.2) Introduction of ROC Curve:&lt;br /&gt;
&lt;br /&gt;
Sensitivity and specificity are both characteristics of a test but they also depend on the definition of what constitutes an abnormal test. Consider a medical test on diagnostic tests where the cut-points would without doubt influence the test results. We can use the hypothyroidism data from the likelihood ratio to illustrate how these two characteristics change depending on the choice of T4 level that defines hypothyroidism. Recall the data where patients with suspected hypothyroidism are reported.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4||&amp;lt;1||1-2||2-3||3-4||4-5||5-6||6-7||7-8||8-9||9-10||10-11||11-12||&amp;gt;12&lt;br /&gt;
|-&lt;br /&gt;
|Hypothyroid||2||3||1||8||4||4||3||3||1||0||2||1||0&lt;br /&gt;
|-&lt;br /&gt;
|Euthyroid||0||0||0||0||1||6||11||19||17||20||11||4||4&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the following cut-points, we have the data listed:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|5.1 - 7||7||17&lt;br /&gt;
|-&lt;br /&gt;
|7.1 - 9||4||36&lt;br /&gt;
|-&lt;br /&gt;
|9 or more||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that patients with T4 of 5 or less are considered to be hypothyroid, then the data would be displayed as the following and the sensitivity is 0.56 and specificity is 0.99 in this case.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|More than 5||14||92&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Now suppose, we decided to be less stringent on the disease and consider the patients with T4 values of 7 or less to be hypothyroid, then the data would be recorded as the following and the sensitivity in this case would be 0.78 and specificity 0.81:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|7 or less||25||18&lt;br /&gt;
|-&lt;br /&gt;
|More than 7||7||75&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we move the cut-point for hypothyroidism a little bit higher, say 9, we would have the sensitivity of 0.91 and specificity 0.42:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|9 or less||29||54&lt;br /&gt;
|-&lt;br /&gt;
|More than 9||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
To sum up, we have the pairs of sensitivity an specificity with corresponding cut-points in the following table:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||Sensitivity||Specificity&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.99&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.81&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.42&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
From the table above, we observe that the sensitivity improves with increasing cut-point T4 value while specificity increases with decreasing cut-point T4 value. That is a tradeoff between sensitivity and specificity. The table above can also be shown as TP and FP. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||True positives||False positives&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.01&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.19&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.58&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plot sensitivity vs. specificity, we have the ROC curve:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:ROC Fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
*Accuracy of a test is measured by the area under the ROC Curve and a rough guide for classifying the accuracy of a diagnostic test is traditional academic point system: 0.90-1:excellent;0.8-0.9: good (B);0.7-0.8:fair (C);0.6-0.7:poor (D);0.5-0.7:fail (F).&lt;br /&gt;
With our example above, the area under the T4 ROC curve is 0.86, which shows that the accuracy of the test is good in separating hypothyroid from euthyroid patients.&lt;br /&gt;
&lt;br /&gt;
*How to calculate the area under the curve? The area measures discrimination, which is the ability of the test to correctly classify those with and without the disease. The area under the curve is the percentage of randomly drawn pairs for which this is true. Two methods are commonly used to calculate the area of the scope: (1) non-parametric method based on constructing trapezoids under the curve as approximation of area; (2) a parametric method using a MLE to fit a smooth curve to data points.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://pubs.rsna.org/doi/abs/10.1148/radiology.143.1.7063747) titled The Meaning And the Use Of The Area Under A Receiver Operating Characteristic (ROC) Curve presented a representation and interpretation of the area under a ROC curve obtained by the ‘rating’ method, or by mathematical predictions based on patient characteristics. It showed that that in such a setting the area represents the probability that a randomly chosen diseased subject is (correctly) rated or ranked with greater suspicion than a randomly chosen non-diseased subject. &lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.sciencedirect.com/science/article/pii/S0001299878800142) illustrated practical experimental techniques for measuring ROC curves and discussed about the issues of case selection and curve-fitting. It also talked about possible generalizations of conventional ROC analysis to account for decision performance in complex diagnostic tasks and showed ROC analysis related in direct and natural way to cost/benefit analysis of diagnostic decision making. This paper developed the concepts of ‘average diagnostic cost’ and ‘average net benefit’ to identify the optimal compromise among various kinds of diagnostic error and suggested ways in ROC analysis to optimize diagnostic strategies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
&lt;br /&gt;
&amp;quot;#&amp;quot;With the given example in R:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose that a new study is conducted on lung cancer and the following data is collected in identify between two types of lung cancers (say type a and type b). Conduct the ROC curve for this example by varying the cut-points from 2 to 10 by increasing 2 units each time. Calculate the area under the curve and interpret on the accuracy of the test.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|measurements||&amp;lt;1||1-2||2-3||3-4||4-5||5-6||6-7||7-8||8-9||9-10||10-11||11-12||&amp;gt;12&lt;br /&gt;
|-&lt;br /&gt;
|Type a||2||1||4||2||8||7||4||3||0||0||1||2||2&lt;br /&gt;
|-&lt;br /&gt;
|Type b||1||3||0||2||2||5||10||23||18||20||15||8||2&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
6.2) When a serious disease can be treated if it is caught early, it is more important to have a test with high specificity than high sensitivity.&lt;br /&gt;
&lt;br /&gt;
a. True&lt;br /&gt;
&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.3) The positive predictive value of a test is calculated by dividing the number of:&lt;br /&gt;
&lt;br /&gt;
(a) True positives in the population&lt;br /&gt;
&lt;br /&gt;
(b) True negatives in the population&lt;br /&gt;
&lt;br /&gt;
(c) People who test positive&lt;br /&gt;
&lt;br /&gt;
(d) People who test negative&lt;br /&gt;
&lt;br /&gt;
6.4) A new screening test has been developed for diabetes. The table below represents the results of the new test compared to the current gold standard. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| ||Condition positive||Condition negative||Total&lt;br /&gt;
|-&lt;br /&gt;
|Test positive||80||70||150&lt;br /&gt;
|-&lt;br /&gt;
|Test negative||10||240||250&lt;br /&gt;
|-&lt;br /&gt;
|Total||90||310||400&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
What is the sensitivity of the test?&lt;br /&gt;
&lt;br /&gt;
(a) 77%&lt;br /&gt;
&lt;br /&gt;
(b) 89%&lt;br /&gt;
&lt;br /&gt;
(c) 80%&lt;br /&gt;
&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.5) What is the specificity of the test?&lt;br /&gt;
&lt;br /&gt;
(a) 77%&lt;br /&gt;
&lt;br /&gt;
(b) 89%&lt;br /&gt;
&lt;br /&gt;
(c) 80%&lt;br /&gt;
&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
6.6) What is the positive predictive value of the test?&lt;br /&gt;
&lt;br /&gt;
(a) 77%&lt;br /&gt;
&lt;br /&gt;
(b) 89%&lt;br /&gt;
&lt;br /&gt;
(c) 80%&lt;br /&gt;
&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger.  http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
&lt;br /&gt;
Sampling / Steven K. Thompson. http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
&lt;br /&gt;
Introduction to ROC Curves http://gim.unmc.edu/dxtests/roc1.htm &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Answers:  &lt;br /&gt;
2 – 6 : F, c, b, a, d&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13344</id>
		<title>SMHS ROC</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13344"/>
		<updated>2014-08-14T14:05:42Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Receiver Operating Characteristic (ROC) Curve */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Receiver Operating Characteristic (ROC) Curve ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Receiver operating characteristic (ROC curve) is a graphical plot, which illustrates the performance of a binary classifier system as its discrimination threshold varies. The ROC curve is created by plotting the fraction of true positive out of the total actual positives vs. the fraction of false positives out of the total actual negatives at various threshold settings. In this section, we are going to introduce the ROC curve and illustrate applications of this method with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have talked about the cases with a binary classification where the outcomes are either absent or present and the test results are positive or negative. We have also discussed about sensitivity and specificity of a test and are familiar with the concepts of true positive and true negatives. With ROC curve, we are looking to demonstrate the following aspects:&lt;br /&gt;
*To show the tradeoff between sensitivity and specificity;&lt;br /&gt;
*The closer the curve follows the left-hand border and top border of ROC space, the more accurate is the test;&lt;br /&gt;
*The closer the curve comes to the 45-degree diagonal, the less accurate is the test;&lt;br /&gt;
*The slope of the tangent line at a cut-point gives the likelihood ratio for the value of the test; &lt;br /&gt;
*The area under the curve is a measure of text accuracy.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=2|Actual condition&lt;br /&gt;
|-&lt;br /&gt;
|Absent (H_0 is true)||Present (H_1 is true)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Test Result||Negative (fail to reject H_0)||Condition absent + Negative result = True (accurate) Negative (TN, 0.98505)||Condition present + Negative result = False (invalid) Negative (FN, 0.00025)Type II error (β)&lt;br /&gt;
|-&lt;br /&gt;
|Positive||(reject H_0)	Condition absent + Positive result = False Positive (FP, 0.00995) Type I error (α)||Condition Present + Positive result = True Positive (TP, 0.00475)&lt;br /&gt;
|-&lt;br /&gt;
|Test Interpretation||Power = 1-FN=1-0.00025 = 0.99975||Specificity: TN/(TN+FP) =0.98505/(0.98505+0.00995) = 0.99||Sensitivity: TP/(TP+FN) =0.00475/(0.00475+ 0.00025)= 0.95&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Review of basic concepts in a binary classification:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2| ||rowspan=2| ||colspan=2|Disease Status||colspan=2|Metrics&lt;br /&gt;
|-&lt;br /&gt;
|Disease||No Disease||Prevalence=(∑▒〖Condition positive〗)/(∑▒〖Total population〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Screening Test||Positive||a (True positives)||b (False positives)||Positive predictive value (PPV)=(∑▒〖Ture positive〗)/(∑▒〖Test positives〗)||False discovery rate (FDR)==(∑▒〖False positive〗)/(∑▒〖Test positive〗)&lt;br /&gt;
|-&lt;br /&gt;
|Negative||c (False negatives)||d (True negatives)||False omission rate (FOR)=(∑▒〖False negative〗)/(∑▒〖Test negative〗)||Negative predictive value (NPV)=(∑▒〖True negative〗)/(∑▒〖Test negative〗)&lt;br /&gt;
|-&lt;br /&gt;
| ||Positive Likelihood Ratio=TPR/FBR||True positive rate (TPR)=(∑▒〖True positive〗)/(∑▒〖condition positive〗)||False positive rate (FPR)=(∑▒〖False positve〗)/(∑▒〖condition positive〗)||Accuracy(ACC)=(∑▒〖True positive〗+∑▒〖True negative〗)/(∑▒〖Total population 〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
| ||Negative Likelihood Ratio=FNR/TNR||False negative rate (FNR)=(∑▒〖False negative〗)/(∑▒〖condition negative〗)||True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)| || | ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;		&lt;br /&gt;
&lt;br /&gt;
3.2) Introduction of ROC Curve:&lt;br /&gt;
&lt;br /&gt;
Sensitivity and specificity are both characteristics of a test but they also depend on the definition of what constitutes an abnormal test. Consider a medical test on diagnostic tests where the cut-points would without doubt influence the test results. We can use the hypothyroidism data from the likelihood ratio to illustrate how these two characteristics change depending on the choice of T4 level that defines hypothyroidism. Recall the data where patients with suspected hypothyroidism are reported.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4||&amp;lt;1||1-2||2-3||3-4||4-5||5-6||6-7||7-8||8-9||9-10||10-11||11-12||&amp;gt;12&lt;br /&gt;
|-&lt;br /&gt;
|Hypothyroid||2||3||1||8||4||4||3||3||1||0||2||1||0&lt;br /&gt;
|-&lt;br /&gt;
|Euthyroid||0||0||0||0||1||6||11||19||17||20||11||4||4&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the following cut-points, we have the data listed:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|5.1 - 7||7||17&lt;br /&gt;
|-&lt;br /&gt;
|7.1 - 9||4||36&lt;br /&gt;
|-&lt;br /&gt;
|9 or more||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that patients with T4 of 5 or less are considered to be hypothyroid, then the data would be displayed as the following and the sensitivity is 0.56 and specificity is 0.99 in this case.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|More than 5||14||92&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Now suppose, we decided to be less stringent on the disease and consider the patients with T4 values of 7 or less to be hypothyroid, then the data would be recorded as the following and the sensitivity in this case would be 0.78 and specificity 0.81:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|7 or less||25||18&lt;br /&gt;
|-&lt;br /&gt;
|More than 7||7||75&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we move the cut-point for hypothyroidism a little bit higher, say 9, we would have the sensitivity of 0.91 and specificity 0.42:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|9 or less||29||54&lt;br /&gt;
|-&lt;br /&gt;
|More than 9||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
To sum up, we have the pairs of sensitivity an specificity with corresponding cut-points in the following table:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||Sensitivity||Specificity&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.99&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.81&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.42&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
From the table above, we observe that the sensitivity improves with increasing cut-point T4 value while specificity increases with decreasing cut-point T4 value. That is a tradeoff between sensitivity and specificity. The table above can also be shown as TP and FP. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||True positives||False positives&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.01&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.19&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.58&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plot sensitivity vs. specificity, we have the ROC curve:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:ROC Fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
*Accuracy of a test is measured by the area under the ROC Curve and a rough guide for classifying the accuracy of a diagnostic test is traditional academic point system: 0.90-1:excellent;0.8-0.9: good (B);0.7-0.8:fair (C);0.6-0.7:poor (D);0.5-0.7:fail (F).&lt;br /&gt;
With our example above, the area under the T4 ROC curve is 0.86, which shows that the accuracy of the test is good in separating hypothyroid from euthyroid patients.&lt;br /&gt;
&lt;br /&gt;
*How to calculate the area under the curve? The area measures discrimination, which is the ability of the test to correctly classify those with and without the disease. The area under the curve is the percentage of randomly drawn pairs for which this is true. Two methods are commonly used to calculate the area of the scope: (1) non-parametric method based on constructing trapezoids under the curve as approximation of area; (2) a parametric method using a MLE to fit a smooth curve to data points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://pubs.rsna.org/doi/abs/10.1148/radiology.143.1.7063747) titled The Meaning And the Use Of The Area Under A Receiver Operating Characteristic (ROC) Curve presented a representation and interpretation of the area under a ROC curve obtained by the ‘rating’ method, or by mathematical predictions based on patient characteristics. It showed that that in such a setting the area represents the probability that a randomly chosen diseased subject is (correctly) rated or ranked with greater suspicion than a randomly chosen non-diseased subject. &lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.sciencedirect.com/science/article/pii/S0001299878800142) illustrated practical experimental techniques for measuring ROC curves and discussed about the issues of case selection and curve-fitting. It also talked about possible generalizations of conventional ROC analysis to account for decision performance in complex diagnostic tasks and showed ROC analysis related in direct and natural way to cost/benefit analysis of diagnostic decision making. This paper developed the concepts of ‘average diagnostic cost’ and ‘average net benefit’ to identify the optimal compromise among various kinds of diagnostic error and suggested ways in ROC analysis to optimize diagnostic strategies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
&lt;br /&gt;
&amp;quot;#&amp;quot;With the given example in R:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose that a new study is conducted on lung cancer and the following data is collected in identify between two types of lung cancers (say type a and type b). Conduct the ROC curve for this example by varying the cut-points from 2 to 10 by increasing 2 units each time. Calculate the area under the curve and interpret on the accuracy of the test.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|measurements||&amp;lt;1||1-2||2-3||3-4||4-5||5-6||6-7||7-8||8-9||9-10||10-11||11-12||&amp;gt;12&lt;br /&gt;
|-&lt;br /&gt;
|Type a||2||1||4||2||8||7||4||3||0||0||1||2||2&lt;br /&gt;
|-&lt;br /&gt;
|Type b||1||3||0||2||2||5||10||23||18||20||15||8||2&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
6.2) When a serious disease can be treated if it is caught early, it is more important to have a test with high specificity than high sensitivity.&lt;br /&gt;
&lt;br /&gt;
a. True&lt;br /&gt;
&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.3) The positive predictive value of a test is calculated by dividing the number of:&lt;br /&gt;
&lt;br /&gt;
(a) True positives in the population&lt;br /&gt;
&lt;br /&gt;
(b) True negatives in the population&lt;br /&gt;
&lt;br /&gt;
(c) People who test positive&lt;br /&gt;
&lt;br /&gt;
(d) People who test negative&lt;br /&gt;
&lt;br /&gt;
6.4) A new screening test has been developed for diabetes. The table below represents the results of the new test compared to the current gold standard. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| ||Condition positive||Condition negative||Total&lt;br /&gt;
|-&lt;br /&gt;
|Test positive||80||70||150&lt;br /&gt;
|-&lt;br /&gt;
|Test negative||10||240||250&lt;br /&gt;
|-&lt;br /&gt;
|Total||90||310||400&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
What is the sensitivity of the test?&lt;br /&gt;
&lt;br /&gt;
(a) 77%&lt;br /&gt;
&lt;br /&gt;
(b) 89%&lt;br /&gt;
&lt;br /&gt;
(c) 80%&lt;br /&gt;
&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.5) What is the specificity of the test?&lt;br /&gt;
&lt;br /&gt;
(a) 77%&lt;br /&gt;
&lt;br /&gt;
(b) 89%&lt;br /&gt;
&lt;br /&gt;
(c) 80%&lt;br /&gt;
&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
6.6) What is the positive predictive value of the test?&lt;br /&gt;
&lt;br /&gt;
(a) 77%&lt;br /&gt;
&lt;br /&gt;
(b) 89%&lt;br /&gt;
&lt;br /&gt;
(c) 80%&lt;br /&gt;
&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger.  http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
&lt;br /&gt;
Sampling / Steven K. Thompson. http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
&lt;br /&gt;
Introduction to ROC Curves http://gim.unmc.edu/dxtests/roc1.htm &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Answers:  &lt;br /&gt;
2 – 6 : F, c, b, a, d&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=File:ROC_Fig_1.png&amp;diff=13343</id>
		<title>File:ROC Fig 1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=File:ROC_Fig_1.png&amp;diff=13343"/>
		<updated>2014-08-14T13:40:25Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13342</id>
		<title>SMHS ROC</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13342"/>
		<updated>2014-08-14T13:39:59Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Receiver Operating Characteristic (ROC) Curve ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Receiver operating characteristic (ROC curve) is a graphical plot, which illustrates the performance of a binary classifier system as its discrimination threshold varies. The ROC curve is created by plotting the fraction of true positive out of the total actual positives vs. the fraction of false positives out of the total actual negatives at various threshold settings. In this section, we are going to introduce the ROC curve and illustrate applications of this method with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have talked about the cases with a binary classification where the outcomes are either absent or present and the test results are positive or negative. We have also discussed about sensitivity and specificity of a test and are familiar with the concepts of true positive and true negatives. With ROC curve, we are looking to demonstrate the following aspects:&lt;br /&gt;
*To show the tradeoff between sensitivity and specificity;&lt;br /&gt;
*The closer the curve follows the left-hand border and top border of ROC space, the more accurate is the test;&lt;br /&gt;
*The closer the curve comes to the 45-degree diagonal, the less accurate is the test;&lt;br /&gt;
*The slope of the tangent line at a cut-point gives the likelihood ratio for the value of the test; &lt;br /&gt;
*The area under the curve is a measure of text accuracy.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=2|Actual condition&lt;br /&gt;
|-&lt;br /&gt;
|Absent (H_0 is true)||Present (H_1 is true)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Test Result||Negative (fail to reject H_0)||Condition absent + Negative result = True (accurate) Negative (TN, 0.98505)||Condition present + Negative result = False (invalid) Negative (FN, 0.00025)Type II error (β)&lt;br /&gt;
|-&lt;br /&gt;
|Positive||(reject H_0)	Condition absent + Positive result = False Positive (FP, 0.00995) Type I error (α)||Condition Present + Positive result = True Positive (TP, 0.00475)&lt;br /&gt;
|-&lt;br /&gt;
|Test Interpretation||Power = 1-FN=1-0.00025 = 0.99975||Specificity: TN/(TN+FP) =0.98505/(0.98505+0.00995) = 0.99||Sensitivity: TP/(TP+FN) =0.00475/(0.00475+ 0.00025)= 0.95&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Review of basic concepts in a binary classification:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2| ||rowspan=2| ||colspan=2|Disease Status||colspan=2|Metrics&lt;br /&gt;
|-&lt;br /&gt;
|Disease||No Disease||Prevalence=(∑▒〖Condition positive〗)/(∑▒〖Total population〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Screening Test||Positive||a (True positives)||b (False positives)||Positive predictive value (PPV)=(∑▒〖Ture positive〗)/(∑▒〖Test positives〗)||False discovery rate (FDR)==(∑▒〖False positive〗)/(∑▒〖Test positive〗)&lt;br /&gt;
|-&lt;br /&gt;
|Negative||c (False negatives)||d (True negatives)||False omission rate (FOR)=(∑▒〖False negative〗)/(∑▒〖Test negative〗)||Negative predictive value (NPV)=(∑▒〖True negative〗)/(∑▒〖Test negative〗)&lt;br /&gt;
|-&lt;br /&gt;
| ||Positive Likelihood Ratio=TPR/FBR||True positive rate (TPR)=(∑▒〖True positive〗)/(∑▒〖condition positive〗)||False positive rate (FPR)=(∑▒〖False positve〗)/(∑▒〖condition positive〗)||Accuracy(ACC)=(∑▒〖True positive〗+∑▒〖True negative〗)/(∑▒〖Total population 〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
| ||Negative Likelihood Ratio=FNR/TNR||False negative rate (FNR)=(∑▒〖False negative〗)/(∑▒〖condition negative〗)||True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)| || | ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;		&lt;br /&gt;
&lt;br /&gt;
3.2) Introduction of ROC Curve:&lt;br /&gt;
&lt;br /&gt;
Sensitivity and specificity are both characteristics of a test but they also depend on the definition of what constitutes an abnormal test. Consider a medical test on diagnostic tests where the cut-points would without doubt influence the test results. We can use the hypothyroidism data from the likelihood ratio to illustrate how these two characteristics change depending on the choice of T4 level that defines hypothyroidism. Recall the data where patients with suspected hypothyroidism are reported.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4||&amp;lt;1||1-2||2-3||3-4||4-5||5-6||6-7||7-8||8-9||9-10||10-11||11-12||&amp;gt;12&lt;br /&gt;
|-&lt;br /&gt;
|Hypothyroid||2||3||1||8||4||4||3||3||1||0||2||1||0&lt;br /&gt;
|-&lt;br /&gt;
|Euthyroid||0||0||0||0||1||6||11||19||17||20||11||4||4&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the following cut-points, we have the data listed:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|5.1 - 7||7||17&lt;br /&gt;
|-&lt;br /&gt;
|7.1 - 9||4||36&lt;br /&gt;
|-&lt;br /&gt;
|9 or more||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that patients with T4 of 5 or less are considered to be hypothyroid, then the data would be displayed as the following and the sensitivity is 0.56 and specificity is 0.99 in this case.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|More than 5||14||92&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Now suppose, we decided to be less stringent on the disease and consider the patients with T4 values of 7 or less to be hypothyroid, then the data would be recorded as the following and the sensitivity in this case would be 0.78 and specificity 0.81:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|7 or less||25||18&lt;br /&gt;
|-&lt;br /&gt;
|More than 7||7||75&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we move the cut-point for hypothyroidism a little bit higher, say 9, we would have the sensitivity of 0.91 and specificity 0.42:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|9 or less||29||54&lt;br /&gt;
|-&lt;br /&gt;
|More than 9||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
To sum up, we have the pairs of sensitivity an specificity with corresponding cut-points in the following table:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||Sensitivity||Specificity&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.99&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.81&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.42&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
From the table above, we observe that the sensitivity improves with increasing cut-point T4 value while specificity increases with decreasing cut-point T4 value. That is a tradeoff between sensitivity and specificity. The table above can also be shown as TP and FP. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||True positives||False positives&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.01&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.19&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.58&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plot sensitivity vs. specificity, we have the ROC curve:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:ROC Fig 1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
*Accuracy of a test is measured by the area under the ROC Curve and a rough guide for classifying the accuracy of a diagnostic test is traditional academic point system: 0.90-1:excellent;0.8-0.9: good (B);0.7-0.8:fair (C);0.6-0.7:poor (D);0.5-0.7:fail (F).&lt;br /&gt;
With our example above, the area under the T4 ROC curve is 0.86, which shows that the accuracy of the test is good in separating hypothyroid from euthyroid patients.&lt;br /&gt;
&lt;br /&gt;
	How to calculate the area under the curve? The area measures discrimination, which is the ability of the test to correctly classify those with and without the disease. The area under the curve is the percentage of randomly drawn pairs for which this is true. Two methods are commonly used to calculate the area of the scope: (1) non-parametric method based on constructing trapezoids under the curve as approximation of area; (2) a parametric method using a MLE to fit a smooth curve to data points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://pubs.rsna.org/doi/abs/10.1148/radiology.143.1.7063747) titled The Meaning And the Use Of The Area Under A Receiver Operating Characteristic (ROC) Curve presented a representation and interpretation of the area under a ROC curve obtained by the ‘rating’ method, or by mathematical predictions based on patient characteristics. It showed that that in such a setting the area represents the probability that a randomly chosen diseased subject is (correctly) rated or ranked with greater suspicion than a randomly chosen non-diseased subject. &lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.sciencedirect.com/science/article/pii/S0001299878800142) illustrated practical experimental techniques for measuring ROC curves and discussed about the issues of case selection and curve-fitting. It also talked about possible generalizations of conventional ROC analysis to account for decision performance in complex diagnostic tasks and showed ROC analysis related in direct and natural way to cost/benefit analysis of diagnostic decision making. This paper developed the concepts of ‘average diagnostic cost’ and ‘average net benefit’ to identify the optimal compromise among various kinds of diagnostic error and suggested ways in ROC analysis to optimize diagnostic strategies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
&lt;br /&gt;
# With the given example in R:&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose that a new study is conducted on lung cancer and the following data is collected in identify between two types of lung cancers (say type a and type b). Conduct the ROC curve for this example by varying the cut-points from 2 to 10 by increasing 2 units each time. Calculate the area under the curve and interpret on the accuracy of the test.&lt;br /&gt;
&lt;br /&gt;
measurements	&amp;lt;1	1-2	2-3	3-4	4-5	5-6	6-7	7-8	8-9	9-10	10-11	11-12	&amp;gt;12&lt;br /&gt;
Type a	2	1	4	2	8	7	4	3	0	0	1	2	2&lt;br /&gt;
Type b	1	3	0	2	2	5	10	23	18	20	15	8	2&lt;br /&gt;
&lt;br /&gt;
6.2) When a serious disease can be treated if it is caught early, it is more important to have a test with high specificity than high sensitivity.&lt;br /&gt;
a. True&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.3) The positive predictive value of a test is calculated by dividing the number of:&lt;br /&gt;
(a) True positives in the population&lt;br /&gt;
(b) True negatives in the population&lt;br /&gt;
(c) People who test positive&lt;br /&gt;
(d) People who test negative&lt;br /&gt;
&lt;br /&gt;
6.4) A new screening test has been developed for diabetes. The table below represents the results of the new test compared to the current gold standard. &lt;br /&gt;
&lt;br /&gt;
	Condition positive	Condition negative	Total&lt;br /&gt;
Test positive	80	70	150&lt;br /&gt;
Test negative	10	240	250&lt;br /&gt;
Total	90	310	400&lt;br /&gt;
&lt;br /&gt;
What is the sensitivity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.5) What is the specificity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
6.6) What is the positive predictive value of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
http://gim.unmc.edu/dxtests/roc1.htm &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Answers:  &lt;br /&gt;
2 – 6 : F, c, b, a, d&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13341</id>
		<title>SMHS ROC</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13341"/>
		<updated>2014-08-14T13:39:14Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Receiver Operating Characteristic (ROC) Curve */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Receiver Operating Characteristic (ROC) Curve ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Receiver operating characteristic (ROC curve) is a graphical plot, which illustrates the performance of a binary classifier system as its discrimination threshold varies. The ROC curve is created by plotting the fraction of true positive out of the total actual positives vs. the fraction of false positives out of the total actual negatives at various threshold settings. In this section, we are going to introduce the ROC curve and illustrate applications of this method with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have talked about the cases with a binary classification where the outcomes are either absent or present and the test results are positive or negative. We have also discussed about sensitivity and specificity of a test and are familiar with the concepts of true positive and true negatives. With ROC curve, we are looking to demonstrate the following aspects:&lt;br /&gt;
*To show the tradeoff between sensitivity and specificity;&lt;br /&gt;
*The closer the curve follows the left-hand border and top border of ROC space, the more accurate is the test;&lt;br /&gt;
*The closer the curve comes to the 45-degree diagonal, the less accurate is the test;&lt;br /&gt;
*The slope of the tangent line at a cut-point gives the likelihood ratio for the value of the test; &lt;br /&gt;
*The area under the curve is a measure of text accuracy.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=2|Actual condition&lt;br /&gt;
|-&lt;br /&gt;
|Absent (H_0 is true)||Present (H_1 is true)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Test Result||Negative (fail to reject H_0)||Condition absent + Negative result = True (accurate) Negative (TN, 0.98505)||Condition present + Negative result = False (invalid) Negative (FN, 0.00025)Type II error (β)&lt;br /&gt;
|-&lt;br /&gt;
|Positive||(reject H_0)	Condition absent + Positive result = False Positive (FP, 0.00995) Type I error (α)||Condition Present + Positive result = True Positive (TP, 0.00475)&lt;br /&gt;
|-&lt;br /&gt;
|Test Interpretation||Power = 1-FN=1-0.00025 = 0.99975||Specificity: TN/(TN+FP) =0.98505/(0.98505+0.00995) = 0.99||Sensitivity: TP/(TP+FN) =0.00475/(0.00475+ 0.00025)= 0.95&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Review of basic concepts in a binary classification:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2| ||rowspan=2| ||colspan=2|Disease Status||colspan=2|Metrics&lt;br /&gt;
|-&lt;br /&gt;
|Disease||No Disease||Prevalence=(∑▒〖Condition positive〗)/(∑▒〖Total population〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Screening Test||Positive||a (True positives)||b (False positives)||Positive predictive value (PPV)=(∑▒〖Ture positive〗)/(∑▒〖Test positives〗)||False discovery rate (FDR)==(∑▒〖False positive〗)/(∑▒〖Test positive〗)&lt;br /&gt;
|-&lt;br /&gt;
|Negative||c (False negatives)||d (True negatives)||False omission rate (FOR)=(∑▒〖False negative〗)/(∑▒〖Test negative〗)||Negative predictive value (NPV)=(∑▒〖True negative〗)/(∑▒〖Test negative〗)&lt;br /&gt;
|-&lt;br /&gt;
| ||Positive Likelihood Ratio=TPR/FBR||True positive rate (TPR)=(∑▒〖True positive〗)/(∑▒〖condition positive〗)||False positive rate (FPR)=(∑▒〖False positve〗)/(∑▒〖condition positive〗)||Accuracy(ACC)=(∑▒〖True positive〗+∑▒〖True negative〗)/(∑▒〖Total population 〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
| ||Negative Likelihood Ratio=FNR/TNR||False negative rate (FNR)=(∑▒〖False negative〗)/(∑▒〖condition negative〗)||True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)| || | ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;		&lt;br /&gt;
&lt;br /&gt;
3.2) Introduction of ROC Curve:&lt;br /&gt;
&lt;br /&gt;
Sensitivity and specificity are both characteristics of a test but they also depend on the definition of what constitutes an abnormal test. Consider a medical test on diagnostic tests where the cut-points would without doubt influence the test results. We can use the hypothyroidism data from the likelihood ratio to illustrate how these two characteristics change depending on the choice of T4 level that defines hypothyroidism. Recall the data where patients with suspected hypothyroidism are reported.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4||&amp;lt;1||1-2||2-3||3-4||4-5||5-6||6-7||7-8||8-9||9-10||10-11||11-12||&amp;gt;12&lt;br /&gt;
|-&lt;br /&gt;
|Hypothyroid||2||3||1||8||4||4||3||3||1||0||2||1||0&lt;br /&gt;
|-&lt;br /&gt;
|Euthyroid||0||0||0||0||1||6||11||19||17||20||11||4||4&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the following cut-points, we have the data listed:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|5.1 - 7||7||17&lt;br /&gt;
|-&lt;br /&gt;
|7.1 - 9||4||36&lt;br /&gt;
|-&lt;br /&gt;
|9 or more||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that patients with T4 of 5 or less are considered to be hypothyroid, then the data would be displayed as the following and the sensitivity is 0.56 and specificity is 0.99 in this case.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|More than 5||14||92&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Now suppose, we decided to be less stringent on the disease and consider the patients with T4 values of 7 or less to be hypothyroid, then the data would be recorded as the following and the sensitivity in this case would be 0.78 and specificity 0.81:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|7 or less||25||18&lt;br /&gt;
|-&lt;br /&gt;
|More than 7||7||75&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we move the cut-point for hypothyroidism a little bit higher, say 9, we would have the sensitivity of 0.91 and specificity 0.42:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|9 or less||29||54&lt;br /&gt;
|-&lt;br /&gt;
|More than 9||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
To sum up, we have the pairs of sensitivity an specificity with corresponding cut-points in the following table:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||Sensitivity||Specificity&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.99&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.81&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.42&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
From the table above, we observe that the sensitivity improves with increasing cut-point T4 value while specificity increases with decreasing cut-point T4 value. That is a tradeoff between sensitivity and specificity. The table above can also be shown as TP and FP. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||True positives||False positives&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.01&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.19&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.58&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plot sensitivity vs. specificity, we have the ROC curve:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
[[File:ROC Fig 1.png]]&lt;br /&gt;
*Accuracy of a test is measured by the area under the ROC Curve and a rough guide for classifying the accuracy of a diagnostic test is traditional academic point system: 0.90-1:excellent;0.8-0.9: good (B);0.7-0.8:fair (C);0.6-0.7:poor (D);0.5-0.7:fail (F).&lt;br /&gt;
With our example above, the area under the T4 ROC curve is 0.86, which shows that the accuracy of the test is good in separating hypothyroid from euthyroid patients.&lt;br /&gt;
&lt;br /&gt;
	How to calculate the area under the curve? The area measures discrimination, which is the ability of the test to correctly classify those with and without the disease. The area under the curve is the percentage of randomly drawn pairs for which this is true. Two methods are commonly used to calculate the area of the scope: (1) non-parametric method based on constructing trapezoids under the curve as approximation of area; (2) a parametric method using a MLE to fit a smooth curve to data points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://pubs.rsna.org/doi/abs/10.1148/radiology.143.1.7063747) titled The Meaning And the Use Of The Area Under A Receiver Operating Characteristic (ROC) Curve presented a representation and interpretation of the area under a ROC curve obtained by the ‘rating’ method, or by mathematical predictions based on patient characteristics. It showed that that in such a setting the area represents the probability that a randomly chosen diseased subject is (correctly) rated or ranked with greater suspicion than a randomly chosen non-diseased subject. &lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.sciencedirect.com/science/article/pii/S0001299878800142) illustrated practical experimental techniques for measuring ROC curves and discussed about the issues of case selection and curve-fitting. It also talked about possible generalizations of conventional ROC analysis to account for decision performance in complex diagnostic tasks and showed ROC analysis related in direct and natural way to cost/benefit analysis of diagnostic decision making. This paper developed the concepts of ‘average diagnostic cost’ and ‘average net benefit’ to identify the optimal compromise among various kinds of diagnostic error and suggested ways in ROC analysis to optimize diagnostic strategies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
&lt;br /&gt;
# With the given example in R:&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose that a new study is conducted on lung cancer and the following data is collected in identify between two types of lung cancers (say type a and type b). Conduct the ROC curve for this example by varying the cut-points from 2 to 10 by increasing 2 units each time. Calculate the area under the curve and interpret on the accuracy of the test.&lt;br /&gt;
&lt;br /&gt;
measurements	&amp;lt;1	1-2	2-3	3-4	4-5	5-6	6-7	7-8	8-9	9-10	10-11	11-12	&amp;gt;12&lt;br /&gt;
Type a	2	1	4	2	8	7	4	3	0	0	1	2	2&lt;br /&gt;
Type b	1	3	0	2	2	5	10	23	18	20	15	8	2&lt;br /&gt;
&lt;br /&gt;
6.2) When a serious disease can be treated if it is caught early, it is more important to have a test with high specificity than high sensitivity.&lt;br /&gt;
a. True&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.3) The positive predictive value of a test is calculated by dividing the number of:&lt;br /&gt;
(a) True positives in the population&lt;br /&gt;
(b) True negatives in the population&lt;br /&gt;
(c) People who test positive&lt;br /&gt;
(d) People who test negative&lt;br /&gt;
&lt;br /&gt;
6.4) A new screening test has been developed for diabetes. The table below represents the results of the new test compared to the current gold standard. &lt;br /&gt;
&lt;br /&gt;
	Condition positive	Condition negative	Total&lt;br /&gt;
Test positive	80	70	150&lt;br /&gt;
Test negative	10	240	250&lt;br /&gt;
Total	90	310	400&lt;br /&gt;
&lt;br /&gt;
What is the sensitivity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.5) What is the specificity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
6.6) What is the positive predictive value of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
http://gim.unmc.edu/dxtests/roc1.htm &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Answers:  &lt;br /&gt;
2 – 6 : F, c, b, a, d&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13340</id>
		<title>SMHS ROC</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13340"/>
		<updated>2014-08-14T13:26:55Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Receiver Operating Characteristic (ROC) Curve */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Receiver Operating Characteristic (ROC) Curve ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Receiver operating characteristic (ROC curve) is a graphical plot, which illustrates the performance of a binary classifier system as its discrimination threshold varies. The ROC curve is created by plotting the fraction of true positive out of the total actual positives vs. the fraction of false positives out of the total actual negatives at various threshold settings. In this section, we are going to introduce the ROC curve and illustrate applications of this method with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have talked about the cases with a binary classification where the outcomes are either absent or present and the test results are positive or negative. We have also discussed about sensitivity and specificity of a test and are familiar with the concepts of true positive and true negatives. With ROC curve, we are looking to demonstrate the following aspects:&lt;br /&gt;
*To show the tradeoff between sensitivity and specificity;&lt;br /&gt;
*The closer the curve follows the left-hand border and top border of ROC space, the more accurate is the test;&lt;br /&gt;
*The closer the curve comes to the 45-degree diagonal, the less accurate is the test;&lt;br /&gt;
*The slope of the tangent line at a cut-point gives the likelihood ratio for the value of the test; &lt;br /&gt;
*The area under the curve is a measure of text accuracy.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=2|Actual condition&lt;br /&gt;
|-&lt;br /&gt;
|Absent (H_0 is true)||Present (H_1 is true)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Test Result||Negative (fail to reject H_0)||Condition absent + Negative result = True (accurate) Negative (TN, 0.98505)||Condition present + Negative result = False (invalid) Negative (FN, 0.00025)Type II error (β)&lt;br /&gt;
|-&lt;br /&gt;
|Positive||(reject H_0)	Condition absent + Positive result = False Positive (FP, 0.00995) Type I error (α)||Condition Present + Positive result = True Positive (TP, 0.00475)&lt;br /&gt;
|-&lt;br /&gt;
|Test Interpretation||Power = 1-FN=1-0.00025 = 0.99975||Specificity: TN/(TN+FP) =0.98505/(0.98505+0.00995) = 0.99||Sensitivity: TP/(TP+FN) =0.00475/(0.00475+ 0.00025)= 0.95&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Review of basic concepts in a binary classification:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2| ||rowspan=2| ||colspan=2|Disease Status||colspan=2|Metrics&lt;br /&gt;
|-&lt;br /&gt;
|Disease||No Disease||Prevalence=(∑▒〖Condition positive〗)/(∑▒〖Total population〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Screening Test||Positive||a (True positives)||b (False positives)||Positive predictive value (PPV)=(∑▒〖Ture positive〗)/(∑▒〖Test positives〗)||False discovery rate (FDR)==(∑▒〖False positive〗)/(∑▒〖Test positive〗)&lt;br /&gt;
|-&lt;br /&gt;
|Negative||c (False negatives)||d (True negatives)||False omission rate (FOR)=(∑▒〖False negative〗)/(∑▒〖Test negative〗)||Negative predictive value (NPV)=(∑▒〖True negative〗)/(∑▒〖Test negative〗)&lt;br /&gt;
|-&lt;br /&gt;
| ||Positive Likelihood Ratio=TPR/FBR||True positive rate (TPR)=(∑▒〖True positive〗)/(∑▒〖condition positive〗)||False positive rate (FPR)=(∑▒〖False positve〗)/(∑▒〖condition positive〗)||Accuracy(ACC)=(∑▒〖True positive〗+∑▒〖True negative〗)/(∑▒〖Total population 〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
| ||Negative Likelihood Ratio=FNR/TNR||False negative rate (FNR)=(∑▒〖False negative〗)/(∑▒〖condition negative〗)||True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)| || | ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;		&lt;br /&gt;
&lt;br /&gt;
3.2) Introduction of ROC Curve:&lt;br /&gt;
&lt;br /&gt;
Sensitivity and specificity are both characteristics of a test but they also depend on the definition of what constitutes an abnormal test. Consider a medical test on diagnostic tests where the cut-points would without doubt influence the test results. We can use the hypothyroidism data from the likelihood ratio to illustrate how these two characteristics change depending on the choice of T4 level that defines hypothyroidism. Recall the data where patients with suspected hypothyroidism are reported.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4||&amp;lt;1||1-2||2-3||3-4||4-5||5-6||6-7||7-8||8-9||9-10||10-11||11-12||&amp;gt;12&lt;br /&gt;
|-&lt;br /&gt;
|Hypothyroid||2||3||1||8||4||4||3||3||1||0||2||1||0&lt;br /&gt;
|-&lt;br /&gt;
|Euthyroid||0||0||0||0||1||6||11||19||17||20||11||4||4&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the following cut-points, we have the data listed:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|5.1 - 7||7||17&lt;br /&gt;
|-&lt;br /&gt;
|7.1 - 9||4||36&lt;br /&gt;
|-&lt;br /&gt;
|9 or more||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that patients with T4 of 5 or less are considered to be hypothyroid, then the data would be displayed as the following and the sensitivity is 0.56 and specificity is 0.99 in this case.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|More than 5||14||92&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Now suppose, we decided to be less stringent on the disease and consider the patients with T4 values of 7 or less to be hypothyroid, then the data would be recorded as the following and the sensitivity in this case would be 0.78 and specificity 0.81:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|7 or less||25||18&lt;br /&gt;
|-&lt;br /&gt;
|More than 7||7||75&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we move the cut-point for hypothyroidism a little bit higher, say 9, we would have the sensitivity of 0.91 and specificity 0.42:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|9 or less||29||54&lt;br /&gt;
|-&lt;br /&gt;
|More than 9||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
To sum up, we have the pairs of sensitivity an specificity with corresponding cut-points in the following table:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||Sensitivity||Specificity&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.99&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.81&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.42&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
From the table above, we observe that the sensitivity improves with increasing cut-point T4 value while specificity increases with decreasing cut-point T4 value. That is a tradeoff between sensitivity and specificity. The table above can also be shown as TP and FP. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cut points||True positives||False positives&lt;br /&gt;
|-&lt;br /&gt;
|5||0.56||0.01&lt;br /&gt;
|-&lt;br /&gt;
|7||0.78||0.19&lt;br /&gt;
|-&lt;br /&gt;
|9||0.91||0.58&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plot sensitivity vs. specificity, we have the ROC curve:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
 &lt;br /&gt;
	Accuracy of a test is measured by the area under the ROC Curve and a rough guide for classifying the accuracy of a diagnostic test is traditional academic point system: 0.90-1:excellent;0.8-0.9: good (B);0.7-0.8:fair (C);0.6-0.7:poor (D);0.5-0.7:fail (F).&lt;br /&gt;
With our example above, the area under the T4 ROC curve is 0.86, which shows that the accuracy of the test is good in separating hypothyroid from euthyroid patients.&lt;br /&gt;
&lt;br /&gt;
	How to calculate the area under the curve? The area measures discrimination, which is the ability of the test to correctly classify those with and without the disease. The area under the curve is the percentage of randomly drawn pairs for which this is true. Two methods are commonly used to calculate the area of the scope: (1) non-parametric method based on constructing trapezoids under the curve as approximation of area; (2) a parametric method using a MLE to fit a smooth curve to data points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://pubs.rsna.org/doi/abs/10.1148/radiology.143.1.7063747) titled The Meaning And the Use Of The Area Under A Receiver Operating Characteristic (ROC) Curve presented a representation and interpretation of the area under a ROC curve obtained by the ‘rating’ method, or by mathematical predictions based on patient characteristics. It showed that that in such a setting the area represents the probability that a randomly chosen diseased subject is (correctly) rated or ranked with greater suspicion than a randomly chosen non-diseased subject. &lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.sciencedirect.com/science/article/pii/S0001299878800142) illustrated practical experimental techniques for measuring ROC curves and discussed about the issues of case selection and curve-fitting. It also talked about possible generalizations of conventional ROC analysis to account for decision performance in complex diagnostic tasks and showed ROC analysis related in direct and natural way to cost/benefit analysis of diagnostic decision making. This paper developed the concepts of ‘average diagnostic cost’ and ‘average net benefit’ to identify the optimal compromise among various kinds of diagnostic error and suggested ways in ROC analysis to optimize diagnostic strategies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
&lt;br /&gt;
# With the given example in R:&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose that a new study is conducted on lung cancer and the following data is collected in identify between two types of lung cancers (say type a and type b). Conduct the ROC curve for this example by varying the cut-points from 2 to 10 by increasing 2 units each time. Calculate the area under the curve and interpret on the accuracy of the test.&lt;br /&gt;
&lt;br /&gt;
measurements	&amp;lt;1	1-2	2-3	3-4	4-5	5-6	6-7	7-8	8-9	9-10	10-11	11-12	&amp;gt;12&lt;br /&gt;
Type a	2	1	4	2	8	7	4	3	0	0	1	2	2&lt;br /&gt;
Type b	1	3	0	2	2	5	10	23	18	20	15	8	2&lt;br /&gt;
&lt;br /&gt;
6.2) When a serious disease can be treated if it is caught early, it is more important to have a test with high specificity than high sensitivity.&lt;br /&gt;
a. True&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.3) The positive predictive value of a test is calculated by dividing the number of:&lt;br /&gt;
(a) True positives in the population&lt;br /&gt;
(b) True negatives in the population&lt;br /&gt;
(c) People who test positive&lt;br /&gt;
(d) People who test negative&lt;br /&gt;
&lt;br /&gt;
6.4) A new screening test has been developed for diabetes. The table below represents the results of the new test compared to the current gold standard. &lt;br /&gt;
&lt;br /&gt;
	Condition positive	Condition negative	Total&lt;br /&gt;
Test positive	80	70	150&lt;br /&gt;
Test negative	10	240	250&lt;br /&gt;
Total	90	310	400&lt;br /&gt;
&lt;br /&gt;
What is the sensitivity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.5) What is the specificity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
6.6) What is the positive predictive value of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
http://gim.unmc.edu/dxtests/roc1.htm &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Answers:  &lt;br /&gt;
2 – 6 : F, c, b, a, d&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13339</id>
		<title>SMHS ROC</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13339"/>
		<updated>2014-08-14T13:16:26Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Receiver Operating Characteristic (ROC) Curve */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Receiver Operating Characteristic (ROC) Curve ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Receiver operating characteristic (ROC curve) is a graphical plot, which illustrates the performance of a binary classifier system as its discrimination threshold varies. The ROC curve is created by plotting the fraction of true positive out of the total actual positives vs. the fraction of false positives out of the total actual negatives at various threshold settings. In this section, we are going to introduce the ROC curve and illustrate applications of this method with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have talked about the cases with a binary classification where the outcomes are either absent or present and the test results are positive or negative. We have also discussed about sensitivity and specificity of a test and are familiar with the concepts of true positive and true negatives. With ROC curve, we are looking to demonstrate the following aspects:&lt;br /&gt;
*To show the tradeoff between sensitivity and specificity;&lt;br /&gt;
*The closer the curve follows the left-hand border and top border of ROC space, the more accurate is the test;&lt;br /&gt;
*The closer the curve comes to the 45-degree diagonal, the less accurate is the test;&lt;br /&gt;
*The slope of the tangent line at a cut-point gives the likelihood ratio for the value of the test; &lt;br /&gt;
*The area under the curve is a measure of text accuracy.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=2|Actual condition&lt;br /&gt;
|-&lt;br /&gt;
|Absent (H_0 is true)||Present (H_1 is true)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Test Result||Negative (fail to reject H_0)||Condition absent + Negative result = True (accurate) Negative (TN, 0.98505)||Condition present + Negative result = False (invalid) Negative (FN, 0.00025)Type II error (β)&lt;br /&gt;
|-&lt;br /&gt;
|Positive||(reject H_0)	Condition absent + Positive result = False Positive (FP, 0.00995) Type I error (α)||Condition Present + Positive result = True Positive (TP, 0.00475)&lt;br /&gt;
|-&lt;br /&gt;
|Test Interpretation||Power = 1-FN=1-0.00025 = 0.99975||Specificity: TN/(TN+FP) =0.98505/(0.98505+0.00995) = 0.99||Sensitivity: TP/(TP+FN) =0.00475/(0.00475+ 0.00025)= 0.95&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Review of basic concepts in a binary classification:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2| ||rowspan=2| ||colspan=2|Disease Status||colspan=2|Metrics&lt;br /&gt;
|-&lt;br /&gt;
|Disease||No Disease||Prevalence=(∑▒〖Condition positive〗)/(∑▒〖Total population〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Screening Test||Positive||a (True positives)||b (False positives)||Positive predictive value (PPV)=(∑▒〖Ture positive〗)/(∑▒〖Test positives〗)||False discovery rate (FDR)==(∑▒〖False positive〗)/(∑▒〖Test positive〗)&lt;br /&gt;
|-&lt;br /&gt;
|Negative||c (False negatives)||d (True negatives)||False omission rate (FOR)=(∑▒〖False negative〗)/(∑▒〖Test negative〗)||Negative predictive value (NPV)=(∑▒〖True negative〗)/(∑▒〖Test negative〗)&lt;br /&gt;
|-&lt;br /&gt;
| ||Positive Likelihood Ratio=TPR/FBR||True positive rate (TPR)=(∑▒〖True positive〗)/(∑▒〖condition positive〗)||False positive rate (FPR)=(∑▒〖False positve〗)/(∑▒〖condition positive〗)||Accuracy(ACC)=(∑▒〖True positive〗+∑▒〖True negative〗)/(∑▒〖Total population 〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
| ||Negative Likelihood Ratio=FNR/TNR||False negative rate (FNR)=(∑▒〖False negative〗)/(∑▒〖condition negative〗)||True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)| || | ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;		&lt;br /&gt;
&lt;br /&gt;
3.2) Introduction of ROC Curve:&lt;br /&gt;
&lt;br /&gt;
Sensitivity and specificity are both characteristics of a test but they also depend on the definition of what constitutes an abnormal test. Consider a medical test on diagnostic tests where the cut-points would without doubt influence the test results. We can use the hypothyroidism data from the likelihood ratio to illustrate how these two characteristics change depending on the choice of T4 level that defines hypothyroidism. Recall the data where patients with suspected hypothyroidism are reported.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4||&amp;lt;1||1-2||2-3||3-4||4-5||5-6||6-7||7-8||8-9||9-10||10-11||11-12||&amp;gt;12&lt;br /&gt;
|-&lt;br /&gt;
|Hypothyroid||2||3||1||8||4||4||3||3||1||0||2||1||0&lt;br /&gt;
|-&lt;br /&gt;
|Euthyroid||0||0||0||0||1||6||11||19||17||20||11||4||4&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the following cut-points, we have the data listed:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|T4 value||Hypothyroid||Euthyroid&lt;br /&gt;
|-&lt;br /&gt;
|5 or less||18||1&lt;br /&gt;
|-&lt;br /&gt;
|5.1 - 7||7||17&lt;br /&gt;
|-&lt;br /&gt;
|7.1 - 9||4||36&lt;br /&gt;
|-&lt;br /&gt;
|9 or more||3||39&lt;br /&gt;
|-&lt;br /&gt;
|Totals:||32||93&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that patients with T4 of 5 or less are considered to be hypothyroid, then the data would be displayed as the following and the sensitivity is 0.56 and specificity is 0.99 in this case.&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
5 or less	18	1&lt;br /&gt;
More than 5	14	92&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
Now suppose, we decided to be less stringent on the disease and consider the patients with T4 values of 7 or less to be hypothyroid, then the data would be recorded as the following and the sensitivity in this case would be 0.78 and specificity 0.81:&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
7 or less	25	18&lt;br /&gt;
More than 7	7	75&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
If we move the cut-point for hypothyroidism a little bit higher, say 9, we would have the sensitivity of 0.91 and specificity 0.42:&lt;br /&gt;
&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
9 or less	29	54&lt;br /&gt;
More than 9	3	39&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
To sum up, we have the pairs of sensitivity an specificity with corresponding cut-points in the following table:&lt;br /&gt;
Cut points	Sensitivity	Specificity&lt;br /&gt;
5	0.56	0.99&lt;br /&gt;
7	0.78	0.81&lt;br /&gt;
9	0.91	0.42&lt;br /&gt;
&lt;br /&gt;
From the table above, we observe that the sensitivity improves with increasing cut-point T4 value while specificity increases with decreasing cut-point T4 value. That is a tradeoff between sensitivity and specificity. The table above can also be shown as TP and FP. &lt;br /&gt;
Cut points	True positives	False positives&lt;br /&gt;
5	0.56	0.01&lt;br /&gt;
7	0.78	0.19&lt;br /&gt;
9	0.91	0.58&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Plot sensitivity vs. specificity, we have the ROC curve:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
 &lt;br /&gt;
	Accuracy of a test is measured by the area under the ROC Curve and a rough guide for classifying the accuracy of a diagnostic test is traditional academic point system: 0.90-1:excellent;0.8-0.9: good (B);0.7-0.8:fair (C);0.6-0.7:poor (D);0.5-0.7:fail (F).&lt;br /&gt;
With our example above, the area under the T4 ROC curve is 0.86, which shows that the accuracy of the test is good in separating hypothyroid from euthyroid patients.&lt;br /&gt;
&lt;br /&gt;
	How to calculate the area under the curve? The area measures discrimination, which is the ability of the test to correctly classify those with and without the disease. The area under the curve is the percentage of randomly drawn pairs for which this is true. Two methods are commonly used to calculate the area of the scope: (1) non-parametric method based on constructing trapezoids under the curve as approximation of area; (2) a parametric method using a MLE to fit a smooth curve to data points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://pubs.rsna.org/doi/abs/10.1148/radiology.143.1.7063747) titled The Meaning And the Use Of The Area Under A Receiver Operating Characteristic (ROC) Curve presented a representation and interpretation of the area under a ROC curve obtained by the ‘rating’ method, or by mathematical predictions based on patient characteristics. It showed that that in such a setting the area represents the probability that a randomly chosen diseased subject is (correctly) rated or ranked with greater suspicion than a randomly chosen non-diseased subject. &lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.sciencedirect.com/science/article/pii/S0001299878800142) illustrated practical experimental techniques for measuring ROC curves and discussed about the issues of case selection and curve-fitting. It also talked about possible generalizations of conventional ROC analysis to account for decision performance in complex diagnostic tasks and showed ROC analysis related in direct and natural way to cost/benefit analysis of diagnostic decision making. This paper developed the concepts of ‘average diagnostic cost’ and ‘average net benefit’ to identify the optimal compromise among various kinds of diagnostic error and suggested ways in ROC analysis to optimize diagnostic strategies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
&lt;br /&gt;
# With the given example in R:&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose that a new study is conducted on lung cancer and the following data is collected in identify between two types of lung cancers (say type a and type b). Conduct the ROC curve for this example by varying the cut-points from 2 to 10 by increasing 2 units each time. Calculate the area under the curve and interpret on the accuracy of the test.&lt;br /&gt;
&lt;br /&gt;
measurements	&amp;lt;1	1-2	2-3	3-4	4-5	5-6	6-7	7-8	8-9	9-10	10-11	11-12	&amp;gt;12&lt;br /&gt;
Type a	2	1	4	2	8	7	4	3	0	0	1	2	2&lt;br /&gt;
Type b	1	3	0	2	2	5	10	23	18	20	15	8	2&lt;br /&gt;
&lt;br /&gt;
6.2) When a serious disease can be treated if it is caught early, it is more important to have a test with high specificity than high sensitivity.&lt;br /&gt;
a. True&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.3) The positive predictive value of a test is calculated by dividing the number of:&lt;br /&gt;
(a) True positives in the population&lt;br /&gt;
(b) True negatives in the population&lt;br /&gt;
(c) People who test positive&lt;br /&gt;
(d) People who test negative&lt;br /&gt;
&lt;br /&gt;
6.4) A new screening test has been developed for diabetes. The table below represents the results of the new test compared to the current gold standard. &lt;br /&gt;
&lt;br /&gt;
	Condition positive	Condition negative	Total&lt;br /&gt;
Test positive	80	70	150&lt;br /&gt;
Test negative	10	240	250&lt;br /&gt;
Total	90	310	400&lt;br /&gt;
&lt;br /&gt;
What is the sensitivity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.5) What is the specificity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
6.6) What is the positive predictive value of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
http://gim.unmc.edu/dxtests/roc1.htm &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Answers:  &lt;br /&gt;
2 – 6 : F, c, b, a, d&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13338</id>
		<title>SMHS ROC</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13338"/>
		<updated>2014-08-14T13:10:14Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Receiver Operating Characteristic (ROC) Curve */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Receiver Operating Characteristic (ROC) Curve ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Receiver operating characteristic (ROC curve) is a graphical plot, which illustrates the performance of a binary classifier system as its discrimination threshold varies. The ROC curve is created by plotting the fraction of true positive out of the total actual positives vs. the fraction of false positives out of the total actual negatives at various threshold settings. In this section, we are going to introduce the ROC curve and illustrate applications of this method with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have talked about the cases with a binary classification where the outcomes are either absent or present and the test results are positive or negative. We have also discussed about sensitivity and specificity of a test and are familiar with the concepts of true positive and true negatives. With ROC curve, we are looking to demonstrate the following aspects:&lt;br /&gt;
*To show the tradeoff between sensitivity and specificity;&lt;br /&gt;
*The closer the curve follows the left-hand border and top border of ROC space, the more accurate is the test;&lt;br /&gt;
*The closer the curve comes to the 45-degree diagonal, the less accurate is the test;&lt;br /&gt;
*The slope of the tangent line at a cut-point gives the likelihood ratio for the value of the test; &lt;br /&gt;
*The area under the curve is a measure of text accuracy.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=2|Actual condition&lt;br /&gt;
|-&lt;br /&gt;
|Absent (H_0 is true)||Present (H_1 is true)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Test Result||Negative (fail to reject H_0)||Condition absent + Negative result = True (accurate) Negative (TN, 0.98505)||Condition present + Negative result = False (invalid) Negative (FN, 0.00025)Type II error (β)&lt;br /&gt;
|-&lt;br /&gt;
|Positive||(reject H_0)	Condition absent + Positive result = False Positive (FP, 0.00995) Type I error (α)||Condition Present + Positive result = True Positive (TP, 0.00475)&lt;br /&gt;
|-&lt;br /&gt;
|Test Interpretation||Power = 1-FN=1-0.00025 = 0.99975||Specificity: TN/(TN+FP) =0.98505/(0.98505+0.00995) = 0.99||Sensitivity: TP/(TP+FN) =0.00475/(0.00475+ 0.00025)= 0.95&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Review of basic concepts in a binary classification:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2| ||rowspan=2| ||colspan=2|Disease Status||colspan=2|Metrics&lt;br /&gt;
|-&lt;br /&gt;
|Disease||No Disease||Prevalence=(∑▒〖Condition positive〗)/(∑▒〖Total population〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Screening Test||Positive||a (True positives)||b (False positives)||Positive predictive value (PPV)=(∑▒〖Ture positive〗)/(∑▒〖Test positives〗)||False discovery rate (FDR)==(∑▒〖False positive〗)/(∑▒〖Test positive〗)&lt;br /&gt;
|-&lt;br /&gt;
|Negative||c (False negatives)||d (True negatives)||False omission rate (FOR)=(∑▒〖False negative〗)/(∑▒〖Test negative〗)||Negative predictive value (NPV)=(∑▒〖True negative〗)/(∑▒〖Test negative〗)&lt;br /&gt;
|-&lt;br /&gt;
| ||Positive Likelihood Ratio=TPR/FBR||True positive rate (TPR)=(∑▒〖True positive〗)/(∑▒〖condition positive〗)||False positive rate (FPR)=(∑▒〖False positve〗)/(∑▒〖condition positive〗)||Accuracy(ACC)=(∑▒〖True positive〗+∑▒〖True negative〗)/(∑▒〖Total population 〗)| ||&lt;br /&gt;
|-&lt;br /&gt;
| ||Negative Likelihood Ratio=FNR/TNR||False negative rate (FNR)=(∑▒〖False negative〗)/(∑▒〖condition negative〗)||True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)| || | ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;		&lt;br /&gt;
&lt;br /&gt;
3.2) Introduction of ROC Curve:&lt;br /&gt;
&lt;br /&gt;
Sensitivity and specificity are both characteristics of a test but they also depend on the definition of what constitutes an abnormal test. Consider a medical test on diagnostic tests where the cut-points would without doubt influence the test results. We can use the hypothyroidism data from the likelihood ratio to illustrate how these two characteristics change depending on the choice of T4 level that defines hypothyroidism. Recall the data where patients with suspected hypothyroidism are reported.&lt;br /&gt;
T4	&amp;lt;1	1-2	2-3	3-4	4-5	5-6	6-7	7-8	8-9	9-10	10-11	11-12	&amp;gt;12&lt;br /&gt;
Hypothyroid	2	3	1	8	4	4	3	3	1	0	2	1	0&lt;br /&gt;
Euthyroid	0	0	0	0	1	6	11	19	17	20	11	4	4&lt;br /&gt;
&lt;br /&gt;
With the following cut-points, we have the data listed:&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
5 or less	18	1&lt;br /&gt;
5.1 - 7	7	17&lt;br /&gt;
7.1 - 9	4	36&lt;br /&gt;
9 or more	3	39&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
Suppose that patients with T4 of 5 or less are considered to be hypothyroid, then the data would be displayed as the following and the sensitivity is 0.56 and specificity is 0.99 in this case.&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
5 or less	18	1&lt;br /&gt;
More than 5	14	92&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
Now suppose, we decided to be less stringent on the disease and consider the patients with T4 values of 7 or less to be hypothyroid, then the data would be recorded as the following and the sensitivity in this case would be 0.78 and specificity 0.81:&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
7 or less	25	18&lt;br /&gt;
More than 7	7	75&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
If we move the cut-point for hypothyroidism a little bit higher, say 9, we would have the sensitivity of 0.91 and specificity 0.42:&lt;br /&gt;
&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
9 or less	29	54&lt;br /&gt;
More than 9	3	39&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
To sum up, we have the pairs of sensitivity an specificity with corresponding cut-points in the following table:&lt;br /&gt;
Cut points	Sensitivity	Specificity&lt;br /&gt;
5	0.56	0.99&lt;br /&gt;
7	0.78	0.81&lt;br /&gt;
9	0.91	0.42&lt;br /&gt;
&lt;br /&gt;
From the table above, we observe that the sensitivity improves with increasing cut-point T4 value while specificity increases with decreasing cut-point T4 value. That is a tradeoff between sensitivity and specificity. The table above can also be shown as TP and FP. &lt;br /&gt;
Cut points	True positives	False positives&lt;br /&gt;
5	0.56	0.01&lt;br /&gt;
7	0.78	0.19&lt;br /&gt;
9	0.91	0.58&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Plot sensitivity vs. specificity, we have the ROC curve:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
 &lt;br /&gt;
	Accuracy of a test is measured by the area under the ROC Curve and a rough guide for classifying the accuracy of a diagnostic test is traditional academic point system: 0.90-1:excellent;0.8-0.9: good (B);0.7-0.8:fair (C);0.6-0.7:poor (D);0.5-0.7:fail (F).&lt;br /&gt;
With our example above, the area under the T4 ROC curve is 0.86, which shows that the accuracy of the test is good in separating hypothyroid from euthyroid patients.&lt;br /&gt;
&lt;br /&gt;
	How to calculate the area under the curve? The area measures discrimination, which is the ability of the test to correctly classify those with and without the disease. The area under the curve is the percentage of randomly drawn pairs for which this is true. Two methods are commonly used to calculate the area of the scope: (1) non-parametric method based on constructing trapezoids under the curve as approximation of area; (2) a parametric method using a MLE to fit a smooth curve to data points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://pubs.rsna.org/doi/abs/10.1148/radiology.143.1.7063747) titled The Meaning And the Use Of The Area Under A Receiver Operating Characteristic (ROC) Curve presented a representation and interpretation of the area under a ROC curve obtained by the ‘rating’ method, or by mathematical predictions based on patient characteristics. It showed that that in such a setting the area represents the probability that a randomly chosen diseased subject is (correctly) rated or ranked with greater suspicion than a randomly chosen non-diseased subject. &lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.sciencedirect.com/science/article/pii/S0001299878800142) illustrated practical experimental techniques for measuring ROC curves and discussed about the issues of case selection and curve-fitting. It also talked about possible generalizations of conventional ROC analysis to account for decision performance in complex diagnostic tasks and showed ROC analysis related in direct and natural way to cost/benefit analysis of diagnostic decision making. This paper developed the concepts of ‘average diagnostic cost’ and ‘average net benefit’ to identify the optimal compromise among various kinds of diagnostic error and suggested ways in ROC analysis to optimize diagnostic strategies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
&lt;br /&gt;
# With the given example in R:&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose that a new study is conducted on lung cancer and the following data is collected in identify between two types of lung cancers (say type a and type b). Conduct the ROC curve for this example by varying the cut-points from 2 to 10 by increasing 2 units each time. Calculate the area under the curve and interpret on the accuracy of the test.&lt;br /&gt;
&lt;br /&gt;
measurements	&amp;lt;1	1-2	2-3	3-4	4-5	5-6	6-7	7-8	8-9	9-10	10-11	11-12	&amp;gt;12&lt;br /&gt;
Type a	2	1	4	2	8	7	4	3	0	0	1	2	2&lt;br /&gt;
Type b	1	3	0	2	2	5	10	23	18	20	15	8	2&lt;br /&gt;
&lt;br /&gt;
6.2) When a serious disease can be treated if it is caught early, it is more important to have a test with high specificity than high sensitivity.&lt;br /&gt;
a. True&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.3) The positive predictive value of a test is calculated by dividing the number of:&lt;br /&gt;
(a) True positives in the population&lt;br /&gt;
(b) True negatives in the population&lt;br /&gt;
(c) People who test positive&lt;br /&gt;
(d) People who test negative&lt;br /&gt;
&lt;br /&gt;
6.4) A new screening test has been developed for diabetes. The table below represents the results of the new test compared to the current gold standard. &lt;br /&gt;
&lt;br /&gt;
	Condition positive	Condition negative	Total&lt;br /&gt;
Test positive	80	70	150&lt;br /&gt;
Test negative	10	240	250&lt;br /&gt;
Total	90	310	400&lt;br /&gt;
&lt;br /&gt;
What is the sensitivity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.5) What is the specificity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
6.6) What is the positive predictive value of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
http://gim.unmc.edu/dxtests/roc1.htm &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Answers:  &lt;br /&gt;
2 – 6 : F, c, b, a, d&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13337</id>
		<title>SMHS ROC</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13337"/>
		<updated>2014-08-14T13:00:42Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Receiver Operating Characteristic (ROC) Curve */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Receiver Operating Characteristic (ROC) Curve ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Receiver operating characteristic (ROC curve) is a graphical plot, which illustrates the performance of a binary classifier system as its discrimination threshold varies. The ROC curve is created by plotting the fraction of true positive out of the total actual positives vs. the fraction of false positives out of the total actual negatives at various threshold settings. In this section, we are going to introduce the ROC curve and illustrate applications of this method with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have talked about the cases with a binary classification where the outcomes are either absent or present and the test results are positive or negative. We have also discussed about sensitivity and specificity of a test and are familiar with the concepts of true positive and true negatives. With ROC curve, we are looking to demonstrate the following aspects:&lt;br /&gt;
*To show the tradeoff between sensitivity and specificity;&lt;br /&gt;
*The closer the curve follows the left-hand border and top border of ROC space, the more accurate is the test;&lt;br /&gt;
*The closer the curve comes to the 45-degree diagonal, the less accurate is the test;&lt;br /&gt;
*The slope of the tangent line at a cut-point gives the likelihood ratio for the value of the test; &lt;br /&gt;
*The area under the curve is a measure of text accuracy.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
|colspan=2 rowspan=2| ||colspan=2|Actual condition&lt;br /&gt;
|-&lt;br /&gt;
|Absent (H_0 is true)||Present (H_1 is true)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Test Result||Negative (fail to reject H_0)||Condition absent + Negative result = True (accurate) Negative (TN, 0.98505)||Condition present + Negative result = False (invalid) Negative (FN, 0.00025)Type II error (β)&lt;br /&gt;
|-&lt;br /&gt;
|Positive||(reject H_0)	Condition absent + Positive result = False Positive (FP, 0.00995) Type I error (α)||Condition Present + Positive result = True Positive (TP, 0.00475)&lt;br /&gt;
|-&lt;br /&gt;
|Test Interpretation||Power = 1-FN=1-0.00025 = 0.99975||Specificity: TN/(TN+FP) =0.98505/(0.98505+0.00995) = 0.99||Sensitivity: TP/(TP+FN) =0.00475/(0.00475+ 0.00025)= 0.95&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;	&lt;br /&gt;
&lt;br /&gt;
3) Theory&lt;br /&gt;
&lt;br /&gt;
3.1) Review of basic concepts in a binary classification:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		Disease Status	Metrics&lt;br /&gt;
		Disease	No Disease	Prevalence=(∑▒〖Condition positive〗)/(∑▒〖Total population〗)	&lt;br /&gt;
Screening Test	Positive	a (True positives)	b (False positives)	Positive predictive value (PPV)=(∑▒〖Ture positive〗)/(∑▒〖Test positives〗)	False discovery rate (FDR)==(∑▒〖False positive〗)/(∑▒〖Test positive〗)&lt;br /&gt;
	Negative	c (False negatives)	d (True negatives)	False omission rate (FOR)=(∑▒〖False negative〗)/(∑▒〖Test negative〗)	Negative predictive value (NPV)=(∑▒〖True negative〗)/(∑▒〖Test negative〗)&lt;br /&gt;
	Positive Likelihood Ratio=TPR/FBR	True positive rate (TPR)=(∑▒〖True positive〗)/(∑▒〖condition positive〗)	False positive rate (FPR)=(∑▒〖False positve〗)/(∑▒〖condition positive〗)	Accuracy(ACC)=(∑▒〖True positive〗+∑▒〖True negative〗)/(∑▒〖Total population 〗)	&lt;br /&gt;
	Negative Likelihood Ratio=FNR/TNR	False negative rate (FNR)=(∑▒〖False negative〗)/(∑▒〖condition negative〗)	True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)		&lt;br /&gt;
&lt;br /&gt;
3.2) Introduction of ROC Curve:&lt;br /&gt;
&lt;br /&gt;
Sensitivity and specificity are both characteristics of a test but they also depend on the definition of what constitutes an abnormal test. Consider a medical test on diagnostic tests where the cut-points would without doubt influence the test results. We can use the hypothyroidism data from the likelihood ratio to illustrate how these two characteristics change depending on the choice of T4 level that defines hypothyroidism. Recall the data where patients with suspected hypothyroidism are reported.&lt;br /&gt;
T4	&amp;lt;1	1-2	2-3	3-4	4-5	5-6	6-7	7-8	8-9	9-10	10-11	11-12	&amp;gt;12&lt;br /&gt;
Hypothyroid	2	3	1	8	4	4	3	3	1	0	2	1	0&lt;br /&gt;
Euthyroid	0	0	0	0	1	6	11	19	17	20	11	4	4&lt;br /&gt;
&lt;br /&gt;
With the following cut-points, we have the data listed:&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
5 or less	18	1&lt;br /&gt;
5.1 - 7	7	17&lt;br /&gt;
7.1 - 9	4	36&lt;br /&gt;
9 or more	3	39&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
Suppose that patients with T4 of 5 or less are considered to be hypothyroid, then the data would be displayed as the following and the sensitivity is 0.56 and specificity is 0.99 in this case.&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
5 or less	18	1&lt;br /&gt;
More than 5	14	92&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
Now suppose, we decided to be less stringent on the disease and consider the patients with T4 values of 7 or less to be hypothyroid, then the data would be recorded as the following and the sensitivity in this case would be 0.78 and specificity 0.81:&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
7 or less	25	18&lt;br /&gt;
More than 7	7	75&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
If we move the cut-point for hypothyroidism a little bit higher, say 9, we would have the sensitivity of 0.91 and specificity 0.42:&lt;br /&gt;
&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
9 or less	29	54&lt;br /&gt;
More than 9	3	39&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
To sum up, we have the pairs of sensitivity an specificity with corresponding cut-points in the following table:&lt;br /&gt;
Cut points	Sensitivity	Specificity&lt;br /&gt;
5	0.56	0.99&lt;br /&gt;
7	0.78	0.81&lt;br /&gt;
9	0.91	0.42&lt;br /&gt;
&lt;br /&gt;
From the table above, we observe that the sensitivity improves with increasing cut-point T4 value while specificity increases with decreasing cut-point T4 value. That is a tradeoff between sensitivity and specificity. The table above can also be shown as TP and FP. &lt;br /&gt;
Cut points	True positives	False positives&lt;br /&gt;
5	0.56	0.01&lt;br /&gt;
7	0.78	0.19&lt;br /&gt;
9	0.91	0.58&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Plot sensitivity vs. specificity, we have the ROC curve:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
 &lt;br /&gt;
	Accuracy of a test is measured by the area under the ROC Curve and a rough guide for classifying the accuracy of a diagnostic test is traditional academic point system: 0.90-1:excellent;0.8-0.9: good (B);0.7-0.8:fair (C);0.6-0.7:poor (D);0.5-0.7:fail (F).&lt;br /&gt;
With our example above, the area under the T4 ROC curve is 0.86, which shows that the accuracy of the test is good in separating hypothyroid from euthyroid patients.&lt;br /&gt;
&lt;br /&gt;
	How to calculate the area under the curve? The area measures discrimination, which is the ability of the test to correctly classify those with and without the disease. The area under the curve is the percentage of randomly drawn pairs for which this is true. Two methods are commonly used to calculate the area of the scope: (1) non-parametric method based on constructing trapezoids under the curve as approximation of area; (2) a parametric method using a MLE to fit a smooth curve to data points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://pubs.rsna.org/doi/abs/10.1148/radiology.143.1.7063747) titled The Meaning And the Use Of The Area Under A Receiver Operating Characteristic (ROC) Curve presented a representation and interpretation of the area under a ROC curve obtained by the ‘rating’ method, or by mathematical predictions based on patient characteristics. It showed that that in such a setting the area represents the probability that a randomly chosen diseased subject is (correctly) rated or ranked with greater suspicion than a randomly chosen non-diseased subject. &lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.sciencedirect.com/science/article/pii/S0001299878800142) illustrated practical experimental techniques for measuring ROC curves and discussed about the issues of case selection and curve-fitting. It also talked about possible generalizations of conventional ROC analysis to account for decision performance in complex diagnostic tasks and showed ROC analysis related in direct and natural way to cost/benefit analysis of diagnostic decision making. This paper developed the concepts of ‘average diagnostic cost’ and ‘average net benefit’ to identify the optimal compromise among various kinds of diagnostic error and suggested ways in ROC analysis to optimize diagnostic strategies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
&lt;br /&gt;
# With the given example in R:&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose that a new study is conducted on lung cancer and the following data is collected in identify between two types of lung cancers (say type a and type b). Conduct the ROC curve for this example by varying the cut-points from 2 to 10 by increasing 2 units each time. Calculate the area under the curve and interpret on the accuracy of the test.&lt;br /&gt;
&lt;br /&gt;
measurements	&amp;lt;1	1-2	2-3	3-4	4-5	5-6	6-7	7-8	8-9	9-10	10-11	11-12	&amp;gt;12&lt;br /&gt;
Type a	2	1	4	2	8	7	4	3	0	0	1	2	2&lt;br /&gt;
Type b	1	3	0	2	2	5	10	23	18	20	15	8	2&lt;br /&gt;
&lt;br /&gt;
6.2) When a serious disease can be treated if it is caught early, it is more important to have a test with high specificity than high sensitivity.&lt;br /&gt;
a. True&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.3) The positive predictive value of a test is calculated by dividing the number of:&lt;br /&gt;
(a) True positives in the population&lt;br /&gt;
(b) True negatives in the population&lt;br /&gt;
(c) People who test positive&lt;br /&gt;
(d) People who test negative&lt;br /&gt;
&lt;br /&gt;
6.4) A new screening test has been developed for diabetes. The table below represents the results of the new test compared to the current gold standard. &lt;br /&gt;
&lt;br /&gt;
	Condition positive	Condition negative	Total&lt;br /&gt;
Test positive	80	70	150&lt;br /&gt;
Test negative	10	240	250&lt;br /&gt;
Total	90	310	400&lt;br /&gt;
&lt;br /&gt;
What is the sensitivity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.5) What is the specificity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
6.6) What is the positive predictive value of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
http://gim.unmc.edu/dxtests/roc1.htm &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Answers:  &lt;br /&gt;
2 – 6 : F, c, b, a, d&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13336</id>
		<title>SMHS ROC</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13336"/>
		<updated>2014-08-14T12:50:05Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /*  Scientific Methods for Health Sciences - Receiver Operating Characteristic (ROC) Curve */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Receiver Operating Characteristic (ROC) Curve ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Receiver operating characteristic (ROC curve) is a graphical plot, which illustrates the performance of a binary classifier system as its discrimination threshold varies. The ROC curve is created by plotting the fraction of true positive out of the total actual positives vs. the fraction of false positives out of the total actual negatives at various threshold settings. In this section, we are going to introduce the ROC curve and illustrate applications of this method with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have talked about the cases with a binary classification where the outcomes are either absent or present and the test results are positive or negative. We have also discussed about sensitivity and specificity of a test and are familiar with the concepts of true positive and true negatives. With ROC curve, we are looking to demonstrate the following aspects:&lt;br /&gt;
*To show the tradeoff between sensitivity and specificity;&lt;br /&gt;
*The closer the curve follows the left-hand border and top border of ROC space, the more accurate is the test;&lt;br /&gt;
*The closer the curve comes to the 45-degree diagonal, the less accurate is the test;&lt;br /&gt;
*The slope of the tangent line at a cut-point gives the likelihood ratio for the value of the test; &lt;br /&gt;
*The area under the curve is a measure of text accuracy.&lt;br /&gt;
&lt;br /&gt;
	Actual condition&lt;br /&gt;
	Absent (H_0 is true)	Present (H_1 is true)&lt;br /&gt;
Test&lt;br /&gt;
 Result 	 Negative&lt;br /&gt;
(fail to reject H_0) 	Condition absent + Negative result = True (accurate) Negative (TN, 0.98505)	Condition present + Negative result = False (invalid) Negative (FN, 0.00025)&lt;br /&gt;
Type II error (β)&lt;br /&gt;
	Positive&lt;br /&gt;
(reject H_0)	Condition absent + Positive result = False Positive (FP, 0.00995)&lt;br /&gt;
Type I error (α)	Condition Present + Positive result = True Positive (TP, 0.00475)&lt;br /&gt;
Test&lt;br /&gt;
Interpretation	Power = 1-FN=&lt;br /&gt;
1-0.00025 = 0.99975	Specificity: TN/(TN+FP) =&lt;br /&gt;
0.98505/(0.98505+ 0.00995) = 0.99	Sensitivity: TP/(TP+FN) =&lt;br /&gt;
0.00475/(0.00475+ 0.00025)= 0.95&lt;br /&gt;
&lt;br /&gt;
3) Theory&lt;br /&gt;
&lt;br /&gt;
3.1) Review of basic concepts in a binary classification:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		Disease Status	Metrics&lt;br /&gt;
		Disease	No Disease	Prevalence=(∑▒〖Condition positive〗)/(∑▒〖Total population〗)	&lt;br /&gt;
Screening Test	Positive	a (True positives)	b (False positives)	Positive predictive value (PPV)=(∑▒〖Ture positive〗)/(∑▒〖Test positives〗)	False discovery rate (FDR)==(∑▒〖False positive〗)/(∑▒〖Test positive〗)&lt;br /&gt;
	Negative	c (False negatives)	d (True negatives)	False omission rate (FOR)=(∑▒〖False negative〗)/(∑▒〖Test negative〗)	Negative predictive value (NPV)=(∑▒〖True negative〗)/(∑▒〖Test negative〗)&lt;br /&gt;
	Positive Likelihood Ratio=TPR/FBR	True positive rate (TPR)=(∑▒〖True positive〗)/(∑▒〖condition positive〗)	False positive rate (FPR)=(∑▒〖False positve〗)/(∑▒〖condition positive〗)	Accuracy(ACC)=(∑▒〖True positive〗+∑▒〖True negative〗)/(∑▒〖Total population 〗)	&lt;br /&gt;
	Negative Likelihood Ratio=FNR/TNR	False negative rate (FNR)=(∑▒〖False negative〗)/(∑▒〖condition negative〗)	True negative rate (TNR)=(∑▒〖True negative〗)/(∑▒〖condition negative〗)		&lt;br /&gt;
&lt;br /&gt;
3.2) Introduction of ROC Curve:&lt;br /&gt;
&lt;br /&gt;
Sensitivity and specificity are both characteristics of a test but they also depend on the definition of what constitutes an abnormal test. Consider a medical test on diagnostic tests where the cut-points would without doubt influence the test results. We can use the hypothyroidism data from the likelihood ratio to illustrate how these two characteristics change depending on the choice of T4 level that defines hypothyroidism. Recall the data where patients with suspected hypothyroidism are reported.&lt;br /&gt;
T4	&amp;lt;1	1-2	2-3	3-4	4-5	5-6	6-7	7-8	8-9	9-10	10-11	11-12	&amp;gt;12&lt;br /&gt;
Hypothyroid	2	3	1	8	4	4	3	3	1	0	2	1	0&lt;br /&gt;
Euthyroid	0	0	0	0	1	6	11	19	17	20	11	4	4&lt;br /&gt;
&lt;br /&gt;
With the following cut-points, we have the data listed:&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
5 or less	18	1&lt;br /&gt;
5.1 - 7	7	17&lt;br /&gt;
7.1 - 9	4	36&lt;br /&gt;
9 or more	3	39&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
Suppose that patients with T4 of 5 or less are considered to be hypothyroid, then the data would be displayed as the following and the sensitivity is 0.56 and specificity is 0.99 in this case.&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
5 or less	18	1&lt;br /&gt;
More than 5	14	92&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
Now suppose, we decided to be less stringent on the disease and consider the patients with T4 values of 7 or less to be hypothyroid, then the data would be recorded as the following and the sensitivity in this case would be 0.78 and specificity 0.81:&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
7 or less	25	18&lt;br /&gt;
More than 7	7	75&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
If we move the cut-point for hypothyroidism a little bit higher, say 9, we would have the sensitivity of 0.91 and specificity 0.42:&lt;br /&gt;
&lt;br /&gt;
T4 value	Hypothyroid	Euthyroid&lt;br /&gt;
9 or less	29	54&lt;br /&gt;
More than 9	3	39&lt;br /&gt;
Totals:	32	93&lt;br /&gt;
&lt;br /&gt;
To sum up, we have the pairs of sensitivity an specificity with corresponding cut-points in the following table:&lt;br /&gt;
Cut points	Sensitivity	Specificity&lt;br /&gt;
5	0.56	0.99&lt;br /&gt;
7	0.78	0.81&lt;br /&gt;
9	0.91	0.42&lt;br /&gt;
&lt;br /&gt;
From the table above, we observe that the sensitivity improves with increasing cut-point T4 value while specificity increases with decreasing cut-point T4 value. That is a tradeoff between sensitivity and specificity. The table above can also be shown as TP and FP. &lt;br /&gt;
Cut points	True positives	False positives&lt;br /&gt;
5	0.56	0.01&lt;br /&gt;
7	0.78	0.19&lt;br /&gt;
9	0.91	0.58&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Plot sensitivity vs. specificity, we have the ROC curve:&lt;br /&gt;
&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
 &lt;br /&gt;
	Accuracy of a test is measured by the area under the ROC Curve and a rough guide for classifying the accuracy of a diagnostic test is traditional academic point system: 0.90-1:excellent;0.8-0.9: good (B);0.7-0.8:fair (C);0.6-0.7:poor (D);0.5-0.7:fail (F).&lt;br /&gt;
With our example above, the area under the T4 ROC curve is 0.86, which shows that the accuracy of the test is good in separating hypothyroid from euthyroid patients.&lt;br /&gt;
&lt;br /&gt;
	How to calculate the area under the curve? The area measures discrimination, which is the ability of the test to correctly classify those with and without the disease. The area under the curve is the percentage of randomly drawn pairs for which this is true. Two methods are commonly used to calculate the area of the scope: (1) non-parametric method based on constructing trapezoids under the curve as approximation of area; (2) a parametric method using a MLE to fit a smooth curve to data points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) Applications&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://pubs.rsna.org/doi/abs/10.1148/radiology.143.1.7063747) titled The Meaning And the Use Of The Area Under A Receiver Operating Characteristic (ROC) Curve presented a representation and interpretation of the area under a ROC curve obtained by the ‘rating’ method, or by mathematical predictions based on patient characteristics. It showed that that in such a setting the area represents the probability that a randomly chosen diseased subject is (correctly) rated or ranked with greater suspicion than a randomly chosen non-diseased subject. &lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://www.sciencedirect.com/science/article/pii/S0001299878800142) illustrated practical experimental techniques for measuring ROC curves and discussed about the issues of case selection and curve-fitting. It also talked about possible generalizations of conventional ROC analysis to account for decision performance in complex diagnostic tasks and showed ROC analysis related in direct and natural way to cost/benefit analysis of diagnostic decision making. This paper developed the concepts of ‘average diagnostic cost’ and ‘average net benefit’ to identify the optimal compromise among various kinds of diagnostic error and suggested ways in ROC analysis to optimize diagnostic strategies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Software &lt;br /&gt;
&lt;br /&gt;
# With the given example in R:&lt;br /&gt;
x&amp;lt;-c(0,0.01,0.19,0.58,1)&lt;br /&gt;
y&amp;lt;-c(0,0.56,0.78,0.91,1)&lt;br /&gt;
plot(x,y,type='o',main='ROC curve for T4',xlab='False positive rate (specificity)',ylab='True positive rate (sensitivity)')&lt;br /&gt;
&lt;br /&gt;
6) Problems&lt;br /&gt;
&lt;br /&gt;
6.1) Suppose that a new study is conducted on lung cancer and the following data is collected in identify between two types of lung cancers (say type a and type b). Conduct the ROC curve for this example by varying the cut-points from 2 to 10 by increasing 2 units each time. Calculate the area under the curve and interpret on the accuracy of the test.&lt;br /&gt;
&lt;br /&gt;
measurements	&amp;lt;1	1-2	2-3	3-4	4-5	5-6	6-7	7-8	8-9	9-10	10-11	11-12	&amp;gt;12&lt;br /&gt;
Type a	2	1	4	2	8	7	4	3	0	0	1	2	2&lt;br /&gt;
Type b	1	3	0	2	2	5	10	23	18	20	15	8	2&lt;br /&gt;
&lt;br /&gt;
6.2) When a serious disease can be treated if it is caught early, it is more important to have a test with high specificity than high sensitivity.&lt;br /&gt;
a. True&lt;br /&gt;
b. False&lt;br /&gt;
&lt;br /&gt;
6.3) The positive predictive value of a test is calculated by dividing the number of:&lt;br /&gt;
(a) True positives in the population&lt;br /&gt;
(b) True negatives in the population&lt;br /&gt;
(c) People who test positive&lt;br /&gt;
(d) People who test negative&lt;br /&gt;
&lt;br /&gt;
6.4) A new screening test has been developed for diabetes. The table below represents the results of the new test compared to the current gold standard. &lt;br /&gt;
&lt;br /&gt;
	Condition positive	Condition negative	Total&lt;br /&gt;
Test positive	80	70	150&lt;br /&gt;
Test negative	10	240	250&lt;br /&gt;
Total	90	310	400&lt;br /&gt;
&lt;br /&gt;
What is the sensitivity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.5) What is the specificity of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
6.6) What is the positive predictive value of the test?&lt;br /&gt;
(a) 77%&lt;br /&gt;
(b) 89%&lt;br /&gt;
(c) 80%&lt;br /&gt;
(d) 53%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) References&lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004199238 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
http://gim.unmc.edu/dxtests/roc1.htm &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Answers:  &lt;br /&gt;
2 – 6 : F, c, b, a, d&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12996</id>
		<title>SMHS DataManagement</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12996"/>
		<updated>2014-07-31T20:37:05Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Data Management ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Data management comprised all the discipline related to managing data as a valuable resource and it is of significant importance in various fields. It is officially defined as the development and execution of architectures, policies, practices and procedures that properly manage the full data lifecycle needs of an enterprise. There are various ways to manage data. In this lecture, we are going to introduce the fundamental roles of data management in statistics and illustrate commonly used ways and steps in data managements through examples from different areas including tables, streams, cloud, warehouses, DBs, arrays, binary ASC II, handling and mechanics.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The next step after getting data would be to make proper management of the data in hand. Data management is of course a vital step in data analysis and is crucial to the success and reproducibility of a statistical analysis. So how would we do a good data management and what are the commonly used ways of data management? In order to further make good use of the data, we are going to learn more about the area of data management and various ways to implement it. Selection of appropriate tools and efficient use of these tools can save the researcher numerous hours, and allow other researchers to leverage the products of their work. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Tables: one of the most commonly used ways to manage data. It is a means of arranging data in rows and columns. It is of pervasive use throughout all research and data analysis. &lt;br /&gt;
There are two basic types of tables: &lt;br /&gt;
*Simple Table: consider the following example of a table summarizing the data from two groups. The table presents a general comparison of the two groups and shows us a clear picture of the measurements and the comparative characteristics between the two groups. What we learn from the table below: (1) these two groups with the same sample size have the same mean; (2) group 1 has a bigger range of the data values; (3) group 2 has a smaller standard deviation indicating a less variant dataset compared to group 1.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;center&amp;gt; 	&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
| ||Minimum||Maximum||Mean||Standard Deviation||Size &lt;br /&gt;
|-&lt;br /&gt;
|Group 1||12||45||22||2.6||40&lt;br /&gt;
|-&lt;br /&gt;
|Group 2||15||30||22||1.5||40&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Multi-dimensional table: consider the F distribution (http://socr.umich.edu/Applets/F_Table.html) where the first row and the column is the degree of freedoms and the data in the middle is the 99% quantiles of F(k,l). This is a two dimensional example and the coordinates or combinations of the basic headers give a unique value attached.&lt;br /&gt;
&amp;lt;center&amp;gt; 	&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|l \ k||1||2||3||4||5&lt;br /&gt;
|-&lt;br /&gt;
|1||4052.||4999.5||5403.||5625.||5764.&lt;br /&gt;
|-&lt;br /&gt;
|2||98.50||99.00||99.17||99.25||99.30&lt;br /&gt;
|-&lt;br /&gt;
|3||34.12||30.82||29.46||28.71||28.24&lt;br /&gt;
|-&lt;br /&gt;
|4||21.20||18.00||16.69||15.98||15.52&lt;br /&gt;
|-&lt;br /&gt;
|5||13.27||12.06||11.39||10.97||10.67&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.2) Streams: is also an easy way of data management and it is more visualized with pictures. It is a sequence of data elements made available over time and can be thought as a conveyor belt that allows items to be processed one at a time rather than in large batches. It is a sequence of digitally encoded coherent signals used to transmit or receive information that is in the process of being transmitted. In electronics and computer architecture, it determines for which time which data item is scheduled to enter or leave which port. &lt;br /&gt;
&lt;br /&gt;
From the chart below, we have three apparent observations: (1) pre-dialysis kidney function is associated with patient survival; (2) pre-dialysis kidney function differs by type of dialysis treatment (it is associated with type of dialysis); (3) pre-dialysis kidney function is not in the causal pathway of type of dialysis and survival. And from these three conditions, we can conclude that pre-dialysis kidney function is a potential confounder.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementChart1.png]]&lt;br /&gt;
&lt;br /&gt;
An illustrative example of streaming is wind map (http://hint.fm/wind/), which generates a vivid demonstration of the wind speed over the USA with data streamed live from different resources. We can have a clear picture of the wind range countrywide with streaming.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementFig1.png]]&lt;br /&gt;
&lt;br /&gt;
3.3) Cloud Data Storage: Data cloud storage demands high availability, durability, and scalability from a few bytes to petabytes. Examples of data cloud storage services include Amazon’s S3, which promises a 99.9% monthly availability and 99.999999999% durability per year. This translates into less than an hour outage per month. For an example of durability, assume that a user stores 10,000 objects in a cloud storage, then, on average, the user would expect to lose one object every 10,000,000 years. S3, and other cloud service providers, achieve this reliability by storing data in multiple facilities with error checking and self-healing processes to detect and repair errors and device failures. This process is completely transparent to the user and requires no actions or knowledge of the underlying complexities. Global data-intense service providers like Google and Facebook have the expertise and scale to provide enormous storage and significant reliability and uptime in an efficient/economical way. Many Big Data research projects benefit from using cloud storage services (e.g., umich email, file-sharing, computational services etc.)&lt;br /&gt;
&lt;br /&gt;
3.4) Warehouse: a system used for reporting and data analysis. Integrating data from one or more disparate sources creates a central repository of data, a data warehouse (DW). DW stores current and historical data and are used for creating trending reports for senior management reporting such as annual comparison.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig2.jpg]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.5) DBs: database is an organized collection of data where data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
A well-known example would be the pipeline, which utilizes data from the LONI Image Data Archive (IDA). The pipeline takes advantage of the cluster nodes to download files in parallel from the IDA database. (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#IDA)&lt;br /&gt;
This article (https://ida.loni.usc.edu/login.jsp) provides a specific introduction to The LONI Image Data Archive (IDA), which offers an integrated environment for safely archiving, querying, visualizing and sharing neuroimaging data. It facilitates the de-identification and pooling of data from multiple institutions, protecting data from unauthorized access while providing the ability to share data among collaborative investigators. The archive provides flexibility in establishing project metadata, accommodating one or more research groups, sits and others. It’s simple, secure and requires nothing more than a computer with Internet connection and a web browser.&lt;br /&gt;
&lt;br /&gt;
3.6) Arrays: a data structure consisting of a collection of elements, each identified by at least one array index or key. &lt;br /&gt;
Types of arrays:&lt;br /&gt;
*One-dimensional array: a simple example: an array of 8 integer variables with indices 0 through 7 may be sored as 8 words at memory address: {200, 202, 204, 206, 208, 210, 212, 214} which can be memorized as 200+2i.&lt;br /&gt;
*Multidimensional arrays: Data=[■(2&amp;amp;3&amp;amp;0@6&amp;amp;4&amp;amp;5@5&amp;amp;3&amp;amp;1)].&lt;br /&gt;
&lt;br /&gt;
Example: R arrays and data-frames&lt;br /&gt;
&lt;br /&gt;
DF &amp;lt;- data.frame(a = 1:3, b = letters[10:12],&lt;br /&gt;
                 c = seq(as.Date(&amp;quot;2004-01-01&amp;quot;), by = &amp;quot;week&amp;quot;, len = 3),&lt;br /&gt;
                 stringsAsFactors = TRUE)&lt;br /&gt;
	&amp;gt; DF&lt;br /&gt;
  a b          c&lt;br /&gt;
1 1 j 2004-01-01&lt;br /&gt;
2 2 k 2004-01-08&lt;br /&gt;
3 3 l 2004-01-15&lt;br /&gt;
&lt;br /&gt;
data.matrix(DF[1:2])&lt;br /&gt;
data.matrix(DF)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; data.matrix(DF)&lt;br /&gt;
     a b     c&lt;br /&gt;
[1,] 1 1 12418&lt;br /&gt;
[2,] 2 2 12425&lt;br /&gt;
[3,] 3 3 12432&lt;br /&gt;
&lt;br /&gt;
	&amp;gt; sleep 		# sleep dataset&lt;br /&gt;
     extra group ID&lt;br /&gt;
1    0.7     1  1&lt;br /&gt;
2   -1.6     1  2&lt;br /&gt;
3   -0.2     1  3&lt;br /&gt;
4   -1.2     1  4&lt;br /&gt;
5   -0.1     1  5&lt;br /&gt;
6    3.4     1  6&lt;br /&gt;
7    3.7     1  7&lt;br /&gt;
8    0.8     1  8&lt;br /&gt;
9    0.0     1  9&lt;br /&gt;
10   2.0     1 10&lt;br /&gt;
11   1.9     2  1&lt;br /&gt;
12   0.8     2  2&lt;br /&gt;
13   1.1     2  3&lt;br /&gt;
14   0.1     2  4&lt;br /&gt;
15  -0.1     2  5&lt;br /&gt;
16   4.4     2  6&lt;br /&gt;
17   5.5     2  7&lt;br /&gt;
18   1.6     2  8&lt;br /&gt;
19   4.6     2  9&lt;br /&gt;
20   3.4     2 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.7) Binary ASCII:  ASCII, which is short for American Standard Code for Information Interchange is a character-encoding scheme originally based on English alphabet that encodes 128 specified characters – the numbers 0 – 9, the letters a – z and A – Z, some basic punctuation symbols, some control codes that originated with teletype machines and a bland space – into the 7-bit binary integers. It represents text in computers, communications equipment, and other devices that use text. To convert the ASCII code to binary character (part):&lt;br /&gt;
&amp;lt;center&amp;gt; 	&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Letter||ASCII Code||Binary||Letter||ASC II Code||Binary&lt;br /&gt;
|-&lt;br /&gt;
|a||097||01100001||A||065||01000001&lt;br /&gt;
|-&lt;br /&gt;
|b||098||01100010||B||066||01000010&lt;br /&gt;
|-&lt;br /&gt;
|c||099||01100011||C||067||01000011&lt;br /&gt;
|-&lt;br /&gt;
|d||100||01100100||D||068||01000100&lt;br /&gt;
|-&lt;br /&gt;
|e||101||01100101||E||069||01000101&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt; 	&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:33%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Dec||Hex||Binary&lt;br /&gt;
|-&lt;br /&gt;
|0||00||00000000&lt;br /&gt;
|-&lt;br /&gt;
|1||01||00000001&lt;br /&gt;
|-&lt;br /&gt;
|2||02||00000010&lt;br /&gt;
|-&lt;br /&gt;
|3||03||00000011&lt;br /&gt;
|-&lt;br /&gt;
|4||04||00000100&lt;br /&gt;
|-&lt;br /&gt;
|5||05||00000101&lt;br /&gt;
|-&lt;br /&gt;
|6||06||00000110&lt;br /&gt;
|-&lt;br /&gt;
|7||07||00000111&lt;br /&gt;
|-&lt;br /&gt;
|8||08||00001000&lt;br /&gt;
|-&lt;br /&gt;
|9||09||00001001&lt;br /&gt;
|-&lt;br /&gt;
|10||0A||00001010&lt;br /&gt;
|-&lt;br /&gt;
|11||0B||00001011&lt;br /&gt;
|-&lt;br /&gt;
|12||0C||00001100&lt;br /&gt;
|-&lt;br /&gt;
|13||0D||00001101&lt;br /&gt;
|-&lt;br /&gt;
|14||0E||00001110&lt;br /&gt;
|-&lt;br /&gt;
|15||0F||00001111&lt;br /&gt;
|-&lt;br /&gt;
|16||10||00010000&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.8) Handling: the process of ensuring that the research data is stored, archived or disposed off in a safe and secure manner during and after the conclusion of a research project. This includes the development of policies and procedures to manage data handled electronically as well as through non-electronic means. &lt;br /&gt;
&lt;br /&gt;
*Data handling is important in ensuring the integrity of research data since it addresses concerns related to confidentially, security, and preservation/retention of research data. Proper planning for data handling can also result in efficient and economical storage, retrieval, and disposal of data. In the case of data handled electronically, data integrity is a primary concern to ensure that recorded data is not altered, erased, lost or accessed by unauthorized users.&lt;br /&gt;
&lt;br /&gt;
*Data handling issues encompass both electronic as well as non-electronic systems, such as paper files, journals, and laboratory notebooks. Electronic systems include computer workstations and laptops, personal digital assistants (PDA), storage media such as videotape, diskette, CD, DVD, memory cards, and other electronic instrumentation. These systems may be used for storage, archival, sharing, and disposing off data, and therefore, require adequate planning at the start of a research project so that issues related to data integrity can be analyzed and addressed early on.&lt;br /&gt;
&lt;br /&gt;
Issues needed to be considered in ensuring integrity of data handled:&lt;br /&gt;
*Type of data handled and its impact on the environment (especially if it is on a toxic media);&lt;br /&gt;
*Type of media containing data and its storage capacity, handling and storage requirements, reliability, longevity (in the case of degradable medium), retrieval effectiveness, and ease of upgrade to newer media;&lt;br /&gt;
*Data handling responsibilities/privileges, that is, who can handle which portion of data, at what point during the project, for what purpose, etc;&lt;br /&gt;
*Data handling procedures that describe how long the data should be kept, and when, how, and who should handle data for storage, sharing, archival, retrieval and disposal purposes.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://en.wikibooks.org/wiki/OpenClinica_User_Manual) presents a comprehensive introduction to EDC (electronic data capture) in clinical research. It contains a series of guides to help users learn how to use OpenClinica for clinical data management. This user manual serves a perfect introduction to OpenClinica and equips researches with background information, specific data management procedures, study construction and system maintenance for data management in clinical studies.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#XNAT)  talked about issues regarding building the workflow with LONI Pipeline. It introduced dragging and connecting in the modules and how data is managed with pipeline. It also illustrates usage of pipeline with IDA, NDAR, XNAT and the cloud storage it supported. &lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://onlinepubs.trb.org/onlinepubs/nchrp/cd-22/manual/v2chapter2.pdf) presents a general introduction to data management, analysis tools and analysis mechanics. It illustrated the purpose, steps, considerations and useful tools in data management and introduced the specific steps in data handling. It go through the major steps with examples and illustrated the database handling with consideration of the dataset size. This article offers a comprehensive analysis of data management and would be a good start to implement data management.&lt;br /&gt;
&lt;br /&gt;
4.4) This article (http://www.sciencedirect.com/science/article/pii/S0167819102000947) presents two services that they believe are fundamental to any data grid: reliable, high-speed transport and replica management. Their high-speed transport service, GridFTP, extends the popular FTP protocol with new features required for Data Grid applications, such as striping and partial file access and their replica management service integrates a replica catalog with GridFTP transfers to provide for the creation, registration, location, and management of dataset replicas. The article also presents the design of both services and also preliminary performance results and implementations exploit security and other services provided by the Globus Toolkit.&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
Data Import/Export in R: http://cran.r-project.org/doc/manuals/r-devel/R-data.html&lt;br /&gt;
Package ‘rmongodb’ in R (provides an interface to the NoSQL MongoDB database): http://cran.r-project.org/web/packages/rmongodb/ .&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
Example 1: Data Streaming: &lt;br /&gt;
&lt;br /&gt;
&amp;gt; library(&amp;quot;stream&amp;quot;)&lt;br /&gt;
&amp;gt; dsd &amp;lt;- DSD_Gaussians(k=3, d=3, noise=0.05)&lt;br /&gt;
&amp;gt; dsd&lt;br /&gt;
Static Mixture of Gaussians Data Stream&lt;br /&gt;
With 3 clusters in 3 dimensions &lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=5)&lt;br /&gt;
&amp;gt; p&lt;br /&gt;
         V1        V2        V3&lt;br /&gt;
1 0.6930698 0.4082633 0.3857444&lt;br /&gt;
2 0.9086645 0.5545718 0.6942871&lt;br /&gt;
3 0.6031121 0.5288573 0.5795389&lt;br /&gt;
4 0.7590460 0.5485160 0.6484480&lt;br /&gt;
5 0.7249682 0.7327056 0.4891291&lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=100, assignment=TRUE)&lt;br /&gt;
&amp;gt; attr(p, &amp;quot;assignment&amp;quot;)&lt;br /&gt;
  [1]  3  3  3 NA  2  2  2  3  1  2  1  2  2  3  1  1  1  3  3  2  3  1  1  2&lt;br /&gt;
 [25]  3  1  3  3  1  1  3  2  3  3  2 NA  1  1  1  1  1  3  2  2  2  3  1  2&lt;br /&gt;
 [49]  2  2  2  3  1 NA  1  3  2  2  3  3  3  2  1  2  2  2  1  3  1  1  1  2&lt;br /&gt;
 [73]  1  3  2  2  3  1 NA  1  2  1  1  3  3  1  1  2  1  3  3  3  2  3  3  2&lt;br /&gt;
 [97] NA  1  2  1&lt;br /&gt;
&amp;gt; plot(dsd, n=500)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig4.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Example 2: Import of big data: zips (the data would be available at http://media.mongodb.org/zips.json)  import using R/MongoDB:&lt;br /&gt;
Steps. Install the package of ‘rmongodb’ and import data zips, this data is included in the rmongodb package and can be loaded using the command data(zips):&lt;br /&gt;
&lt;br /&gt;
install.package('rmonogodb')&lt;br /&gt;
library(rmongodb)&lt;br /&gt;
data(zips)&lt;br /&gt;
head(zips)&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; install.packages('rmongodb')&lt;br /&gt;
trying URL 'http://cran.mtu.edu/bin/macosx/leopard/contrib/2.15/rmongodb_1.6.5.tgz'&lt;br /&gt;
Content type 'application/x-gzip' length 1291831 bytes (1.2 Mb)&lt;br /&gt;
opened URL&lt;br /&gt;
==================================================&lt;br /&gt;
downloaded 1.2 Mb&lt;br /&gt;
&lt;br /&gt;
The downloaded binary packages are in&lt;br /&gt;
	/var/folders/k6/3r5dstw5385_b4fzt679pmsr0000gn/T//RtmpWD2wiV/downloaded_packages&lt;br /&gt;
&lt;br /&gt;
&amp;gt; head(zips)&lt;br /&gt;
     city         loc       pop   state _id    &lt;br /&gt;
[1,] &amp;quot;ACMAR&amp;quot;      Numeric,2 6055  &amp;quot;AL&amp;quot;  &amp;quot;35004&amp;quot;&lt;br /&gt;
[2,] &amp;quot;ADAMSVILLE&amp;quot; Numeric,2 10616 &amp;quot;AL&amp;quot;  &amp;quot;35005&amp;quot;&lt;br /&gt;
[3,] &amp;quot;ADGER&amp;quot;      Numeric,2 3205  &amp;quot;AL&amp;quot;  &amp;quot;35006&amp;quot;&lt;br /&gt;
[4,] &amp;quot;KEYSTONE&amp;quot;   Numeric,2 14218 &amp;quot;AL&amp;quot;  &amp;quot;35007&amp;quot;&lt;br /&gt;
[5,] &amp;quot;NEW SITE&amp;quot;   Numeric,2 19942 &amp;quot;AL&amp;quot;  &amp;quot;35010&amp;quot;&lt;br /&gt;
[6,] &amp;quot;ALPINE&amp;quot;     Numeric,2 3062  &amp;quot;AL&amp;quot;  &amp;quot;35014&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger http://mirlyn.lib.umich.edu/Record/004199238&lt;br /&gt;
 &lt;br /&gt;
Sampling / Steven K. Thompson. http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
&lt;br /&gt;
Data Handling http://ori.hhs.gov/education/products/n_illinois_u/datamanagement/dhtopic.html&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12995</id>
		<title>SMHS DataManagement</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12995"/>
		<updated>2014-07-31T20:25:54Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Data Management ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Data management comprised all the discipline related to managing data as a valuable resource and it is of significant importance in various fields. It is officially defined as the development and execution of architectures, policies, practices and procedures that properly manage the full data lifecycle needs of an enterprise. There are various ways to manage data. In this lecture, we are going to introduce the fundamental roles of data management in statistics and illustrate commonly used ways and steps in data managements through examples from different areas including tables, streams, cloud, warehouses, DBs, arrays, binary ASC II, handling and mechanics.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The next step after getting data would be to make proper management of the data in hand. Data management is of course a vital step in data analysis and is crucial to the success and reproducibility of a statistical analysis. So how would we do a good data management and what are the commonly used ways of data management? In order to further make good use of the data, we are going to learn more about the area of data management and various ways to implement it. Selection of appropriate tools and efficient use of these tools can save the researcher numerous hours, and allow other researchers to leverage the products of their work. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Tables: one of the most commonly used ways to manage data. It is a means of arranging data in rows and columns. It is of pervasive use throughout all research and data analysis. &lt;br /&gt;
There are two basic types of tables: &lt;br /&gt;
*Simple Table: consider the following example of a table summarizing the data from two groups. The table presents a general comparison of the two groups and shows us a clear picture of the measurements and the comparative characteristics between the two groups. What we learn from the table below: (1) these two groups with the same sample size have the same mean; (2) group 1 has a bigger range of the data values; (3) group 2 has a smaller standard deviation indicating a less variant dataset compared to group 1.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;center&amp;gt; 	&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
| ||Minimum||Maximum||Mean||Standard Deviation||Size &lt;br /&gt;
|-&lt;br /&gt;
|Group 1||12||45||22||2.6||40&lt;br /&gt;
|-&lt;br /&gt;
|Group 2||15||30||22||1.5||40&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Multi-dimensional table: consider the F distribution (http://socr.umich.edu/Applets/F_Table.html) where the first row and the column is the degree of freedoms and the data in the middle is the 99% quantiles of F(k,l). This is a two dimensional example and the coordinates or combinations of the basic headers give a unique value attached.&lt;br /&gt;
&amp;lt;center&amp;gt; 	&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|l \ k||1||2||3||4||5&lt;br /&gt;
|-&lt;br /&gt;
|1||4052.||4999.5||5403.||5625.||5764.&lt;br /&gt;
|-&lt;br /&gt;
|2||98.50||99.00||99.17||99.25||99.30&lt;br /&gt;
|-&lt;br /&gt;
|3||34.12||30.82||29.46||28.71||28.24&lt;br /&gt;
|-&lt;br /&gt;
|4||21.20||18.00||16.69||15.98||15.52&lt;br /&gt;
|-&lt;br /&gt;
|5||13.27||12.06||11.39||10.97||10.67&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.2) Streams: is also an easy way of data management and it is more visualized with pictures. It is a sequence of data elements made available over time and can be thought as a conveyor belt that allows items to be processed one at a time rather than in large batches. It is a sequence of digitally encoded coherent signals used to transmit or receive information that is in the process of being transmitted. In electronics and computer architecture, it determines for which time which data item is scheduled to enter or leave which port. &lt;br /&gt;
&lt;br /&gt;
From the chart below, we have three apparent observations: (1) pre-dialysis kidney function is associated with patient survival; (2) pre-dialysis kidney function differs by type of dialysis treatment (it is associated with type of dialysis); (3) pre-dialysis kidney function is not in the causal pathway of type of dialysis and survival. And from these three conditions, we can conclude that pre-dialysis kidney function is a potential confounder.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementChart1.png]]&lt;br /&gt;
&lt;br /&gt;
An illustrative example of streaming is wind map (http://hint.fm/wind/), which generates a vivid demonstration of the wind speed over the USA with data streamed live from different resources. We can have a clear picture of the wind range countrywide with streaming.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementFig1.png]]&lt;br /&gt;
&lt;br /&gt;
3.3) Cloud Data Storage: Data cloud storage demands high availability, durability, and scalability from a few bytes to petabytes. Examples of data cloud storage services include Amazon’s S3, which promises a 99.9% monthly availability and 99.999999999% durability per year. This translates into less than an hour outage per month. For an example of durability, assume that a user stores 10,000 objects in a cloud storage, then, on average, the user would expect to lose one object every 10,000,000 years. S3, and other cloud service providers, achieve this reliability by storing data in multiple facilities with error checking and self-healing processes to detect and repair errors and device failures. This process is completely transparent to the user and requires no actions or knowledge of the underlying complexities. Global data-intense service providers like Google and Facebook have the expertise and scale to provide enormous storage and significant reliability and uptime in an efficient/economical way. Many Big Data research projects benefit from using cloud storage services (e.g., umich email, file-sharing, computational services etc.)&lt;br /&gt;
&lt;br /&gt;
3.4) Warehouse: a system used for reporting and data analysis. Integrating data from one or more disparate sources creates a central repository of data, a data warehouse (DW). DW stores current and historical data and are used for creating trending reports for senior management reporting such as annual comparison.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig2.jpg]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.5) DBs: database is an organized collection of data where data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
A well-known example would be the pipeline, which utilizes data from the LONI Image Data Archive (IDA). The pipeline takes advantage of the cluster nodes to download files in parallel from the IDA database. (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#IDA)&lt;br /&gt;
This article (https://ida.loni.usc.edu/login.jsp) provides a specific introduction to The LONI Image Data Archive (IDA), which offers an integrated environment for safely archiving, querying, visualizing and sharing neuroimaging data. It facilitates the de-identification and pooling of data from multiple institutions, protecting data from unauthorized access while providing the ability to share data among collaborative investigators. The archive provides flexibility in establishing project metadata, accommodating one or more research groups, sits and others. It’s simple, secure and requires nothing more than a computer with Internet connection and a web browser.&lt;br /&gt;
&lt;br /&gt;
3.6) Arrays: a data structure consisting of a collection of elements, each identified by at least one array index or key. &lt;br /&gt;
Types of arrays:&lt;br /&gt;
*One-dimensional array: a simple example: an array of 8 integer variables with indices 0 through 7 may be sored as 8 words at memory address: {200, 202, 204, 206, 208, 210, 212, 214} which can be memorized as 200+2i.&lt;br /&gt;
*Multidimensional arrays: Data=[■(2&amp;amp;3&amp;amp;0@6&amp;amp;4&amp;amp;5@5&amp;amp;3&amp;amp;1)].&lt;br /&gt;
&lt;br /&gt;
Example: R arrays and data-frames&lt;br /&gt;
&lt;br /&gt;
DF &amp;lt;- data.frame(a = 1:3, b = letters[10:12],&lt;br /&gt;
                 c = seq(as.Date(&amp;quot;2004-01-01&amp;quot;), by = &amp;quot;week&amp;quot;, len = 3),&lt;br /&gt;
                 stringsAsFactors = TRUE)&lt;br /&gt;
	&amp;gt; DF&lt;br /&gt;
  a b          c&lt;br /&gt;
1 1 j 2004-01-01&lt;br /&gt;
2 2 k 2004-01-08&lt;br /&gt;
3 3 l 2004-01-15&lt;br /&gt;
&lt;br /&gt;
data.matrix(DF[1:2])&lt;br /&gt;
data.matrix(DF)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; data.matrix(DF)&lt;br /&gt;
     a b     c&lt;br /&gt;
[1,] 1 1 12418&lt;br /&gt;
[2,] 2 2 12425&lt;br /&gt;
[3,] 3 3 12432&lt;br /&gt;
&lt;br /&gt;
	&amp;gt; sleep 		# sleep dataset&lt;br /&gt;
     extra group ID&lt;br /&gt;
1    0.7     1  1&lt;br /&gt;
2   -1.6     1  2&lt;br /&gt;
3   -0.2     1  3&lt;br /&gt;
4   -1.2     1  4&lt;br /&gt;
5   -0.1     1  5&lt;br /&gt;
6    3.4     1  6&lt;br /&gt;
7    3.7     1  7&lt;br /&gt;
8    0.8     1  8&lt;br /&gt;
9    0.0     1  9&lt;br /&gt;
10   2.0     1 10&lt;br /&gt;
11   1.9     2  1&lt;br /&gt;
12   0.8     2  2&lt;br /&gt;
13   1.1     2  3&lt;br /&gt;
14   0.1     2  4&lt;br /&gt;
15  -0.1     2  5&lt;br /&gt;
16   4.4     2  6&lt;br /&gt;
17   5.5     2  7&lt;br /&gt;
18   1.6     2  8&lt;br /&gt;
19   4.6     2  9&lt;br /&gt;
20   3.4     2 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.7) Binary ASCII:  ASCII, which is short for American Standard Code for Information Interchange is a character-encoding scheme originally based on English alphabet that encodes 128 specified characters – the numbers 0 – 9, the letters a – z and A – Z, some basic punctuation symbols, some control codes that originated with teletype machines and a bland space – into the 7-bit binary integers. It represents text in computers, communications equipment, and other devices that use text. To convert the ASCII code to binary character (part):&lt;br /&gt;
&amp;lt;center&amp;gt; 	&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Letter||ASCII Code||Binary||Letter||ASC II Code||Binary&lt;br /&gt;
|-&lt;br /&gt;
|a||097||01100001||A||065||01000001&lt;br /&gt;
|-&lt;br /&gt;
|b||098||01100010||B||066||01000010&lt;br /&gt;
|-&lt;br /&gt;
|c||099||01100011||C||067||01000011&lt;br /&gt;
|-&lt;br /&gt;
|d||100||01100100||D||068||01000100&lt;br /&gt;
|-&lt;br /&gt;
|e||101||01100101||E||069||01000101&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dec	Hex	Binary&lt;br /&gt;
    0	00	00000000&lt;br /&gt;
    1	01	00000001&lt;br /&gt;
    2	02	00000010&lt;br /&gt;
    3	03	00000011&lt;br /&gt;
    4	04	00000100&lt;br /&gt;
    5	05	00000101&lt;br /&gt;
    6	06	00000110&lt;br /&gt;
    7	07	00000111&lt;br /&gt;
    8	08	00001000&lt;br /&gt;
    9	09	00001001&lt;br /&gt;
  10	0A	00001010&lt;br /&gt;
  11	0B	00001011&lt;br /&gt;
  12	0C	00001100&lt;br /&gt;
  13	0D	00001101&lt;br /&gt;
  14	0E	00001110&lt;br /&gt;
  15	0F	00001111&lt;br /&gt;
  16	10	00010000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.8) Handling: the process of ensuring that the research data is stored, archived or disposed off in a safe and secure manner during and after the conclusion of a research project. This includes the development of policies and procedures to manage data handled electronically as well as through non-electronic means. &lt;br /&gt;
&lt;br /&gt;
*Data handling is important in ensuring the integrity of research data since it addresses concerns related to confidentially, security, and preservation/retention of research data. Proper planning for data handling can also result in efficient and economical storage, retrieval, and disposal of data. In the case of data handled electronically, data integrity is a primary concern to ensure that recorded data is not altered, erased, lost or accessed by unauthorized users.&lt;br /&gt;
&lt;br /&gt;
*Data handling issues encompass both electronic as well as non-electronic systems, such as paper files, journals, and laboratory notebooks. Electronic systems include computer workstations and laptops, personal digital assistants (PDA), storage media such as videotape, diskette, CD, DVD, memory cards, and other electronic instrumentation. These systems may be used for storage, archival, sharing, and disposing off data, and therefore, require adequate planning at the start of a research project so that issues related to data integrity can be analyzed and addressed early on.&lt;br /&gt;
&lt;br /&gt;
Issues needed to be considered in ensuring integrity of data handled:&lt;br /&gt;
*Type of data handled and its impact on the environment (especially if it is on a toxic media);&lt;br /&gt;
*Type of media containing data and its storage capacity, handling and storage requirements, reliability, longevity (in the case of degradable medium), retrieval effectiveness, and ease of upgrade to newer media;&lt;br /&gt;
*Data handling responsibilities/privileges, that is, who can handle which portion of data, at what point during the project, for what purpose, etc;&lt;br /&gt;
*Data handling procedures that describe how long the data should be kept, and when, how, and who should handle data for storage, sharing, archival, retrieval and disposal purposes.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://en.wikibooks.org/wiki/OpenClinica_User_Manual) presents a comprehensive introduction to EDC (electronic data capture) in clinical research. It contains a series of guides to help users learn how to use OpenClinica for clinical data management. This user manual serves a perfect introduction to OpenClinica and equips researches with background information, specific data management procedures, study construction and system maintenance for data management in clinical studies.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#XNAT)  talked about issues regarding building the workflow with LONI Pipeline. It introduced dragging and connecting in the modules and how data is managed with pipeline. It also illustrates usage of pipeline with IDA, NDAR, XNAT and the cloud storage it supported. &lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://onlinepubs.trb.org/onlinepubs/nchrp/cd-22/manual/v2chapter2.pdf) presents a general introduction to data management, analysis tools and analysis mechanics. It illustrated the purpose, steps, considerations and useful tools in data management and introduced the specific steps in data handling. It go through the major steps with examples and illustrated the database handling with consideration of the dataset size. This article offers a comprehensive analysis of data management and would be a good start to implement data management.&lt;br /&gt;
&lt;br /&gt;
4.4) This article (http://www.sciencedirect.com/science/article/pii/S0167819102000947) presents two services that they believe are fundamental to any data grid: reliable, high-speed transport and replica management. Their high-speed transport service, GridFTP, extends the popular FTP protocol with new features required for Data Grid applications, such as striping and partial file access and their replica management service integrates a replica catalog with GridFTP transfers to provide for the creation, registration, location, and management of dataset replicas. The article also presents the design of both services and also preliminary performance results and implementations exploit security and other services provided by the Globus Toolkit.&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
Data Import/Export in R: http://cran.r-project.org/doc/manuals/r-devel/R-data.html&lt;br /&gt;
Package ‘rmongodb’ in R (provides an interface to the NoSQL MongoDB database): http://cran.r-project.org/web/packages/rmongodb/ .&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
Example 1: Data Streaming: &lt;br /&gt;
&lt;br /&gt;
&amp;gt; library(&amp;quot;stream&amp;quot;)&lt;br /&gt;
&amp;gt; dsd &amp;lt;- DSD_Gaussians(k=3, d=3, noise=0.05)&lt;br /&gt;
&amp;gt; dsd&lt;br /&gt;
Static Mixture of Gaussians Data Stream&lt;br /&gt;
With 3 clusters in 3 dimensions &lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=5)&lt;br /&gt;
&amp;gt; p&lt;br /&gt;
         V1        V2        V3&lt;br /&gt;
1 0.6930698 0.4082633 0.3857444&lt;br /&gt;
2 0.9086645 0.5545718 0.6942871&lt;br /&gt;
3 0.6031121 0.5288573 0.5795389&lt;br /&gt;
4 0.7590460 0.5485160 0.6484480&lt;br /&gt;
5 0.7249682 0.7327056 0.4891291&lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=100, assignment=TRUE)&lt;br /&gt;
&amp;gt; attr(p, &amp;quot;assignment&amp;quot;)&lt;br /&gt;
  [1]  3  3  3 NA  2  2  2  3  1  2  1  2  2  3  1  1  1  3  3  2  3  1  1  2&lt;br /&gt;
 [25]  3  1  3  3  1  1  3  2  3  3  2 NA  1  1  1  1  1  3  2  2  2  3  1  2&lt;br /&gt;
 [49]  2  2  2  3  1 NA  1  3  2  2  3  3  3  2  1  2  2  2  1  3  1  1  1  2&lt;br /&gt;
 [73]  1  3  2  2  3  1 NA  1  2  1  1  3  3  1  1  2  1  3  3  3  2  3  3  2&lt;br /&gt;
 [97] NA  1  2  1&lt;br /&gt;
&amp;gt; plot(dsd, n=500)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig4.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Example 2: Import of big data: zips (the data would be available at http://media.mongodb.org/zips.json)  import using R/MongoDB:&lt;br /&gt;
Steps. Install the package of ‘rmongodb’ and import data zips, this data is included in the rmongodb package and can be loaded using the command data(zips):&lt;br /&gt;
&lt;br /&gt;
install.package('rmonogodb')&lt;br /&gt;
library(rmongodb)&lt;br /&gt;
data(zips)&lt;br /&gt;
head(zips)&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; install.packages('rmongodb')&lt;br /&gt;
trying URL 'http://cran.mtu.edu/bin/macosx/leopard/contrib/2.15/rmongodb_1.6.5.tgz'&lt;br /&gt;
Content type 'application/x-gzip' length 1291831 bytes (1.2 Mb)&lt;br /&gt;
opened URL&lt;br /&gt;
==================================================&lt;br /&gt;
downloaded 1.2 Mb&lt;br /&gt;
&lt;br /&gt;
The downloaded binary packages are in&lt;br /&gt;
	/var/folders/k6/3r5dstw5385_b4fzt679pmsr0000gn/T//RtmpWD2wiV/downloaded_packages&lt;br /&gt;
&lt;br /&gt;
&amp;gt; head(zips)&lt;br /&gt;
     city         loc       pop   state _id    &lt;br /&gt;
[1,] &amp;quot;ACMAR&amp;quot;      Numeric,2 6055  &amp;quot;AL&amp;quot;  &amp;quot;35004&amp;quot;&lt;br /&gt;
[2,] &amp;quot;ADAMSVILLE&amp;quot; Numeric,2 10616 &amp;quot;AL&amp;quot;  &amp;quot;35005&amp;quot;&lt;br /&gt;
[3,] &amp;quot;ADGER&amp;quot;      Numeric,2 3205  &amp;quot;AL&amp;quot;  &amp;quot;35006&amp;quot;&lt;br /&gt;
[4,] &amp;quot;KEYSTONE&amp;quot;   Numeric,2 14218 &amp;quot;AL&amp;quot;  &amp;quot;35007&amp;quot;&lt;br /&gt;
[5,] &amp;quot;NEW SITE&amp;quot;   Numeric,2 19942 &amp;quot;AL&amp;quot;  &amp;quot;35010&amp;quot;&lt;br /&gt;
[6,] &amp;quot;ALPINE&amp;quot;     Numeric,2 3062  &amp;quot;AL&amp;quot;  &amp;quot;35014&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger http://mirlyn.lib.umich.edu/Record/004199238&lt;br /&gt;
 &lt;br /&gt;
Sampling / Steven K. Thompson. http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
&lt;br /&gt;
Data Handling http://ori.hhs.gov/education/products/n_illinois_u/datamanagement/dhtopic.html&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12994</id>
		<title>SMHS DataManagement</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12994"/>
		<updated>2014-07-31T20:09:36Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Data Management ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Data management comprised all the discipline related to managing data as a valuable resource and it is of significant importance in various fields. It is officially defined as the development and execution of architectures, policies, practices and procedures that properly manage the full data lifecycle needs of an enterprise. There are various ways to manage data. In this lecture, we are going to introduce the fundamental roles of data management in statistics and illustrate commonly used ways and steps in data managements through examples from different areas including tables, streams, cloud, warehouses, DBs, arrays, binary ASC II, handling and mechanics.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The next step after getting data would be to make proper management of the data in hand. Data management is of course a vital step in data analysis and is crucial to the success and reproducibility of a statistical analysis. So how would we do a good data management and what are the commonly used ways of data management? In order to further make good use of the data, we are going to learn more about the area of data management and various ways to implement it. Selection of appropriate tools and efficient use of these tools can save the researcher numerous hours, and allow other researchers to leverage the products of their work. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Tables: one of the most commonly used ways to manage data. It is a means of arranging data in rows and columns. It is of pervasive use throughout all research and data analysis. &lt;br /&gt;
There are two basic types of tables: &lt;br /&gt;
*Simple Table: consider the following example of a table summarizing the data from two groups. The table presents a general comparison of the two groups and shows us a clear picture of the measurements and the comparative characteristics between the two groups. What we learn from the table below: (1) these two groups with the same sample size have the same mean; (2) group 1 has a bigger range of the data values; (3) group 2 has a smaller standard deviation indicating a less variant dataset compared to group 1.&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;center&amp;gt; 	&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-	&lt;br /&gt;
| ||Minimum||Maximum||Mean||Standard Deviation||Size &lt;br /&gt;
|-&lt;br /&gt;
|Group 1||12||45||22||2.6||40&lt;br /&gt;
|-&lt;br /&gt;
|Group 2||15||30||22||1.5||40&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Multi-dimensional table: consider the F distribution (http://socr.umich.edu/Applets/F_Table.html) where the first row and the column is the degree of freedoms and the data in the middle is the 99% quantiles of F(k,l). This is a two dimensional example and the coordinates or combinations of the basic headers give a unique value attached.&lt;br /&gt;
&amp;lt;center&amp;gt; 	&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|l \ k||1||2||3||4||5&lt;br /&gt;
|-&lt;br /&gt;
|1||4052.||4999.5||5403.||5625.||5764.&lt;br /&gt;
|-&lt;br /&gt;
|2||98.50||99.00||99.17||99.25||99.30&lt;br /&gt;
|-&lt;br /&gt;
|3||34.12||30.82||29.46||28.71||28.24&lt;br /&gt;
|-&lt;br /&gt;
|4||21.20||18.00||16.69||15.98||15.52&lt;br /&gt;
|-&lt;br /&gt;
|5||13.27||12.06||11.39||10.97||10.67&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.2) Streams: is also an easy way of data management and it is more visualized with pictures. It is a sequence of data elements made available over time and can be thought as a conveyor belt that allows items to be processed one at a time rather than in large batches. It is a sequence of digitally encoded coherent signals used to transmit or receive information that is in the process of being transmitted. In electronics and computer architecture, it determines for which time which data item is scheduled to enter or leave which port. &lt;br /&gt;
&lt;br /&gt;
From the chart below, we have three apparent observations: (1) pre-dialysis kidney function is associated with patient survival; (2) pre-dialysis kidney function differs by type of dialysis treatment (it is associated with type of dialysis); (3) pre-dialysis kidney function is not in the causal pathway of type of dialysis and survival. And from these three conditions, we can conclude that pre-dialysis kidney function is a potential confounder.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementChart1.png]]&lt;br /&gt;
&lt;br /&gt;
An illustrative example of streaming is wind map (http://hint.fm/wind/), which generates a vivid demonstration of the wind speed over the USA with data streamed live from different resources. We can have a clear picture of the wind range countrywide with streaming.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementFig1.png]]&lt;br /&gt;
&lt;br /&gt;
3.3) Cloud Data Storage: Data cloud storage demands high availability, durability, and scalability from a few bytes to petabytes. Examples of data cloud storage services include Amazon’s S3, which promises a 99.9% monthly availability and 99.999999999% durability per year. This translates into less than an hour outage per month. For an example of durability, assume that a user stores 10,000 objects in a cloud storage, then, on average, the user would expect to lose one object every 10,000,000 years. S3, and other cloud service providers, achieve this reliability by storing data in multiple facilities with error checking and self-healing processes to detect and repair errors and device failures. This process is completely transparent to the user and requires no actions or knowledge of the underlying complexities. Global data-intense service providers like Google and Facebook have the expertise and scale to provide enormous storage and significant reliability and uptime in an efficient/economical way. Many Big Data research projects benefit from using cloud storage services (e.g., umich email, file-sharing, computational services etc.)&lt;br /&gt;
&lt;br /&gt;
3.4) Warehouse: a system used for reporting and data analysis. Integrating data from one or more disparate sources creates a central repository of data, a data warehouse (DW). DW stores current and historical data and are used for creating trending reports for senior management reporting such as annual comparison.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig2.jpg]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.5) DBs: database is an organized collection of data where data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
A well-known example would be the pipeline, which utilizes data from the LONI Image Data Archive (IDA). The pipeline takes advantage of the cluster nodes to download files in parallel from the IDA database. (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#IDA)&lt;br /&gt;
This article (https://ida.loni.usc.edu/login.jsp) provides a specific introduction to The LONI Image Data Archive (IDA), which offers an integrated environment for safely archiving, querying, visualizing and sharing neuroimaging data. It facilitates the de-identification and pooling of data from multiple institutions, protecting data from unauthorized access while providing the ability to share data among collaborative investigators. The archive provides flexibility in establishing project metadata, accommodating one or more research groups, sits and others. It’s simple, secure and requires nothing more than a computer with Internet connection and a web browser.&lt;br /&gt;
&lt;br /&gt;
3.6) Arrays: a data structure consisting of a collection of elements, each identified by at least one array index or key. &lt;br /&gt;
Types of arrays:&lt;br /&gt;
*One-dimensional array: a simple example: an array of 8 integer variables with indices 0 through 7 may be sored as 8 words at memory address: {200, 202, 204, 206, 208, 210, 212, 214} which can be memorized as 200+2i.&lt;br /&gt;
*Multidimensional arrays: Data=[■(2&amp;amp;3&amp;amp;0@6&amp;amp;4&amp;amp;5@5&amp;amp;3&amp;amp;1)].&lt;br /&gt;
&lt;br /&gt;
Example: R arrays and data-frames&lt;br /&gt;
&lt;br /&gt;
DF &amp;lt;- data.frame(a = 1:3, b = letters[10:12],&lt;br /&gt;
                 c = seq(as.Date(&amp;quot;2004-01-01&amp;quot;), by = &amp;quot;week&amp;quot;, len = 3),&lt;br /&gt;
                 stringsAsFactors = TRUE)&lt;br /&gt;
	&amp;gt; DF&lt;br /&gt;
  a b          c&lt;br /&gt;
1 1 j 2004-01-01&lt;br /&gt;
2 2 k 2004-01-08&lt;br /&gt;
3 3 l 2004-01-15&lt;br /&gt;
&lt;br /&gt;
data.matrix(DF[1:2])&lt;br /&gt;
data.matrix(DF)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; data.matrix(DF)&lt;br /&gt;
     a b     c&lt;br /&gt;
[1,] 1 1 12418&lt;br /&gt;
[2,] 2 2 12425&lt;br /&gt;
[3,] 3 3 12432&lt;br /&gt;
&lt;br /&gt;
	&amp;gt; sleep 		# sleep dataset&lt;br /&gt;
     extra group ID&lt;br /&gt;
1    0.7     1  1&lt;br /&gt;
2   -1.6     1  2&lt;br /&gt;
3   -0.2     1  3&lt;br /&gt;
4   -1.2     1  4&lt;br /&gt;
5   -0.1     1  5&lt;br /&gt;
6    3.4     1  6&lt;br /&gt;
7    3.7     1  7&lt;br /&gt;
8    0.8     1  8&lt;br /&gt;
9    0.0     1  9&lt;br /&gt;
10   2.0     1 10&lt;br /&gt;
11   1.9     2  1&lt;br /&gt;
12   0.8     2  2&lt;br /&gt;
13   1.1     2  3&lt;br /&gt;
14   0.1     2  4&lt;br /&gt;
15  -0.1     2  5&lt;br /&gt;
16   4.4     2  6&lt;br /&gt;
17   5.5     2  7&lt;br /&gt;
18   1.6     2  8&lt;br /&gt;
19   4.6     2  9&lt;br /&gt;
20   3.4     2 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.7) Binary ASCII:  ASCII, which is short for American Standard Code for Information Interchange is a character-encoding scheme originally based on English alphabet that encodes 128 specified characters – the numbers 0 – 9, the letters a – z and A – Z, some basic punctuation symbols, some control codes that originated with teletype machines and a bland space – into the 7-bit binary integers. It represents text in computers, communications equipment, and other devices that use text. To convert the ASCII code to binary character (part):&lt;br /&gt;
&lt;br /&gt;
Letter	ASCII Code	Binary	Letter	ASC II Code	Binary&lt;br /&gt;
a	097	01100001	A	065	01000001&lt;br /&gt;
b	098	01100010	B	066	01000010&lt;br /&gt;
c	099	01100011	C	067	01000011&lt;br /&gt;
d	100	01100100	D	068	01000100&lt;br /&gt;
e	101	01100101	E	069	01000101&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dec	Hex	Binary&lt;br /&gt;
    0	00	00000000&lt;br /&gt;
    1	01	00000001&lt;br /&gt;
    2	02	00000010&lt;br /&gt;
    3	03	00000011&lt;br /&gt;
    4	04	00000100&lt;br /&gt;
    5	05	00000101&lt;br /&gt;
    6	06	00000110&lt;br /&gt;
    7	07	00000111&lt;br /&gt;
    8	08	00001000&lt;br /&gt;
    9	09	00001001&lt;br /&gt;
  10	0A	00001010&lt;br /&gt;
  11	0B	00001011&lt;br /&gt;
  12	0C	00001100&lt;br /&gt;
  13	0D	00001101&lt;br /&gt;
  14	0E	00001110&lt;br /&gt;
  15	0F	00001111&lt;br /&gt;
  16	10	00010000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.8) Handling: the process of ensuring that the research data is stored, archived or disposed off in a safe and secure manner during and after the conclusion of a research project. This includes the development of policies and procedures to manage data handled electronically as well as through non-electronic means. &lt;br /&gt;
&lt;br /&gt;
*Data handling is important in ensuring the integrity of research data since it addresses concerns related to confidentially, security, and preservation/retention of research data. Proper planning for data handling can also result in efficient and economical storage, retrieval, and disposal of data. In the case of data handled electronically, data integrity is a primary concern to ensure that recorded data is not altered, erased, lost or accessed by unauthorized users.&lt;br /&gt;
&lt;br /&gt;
*Data handling issues encompass both electronic as well as non-electronic systems, such as paper files, journals, and laboratory notebooks. Electronic systems include computer workstations and laptops, personal digital assistants (PDA), storage media such as videotape, diskette, CD, DVD, memory cards, and other electronic instrumentation. These systems may be used for storage, archival, sharing, and disposing off data, and therefore, require adequate planning at the start of a research project so that issues related to data integrity can be analyzed and addressed early on.&lt;br /&gt;
&lt;br /&gt;
Issues needed to be considered in ensuring integrity of data handled:&lt;br /&gt;
*Type of data handled and its impact on the environment (especially if it is on a toxic media);&lt;br /&gt;
*Type of media containing data and its storage capacity, handling and storage requirements, reliability, longevity (in the case of degradable medium), retrieval effectiveness, and ease of upgrade to newer media;&lt;br /&gt;
*Data handling responsibilities/privileges, that is, who can handle which portion of data, at what point during the project, for what purpose, etc;&lt;br /&gt;
*Data handling procedures that describe how long the data should be kept, and when, how, and who should handle data for storage, sharing, archival, retrieval and disposal purposes.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://en.wikibooks.org/wiki/OpenClinica_User_Manual) presents a comprehensive introduction to EDC (electronic data capture) in clinical research. It contains a series of guides to help users learn how to use OpenClinica for clinical data management. This user manual serves a perfect introduction to OpenClinica and equips researches with background information, specific data management procedures, study construction and system maintenance for data management in clinical studies.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#XNAT)  talked about issues regarding building the workflow with LONI Pipeline. It introduced dragging and connecting in the modules and how data is managed with pipeline. It also illustrates usage of pipeline with IDA, NDAR, XNAT and the cloud storage it supported. &lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://onlinepubs.trb.org/onlinepubs/nchrp/cd-22/manual/v2chapter2.pdf) presents a general introduction to data management, analysis tools and analysis mechanics. It illustrated the purpose, steps, considerations and useful tools in data management and introduced the specific steps in data handling. It go through the major steps with examples and illustrated the database handling with consideration of the dataset size. This article offers a comprehensive analysis of data management and would be a good start to implement data management.&lt;br /&gt;
&lt;br /&gt;
4.4) This article (http://www.sciencedirect.com/science/article/pii/S0167819102000947) presents two services that they believe are fundamental to any data grid: reliable, high-speed transport and replica management. Their high-speed transport service, GridFTP, extends the popular FTP protocol with new features required for Data Grid applications, such as striping and partial file access and their replica management service integrates a replica catalog with GridFTP transfers to provide for the creation, registration, location, and management of dataset replicas. The article also presents the design of both services and also preliminary performance results and implementations exploit security and other services provided by the Globus Toolkit.&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
Data Import/Export in R: http://cran.r-project.org/doc/manuals/r-devel/R-data.html&lt;br /&gt;
Package ‘rmongodb’ in R (provides an interface to the NoSQL MongoDB database): http://cran.r-project.org/web/packages/rmongodb/ .&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
Example 1: Data Streaming: &lt;br /&gt;
&lt;br /&gt;
&amp;gt; library(&amp;quot;stream&amp;quot;)&lt;br /&gt;
&amp;gt; dsd &amp;lt;- DSD_Gaussians(k=3, d=3, noise=0.05)&lt;br /&gt;
&amp;gt; dsd&lt;br /&gt;
Static Mixture of Gaussians Data Stream&lt;br /&gt;
With 3 clusters in 3 dimensions &lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=5)&lt;br /&gt;
&amp;gt; p&lt;br /&gt;
         V1        V2        V3&lt;br /&gt;
1 0.6930698 0.4082633 0.3857444&lt;br /&gt;
2 0.9086645 0.5545718 0.6942871&lt;br /&gt;
3 0.6031121 0.5288573 0.5795389&lt;br /&gt;
4 0.7590460 0.5485160 0.6484480&lt;br /&gt;
5 0.7249682 0.7327056 0.4891291&lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=100, assignment=TRUE)&lt;br /&gt;
&amp;gt; attr(p, &amp;quot;assignment&amp;quot;)&lt;br /&gt;
  [1]  3  3  3 NA  2  2  2  3  1  2  1  2  2  3  1  1  1  3  3  2  3  1  1  2&lt;br /&gt;
 [25]  3  1  3  3  1  1  3  2  3  3  2 NA  1  1  1  1  1  3  2  2  2  3  1  2&lt;br /&gt;
 [49]  2  2  2  3  1 NA  1  3  2  2  3  3  3  2  1  2  2  2  1  3  1  1  1  2&lt;br /&gt;
 [73]  1  3  2  2  3  1 NA  1  2  1  1  3  3  1  1  2  1  3  3  3  2  3  3  2&lt;br /&gt;
 [97] NA  1  2  1&lt;br /&gt;
&amp;gt; plot(dsd, n=500)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig4.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Example 2: Import of big data: zips (the data would be available at http://media.mongodb.org/zips.json)  import using R/MongoDB:&lt;br /&gt;
Steps. Install the package of ‘rmongodb’ and import data zips, this data is included in the rmongodb package and can be loaded using the command data(zips):&lt;br /&gt;
&lt;br /&gt;
install.package('rmonogodb')&lt;br /&gt;
library(rmongodb)&lt;br /&gt;
data(zips)&lt;br /&gt;
head(zips)&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; install.packages('rmongodb')&lt;br /&gt;
trying URL 'http://cran.mtu.edu/bin/macosx/leopard/contrib/2.15/rmongodb_1.6.5.tgz'&lt;br /&gt;
Content type 'application/x-gzip' length 1291831 bytes (1.2 Mb)&lt;br /&gt;
opened URL&lt;br /&gt;
==================================================&lt;br /&gt;
downloaded 1.2 Mb&lt;br /&gt;
&lt;br /&gt;
The downloaded binary packages are in&lt;br /&gt;
	/var/folders/k6/3r5dstw5385_b4fzt679pmsr0000gn/T//RtmpWD2wiV/downloaded_packages&lt;br /&gt;
&lt;br /&gt;
&amp;gt; head(zips)&lt;br /&gt;
     city         loc       pop   state _id    &lt;br /&gt;
[1,] &amp;quot;ACMAR&amp;quot;      Numeric,2 6055  &amp;quot;AL&amp;quot;  &amp;quot;35004&amp;quot;&lt;br /&gt;
[2,] &amp;quot;ADAMSVILLE&amp;quot; Numeric,2 10616 &amp;quot;AL&amp;quot;  &amp;quot;35005&amp;quot;&lt;br /&gt;
[3,] &amp;quot;ADGER&amp;quot;      Numeric,2 3205  &amp;quot;AL&amp;quot;  &amp;quot;35006&amp;quot;&lt;br /&gt;
[4,] &amp;quot;KEYSTONE&amp;quot;   Numeric,2 14218 &amp;quot;AL&amp;quot;  &amp;quot;35007&amp;quot;&lt;br /&gt;
[5,] &amp;quot;NEW SITE&amp;quot;   Numeric,2 19942 &amp;quot;AL&amp;quot;  &amp;quot;35010&amp;quot;&lt;br /&gt;
[6,] &amp;quot;ALPINE&amp;quot;     Numeric,2 3062  &amp;quot;AL&amp;quot;  &amp;quot;35014&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger http://mirlyn.lib.umich.edu/Record/004199238&lt;br /&gt;
 &lt;br /&gt;
Sampling / Steven K. Thompson. http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
&lt;br /&gt;
Data Handling http://ori.hhs.gov/education/products/n_illinois_u/datamanagement/dhtopic.html&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12993</id>
		<title>SMHS DataManagement</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12993"/>
		<updated>2014-07-31T20:03:52Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Data Management ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Data management comprised all the discipline related to managing data as a valuable resource and it is of significant importance in various fields. It is officially defined as the development and execution of architectures, policies, practices and procedures that properly manage the full data lifecycle needs of an enterprise. There are various ways to manage data. In this lecture, we are going to introduce the fundamental roles of data management in statistics and illustrate commonly used ways and steps in data managements through examples from different areas including tables, streams, cloud, warehouses, DBs, arrays, binary ASC II, handling and mechanics.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The next step after getting data would be to make proper management of the data in hand. Data management is of course a vital step in data analysis and is crucial to the success and reproducibility of a statistical analysis. So how would we do a good data management and what are the commonly used ways of data management? In order to further make good use of the data, we are going to learn more about the area of data management and various ways to implement it. Selection of appropriate tools and efficient use of these tools can save the researcher numerous hours, and allow other researchers to leverage the products of their work. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Tables: one of the most commonly used ways to manage data. It is a means of arranging data in rows and columns. It is of pervasive use throughout all research and data analysis. &lt;br /&gt;
There are two basic types of tables: &lt;br /&gt;
*Simple Table: consider the following example of a table summarizing the data from two groups. The table presents a general comparison of the two groups and shows us a clear picture of the measurements and the comparative characteristics between the two groups. What we learn from the table below: (1) these two groups with the same sample size have the same mean; (2) group 1 has a bigger range of the data values; (3) group 2 has a smaller standard deviation indicating a less variant dataset compared to group 1.&lt;br /&gt;
	Minimum	Maximum	Mean	Standard Deviation	Size &lt;br /&gt;
Group 1	12	45	22	2.6	40&lt;br /&gt;
Group 2	15	30	22	1.5	40&lt;br /&gt;
&lt;br /&gt;
*Multi-dimensional table: consider the F distribution (http://socr.umich.edu/Applets/F_Table.html) where the first row and the column is the degree of freedoms and the data in the middle is the 99% quantiles of F(k,l). This is a two dimensional example and the coordinates or combinations of the basic headers give a unique value attached.&lt;br /&gt;
&lt;br /&gt;
l \ k	1	2	3	4	5&lt;br /&gt;
1	4052.	4999.5	5403.	5625.	5764.&lt;br /&gt;
2	98.50	99.00	99.17	99.25	99.30&lt;br /&gt;
3	34.12	30.82	29.46	28.71	28.24&lt;br /&gt;
4	21.20	18.00	16.69	15.98	15.52&lt;br /&gt;
5	13.27	12.06	11.39	10.97	10.67&lt;br /&gt;
&lt;br /&gt;
3.2) Streams: is also an easy way of data management and it is more visualized with pictures. It is a sequence of data elements made available over time and can be thought as a conveyor belt that allows items to be processed one at a time rather than in large batches. It is a sequence of digitally encoded coherent signals used to transmit or receive information that is in the process of being transmitted. In electronics and computer architecture, it determines for which time which data item is scheduled to enter or leave which port. &lt;br /&gt;
&lt;br /&gt;
From the chart below, we have three apparent observations: (1) pre-dialysis kidney function is associated with patient survival; (2) pre-dialysis kidney function differs by type of dialysis treatment (it is associated with type of dialysis); (3) pre-dialysis kidney function is not in the causal pathway of type of dialysis and survival. And from these three conditions, we can conclude that pre-dialysis kidney function is a potential confounder.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementChart1.png]]&lt;br /&gt;
&lt;br /&gt;
An illustrative example of streaming is wind map (http://hint.fm/wind/), which generates a vivid demonstration of the wind speed over the USA with data streamed live from different resources. We can have a clear picture of the wind range countrywide with streaming.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementFig1.png]]&lt;br /&gt;
&lt;br /&gt;
3.3) Cloud Data Storage: Data cloud storage demands high availability, durability, and scalability from a few bytes to petabytes. Examples of data cloud storage services include Amazon’s S3, which promises a 99.9% monthly availability and 99.999999999% durability per year. This translates into less than an hour outage per month. For an example of durability, assume that a user stores 10,000 objects in a cloud storage, then, on average, the user would expect to lose one object every 10,000,000 years. S3, and other cloud service providers, achieve this reliability by storing data in multiple facilities with error checking and self-healing processes to detect and repair errors and device failures. This process is completely transparent to the user and requires no actions or knowledge of the underlying complexities. Global data-intense service providers like Google and Facebook have the expertise and scale to provide enormous storage and significant reliability and uptime in an efficient/economical way. Many Big Data research projects benefit from using cloud storage services (e.g., umich email, file-sharing, computational services etc.)&lt;br /&gt;
&lt;br /&gt;
3.4) Warehouse: a system used for reporting and data analysis. Integrating data from one or more disparate sources creates a central repository of data, a data warehouse (DW). DW stores current and historical data and are used for creating trending reports for senior management reporting such as annual comparison.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig2.jpg]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.5) DBs: database is an organized collection of data where data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
A well-known example would be the pipeline, which utilizes data from the LONI Image Data Archive (IDA). The pipeline takes advantage of the cluster nodes to download files in parallel from the IDA database. (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#IDA)&lt;br /&gt;
This article (https://ida.loni.usc.edu/login.jsp) provides a specific introduction to The LONI Image Data Archive (IDA), which offers an integrated environment for safely archiving, querying, visualizing and sharing neuroimaging data. It facilitates the de-identification and pooling of data from multiple institutions, protecting data from unauthorized access while providing the ability to share data among collaborative investigators. The archive provides flexibility in establishing project metadata, accommodating one or more research groups, sits and others. It’s simple, secure and requires nothing more than a computer with Internet connection and a web browser.&lt;br /&gt;
&lt;br /&gt;
3.6) Arrays: a data structure consisting of a collection of elements, each identified by at least one array index or key. &lt;br /&gt;
Types of arrays:&lt;br /&gt;
*One-dimensional array: a simple example: an array of 8 integer variables with indices 0 through 7 may be sored as 8 words at memory address: {200, 202, 204, 206, 208, 210, 212, 214} which can be memorized as 200+2i.&lt;br /&gt;
*Multidimensional arrays: Data=[■(2&amp;amp;3&amp;amp;0@6&amp;amp;4&amp;amp;5@5&amp;amp;3&amp;amp;1)].&lt;br /&gt;
&lt;br /&gt;
Example: R arrays and data-frames&lt;br /&gt;
&lt;br /&gt;
DF &amp;lt;- data.frame(a = 1:3, b = letters[10:12],&lt;br /&gt;
                 c = seq(as.Date(&amp;quot;2004-01-01&amp;quot;), by = &amp;quot;week&amp;quot;, len = 3),&lt;br /&gt;
                 stringsAsFactors = TRUE)&lt;br /&gt;
	&amp;gt; DF&lt;br /&gt;
  a b          c&lt;br /&gt;
1 1 j 2004-01-01&lt;br /&gt;
2 2 k 2004-01-08&lt;br /&gt;
3 3 l 2004-01-15&lt;br /&gt;
&lt;br /&gt;
data.matrix(DF[1:2])&lt;br /&gt;
data.matrix(DF)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; data.matrix(DF)&lt;br /&gt;
     a b     c&lt;br /&gt;
[1,] 1 1 12418&lt;br /&gt;
[2,] 2 2 12425&lt;br /&gt;
[3,] 3 3 12432&lt;br /&gt;
&lt;br /&gt;
	&amp;gt; sleep 		# sleep dataset&lt;br /&gt;
     extra group ID&lt;br /&gt;
1    0.7     1  1&lt;br /&gt;
2   -1.6     1  2&lt;br /&gt;
3   -0.2     1  3&lt;br /&gt;
4   -1.2     1  4&lt;br /&gt;
5   -0.1     1  5&lt;br /&gt;
6    3.4     1  6&lt;br /&gt;
7    3.7     1  7&lt;br /&gt;
8    0.8     1  8&lt;br /&gt;
9    0.0     1  9&lt;br /&gt;
10   2.0     1 10&lt;br /&gt;
11   1.9     2  1&lt;br /&gt;
12   0.8     2  2&lt;br /&gt;
13   1.1     2  3&lt;br /&gt;
14   0.1     2  4&lt;br /&gt;
15  -0.1     2  5&lt;br /&gt;
16   4.4     2  6&lt;br /&gt;
17   5.5     2  7&lt;br /&gt;
18   1.6     2  8&lt;br /&gt;
19   4.6     2  9&lt;br /&gt;
20   3.4     2 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.7) Binary ASCII:  ASCII, which is short for American Standard Code for Information Interchange is a character-encoding scheme originally based on English alphabet that encodes 128 specified characters – the numbers 0 – 9, the letters a – z and A – Z, some basic punctuation symbols, some control codes that originated with teletype machines and a bland space – into the 7-bit binary integers. It represents text in computers, communications equipment, and other devices that use text. To convert the ASCII code to binary character (part):&lt;br /&gt;
&lt;br /&gt;
Letter	ASCII Code	Binary	Letter	ASC II Code	Binary&lt;br /&gt;
a	097	01100001	A	065	01000001&lt;br /&gt;
b	098	01100010	B	066	01000010&lt;br /&gt;
c	099	01100011	C	067	01000011&lt;br /&gt;
d	100	01100100	D	068	01000100&lt;br /&gt;
e	101	01100101	E	069	01000101&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dec	Hex	Binary&lt;br /&gt;
    0	00	00000000&lt;br /&gt;
    1	01	00000001&lt;br /&gt;
    2	02	00000010&lt;br /&gt;
    3	03	00000011&lt;br /&gt;
    4	04	00000100&lt;br /&gt;
    5	05	00000101&lt;br /&gt;
    6	06	00000110&lt;br /&gt;
    7	07	00000111&lt;br /&gt;
    8	08	00001000&lt;br /&gt;
    9	09	00001001&lt;br /&gt;
  10	0A	00001010&lt;br /&gt;
  11	0B	00001011&lt;br /&gt;
  12	0C	00001100&lt;br /&gt;
  13	0D	00001101&lt;br /&gt;
  14	0E	00001110&lt;br /&gt;
  15	0F	00001111&lt;br /&gt;
  16	10	00010000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.8) Handling: the process of ensuring that the research data is stored, archived or disposed off in a safe and secure manner during and after the conclusion of a research project. This includes the development of policies and procedures to manage data handled electronically as well as through non-electronic means. &lt;br /&gt;
&lt;br /&gt;
*Data handling is important in ensuring the integrity of research data since it addresses concerns related to confidentially, security, and preservation/retention of research data. Proper planning for data handling can also result in efficient and economical storage, retrieval, and disposal of data. In the case of data handled electronically, data integrity is a primary concern to ensure that recorded data is not altered, erased, lost or accessed by unauthorized users.&lt;br /&gt;
&lt;br /&gt;
*Data handling issues encompass both electronic as well as non-electronic systems, such as paper files, journals, and laboratory notebooks. Electronic systems include computer workstations and laptops, personal digital assistants (PDA), storage media such as videotape, diskette, CD, DVD, memory cards, and other electronic instrumentation. These systems may be used for storage, archival, sharing, and disposing off data, and therefore, require adequate planning at the start of a research project so that issues related to data integrity can be analyzed and addressed early on.&lt;br /&gt;
&lt;br /&gt;
Issues needed to be considered in ensuring integrity of data handled:&lt;br /&gt;
*Type of data handled and its impact on the environment (especially if it is on a toxic media);&lt;br /&gt;
*Type of media containing data and its storage capacity, handling and storage requirements, reliability, longevity (in the case of degradable medium), retrieval effectiveness, and ease of upgrade to newer media;&lt;br /&gt;
*Data handling responsibilities/privileges, that is, who can handle which portion of data, at what point during the project, for what purpose, etc;&lt;br /&gt;
*Data handling procedures that describe how long the data should be kept, and when, how, and who should handle data for storage, sharing, archival, retrieval and disposal purposes.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://en.wikibooks.org/wiki/OpenClinica_User_Manual) presents a comprehensive introduction to EDC (electronic data capture) in clinical research. It contains a series of guides to help users learn how to use OpenClinica for clinical data management. This user manual serves a perfect introduction to OpenClinica and equips researches with background information, specific data management procedures, study construction and system maintenance for data management in clinical studies.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#XNAT)  talked about issues regarding building the workflow with LONI Pipeline. It introduced dragging and connecting in the modules and how data is managed with pipeline. It also illustrates usage of pipeline with IDA, NDAR, XNAT and the cloud storage it supported. &lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://onlinepubs.trb.org/onlinepubs/nchrp/cd-22/manual/v2chapter2.pdf) presents a general introduction to data management, analysis tools and analysis mechanics. It illustrated the purpose, steps, considerations and useful tools in data management and introduced the specific steps in data handling. It go through the major steps with examples and illustrated the database handling with consideration of the dataset size. This article offers a comprehensive analysis of data management and would be a good start to implement data management.&lt;br /&gt;
&lt;br /&gt;
4.4) This article (http://www.sciencedirect.com/science/article/pii/S0167819102000947) presents two services that they believe are fundamental to any data grid: reliable, high-speed transport and replica management. Their high-speed transport service, GridFTP, extends the popular FTP protocol with new features required for Data Grid applications, such as striping and partial file access and their replica management service integrates a replica catalog with GridFTP transfers to provide for the creation, registration, location, and management of dataset replicas. The article also presents the design of both services and also preliminary performance results and implementations exploit security and other services provided by the Globus Toolkit.&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
Data Import/Export in R: http://cran.r-project.org/doc/manuals/r-devel/R-data.html&lt;br /&gt;
Package ‘rmongodb’ in R (provides an interface to the NoSQL MongoDB database): http://cran.r-project.org/web/packages/rmongodb/ .&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
Example 1: Data Streaming: &lt;br /&gt;
&lt;br /&gt;
&amp;gt; library(&amp;quot;stream&amp;quot;)&lt;br /&gt;
&amp;gt; dsd &amp;lt;- DSD_Gaussians(k=3, d=3, noise=0.05)&lt;br /&gt;
&amp;gt; dsd&lt;br /&gt;
Static Mixture of Gaussians Data Stream&lt;br /&gt;
With 3 clusters in 3 dimensions &lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=5)&lt;br /&gt;
&amp;gt; p&lt;br /&gt;
         V1        V2        V3&lt;br /&gt;
1 0.6930698 0.4082633 0.3857444&lt;br /&gt;
2 0.9086645 0.5545718 0.6942871&lt;br /&gt;
3 0.6031121 0.5288573 0.5795389&lt;br /&gt;
4 0.7590460 0.5485160 0.6484480&lt;br /&gt;
5 0.7249682 0.7327056 0.4891291&lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=100, assignment=TRUE)&lt;br /&gt;
&amp;gt; attr(p, &amp;quot;assignment&amp;quot;)&lt;br /&gt;
  [1]  3  3  3 NA  2  2  2  3  1  2  1  2  2  3  1  1  1  3  3  2  3  1  1  2&lt;br /&gt;
 [25]  3  1  3  3  1  1  3  2  3  3  2 NA  1  1  1  1  1  3  2  2  2  3  1  2&lt;br /&gt;
 [49]  2  2  2  3  1 NA  1  3  2  2  3  3  3  2  1  2  2  2  1  3  1  1  1  2&lt;br /&gt;
 [73]  1  3  2  2  3  1 NA  1  2  1  1  3  3  1  1  2  1  3  3  3  2  3  3  2&lt;br /&gt;
 [97] NA  1  2  1&lt;br /&gt;
&amp;gt; plot(dsd, n=500)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig4.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Example 2: Import of big data: zips (the data would be available at http://media.mongodb.org/zips.json)  import using R/MongoDB:&lt;br /&gt;
Steps. Install the package of ‘rmongodb’ and import data zips, this data is included in the rmongodb package and can be loaded using the command data(zips):&lt;br /&gt;
&lt;br /&gt;
install.package('rmonogodb')&lt;br /&gt;
library(rmongodb)&lt;br /&gt;
data(zips)&lt;br /&gt;
head(zips)&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; install.packages('rmongodb')&lt;br /&gt;
trying URL 'http://cran.mtu.edu/bin/macosx/leopard/contrib/2.15/rmongodb_1.6.5.tgz'&lt;br /&gt;
Content type 'application/x-gzip' length 1291831 bytes (1.2 Mb)&lt;br /&gt;
opened URL&lt;br /&gt;
==================================================&lt;br /&gt;
downloaded 1.2 Mb&lt;br /&gt;
&lt;br /&gt;
The downloaded binary packages are in&lt;br /&gt;
	/var/folders/k6/3r5dstw5385_b4fzt679pmsr0000gn/T//RtmpWD2wiV/downloaded_packages&lt;br /&gt;
&lt;br /&gt;
&amp;gt; head(zips)&lt;br /&gt;
     city         loc       pop   state _id    &lt;br /&gt;
[1,] &amp;quot;ACMAR&amp;quot;      Numeric,2 6055  &amp;quot;AL&amp;quot;  &amp;quot;35004&amp;quot;&lt;br /&gt;
[2,] &amp;quot;ADAMSVILLE&amp;quot; Numeric,2 10616 &amp;quot;AL&amp;quot;  &amp;quot;35005&amp;quot;&lt;br /&gt;
[3,] &amp;quot;ADGER&amp;quot;      Numeric,2 3205  &amp;quot;AL&amp;quot;  &amp;quot;35006&amp;quot;&lt;br /&gt;
[4,] &amp;quot;KEYSTONE&amp;quot;   Numeric,2 14218 &amp;quot;AL&amp;quot;  &amp;quot;35007&amp;quot;&lt;br /&gt;
[5,] &amp;quot;NEW SITE&amp;quot;   Numeric,2 19942 &amp;quot;AL&amp;quot;  &amp;quot;35010&amp;quot;&lt;br /&gt;
[6,] &amp;quot;ALPINE&amp;quot;     Numeric,2 3062  &amp;quot;AL&amp;quot;  &amp;quot;35014&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger http://mirlyn.lib.umich.edu/Record/004199238&lt;br /&gt;
 &lt;br /&gt;
Sampling / Steven K. Thompson. http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
&lt;br /&gt;
Data Handling http://ori.hhs.gov/education/products/n_illinois_u/datamanagement/dhtopic.html&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12991</id>
		<title>SMHS DataManagement</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12991"/>
		<updated>2014-07-31T19:52:40Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Data Management ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Data management comprised all the discipline related to managing data as a valuable resource and it is of significant importance in various fields. It is officially defined as the development and execution of architectures, policies, practices and procedures that properly manage the full data lifecycle needs of an enterprise. There are various ways to manage data. In this lecture, we are going to introduce the fundamental roles of data management in statistics and illustrate commonly used ways and steps in data managements through examples from different areas including tables, streams, cloud, warehouses, DBs, arrays, binary ASC II, handling and mechanics.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The next step after getting data would be to make proper management of the data in hand. Data management is of course a vital step in data analysis and is crucial to the success and reproducibility of a statistical analysis. So how would we do a good data management and what are the commonly used ways of data management? In order to further make good use of the data, we are going to learn more about the area of data management and various ways to implement it. Selection of appropriate tools and efficient use of these tools can save the researcher numerous hours, and allow other researchers to leverage the products of their work. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Tables: one of the most commonly used ways to manage data. It is a means of arranging data in rows and columns. It is of pervasive use throughout all research and data analysis. &lt;br /&gt;
There are two basic types of tables: &lt;br /&gt;
	Simple Table: consider the following example of a table summarizing the data from two groups. The table presents a general comparison of the two groups and shows us a clear picture of the measurements and the comparative characteristics between the two groups. What we learn from the table below: (1) these two groups with the same sample size have the same mean; (2) group 1 has a bigger range of the data values; (3) group 2 has a smaller standard deviation indicating a less variant dataset compared to group 1.&lt;br /&gt;
	Minimum	Maximum	Mean	Standard Deviation	Size &lt;br /&gt;
Group 1	12	45	22	2.6	40&lt;br /&gt;
Group 2	15	30	22	1.5	40&lt;br /&gt;
&lt;br /&gt;
	Multi-dimensional table: consider the F distribution (http://socr.umich.edu/Applets/F_Table.html) where the first row and the column is the degree of freedoms and the data in the middle is the 99% quantiles of F(k,l). This is a two dimensional example and the coordinates or combinations of the basic headers give a unique value attached.&lt;br /&gt;
&lt;br /&gt;
l \ k	1	2	3	4	5&lt;br /&gt;
1	4052.	4999.5	5403.	5625.	5764.&lt;br /&gt;
2	98.50	99.00	99.17	99.25	99.30&lt;br /&gt;
3	34.12	30.82	29.46	28.71	28.24&lt;br /&gt;
4	21.20	18.00	16.69	15.98	15.52&lt;br /&gt;
5	13.27	12.06	11.39	10.97	10.67&lt;br /&gt;
&lt;br /&gt;
3.2) Streams: is also an easy way of data management and it is more visualized with pictures. It is a sequence of data elements made available over time and can be thought as a conveyor belt that allows items to be processed one at a time rather than in large batches. It is a sequence of digitally encoded coherent signals used to transmit or receive information that is in the process of being transmitted. In electronics and computer architecture, it determines for which time which data item is scheduled to enter or leave which port. &lt;br /&gt;
&lt;br /&gt;
From the chart below, we have three apparent observations: (1) pre-dialysis kidney function is associated with patient survival; (2) pre-dialysis kidney function differs by type of dialysis treatment (it is associated with type of dialysis); (3) pre-dialysis kidney function is not in the causal pathway of type of dialysis and survival. And from these three conditions, we can conclude that pre-dialysis kidney function is a potential confounder.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementChart1.png]]&lt;br /&gt;
&lt;br /&gt;
An illustrative example of streaming is wind map (http://hint.fm/wind/), which generates a vivid demonstration of the wind speed over the USA with data streamed live from different resources. We can have a clear picture of the wind range countrywide with streaming.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementFig1.png]]&lt;br /&gt;
&lt;br /&gt;
3.3) Cloud Data Storage: Data cloud storage demands high availability, durability, and scalability from a few bytes to petabytes. Examples of data cloud storage services include Amazon’s S3, which promises a 99.9% monthly availability and 99.999999999% durability per year. This translates into less than an hour outage per month. For an example of durability, assume that a user stores 10,000 objects in a cloud storage, then, on average, the user would expect to lose one object every 10,000,000 years. S3, and other cloud service providers, achieve this reliability by storing data in multiple facilities with error checking and self-healing processes to detect and repair errors and device failures. This process is completely transparent to the user and requires no actions or knowledge of the underlying complexities. Global data-intense service providers like Google and Facebook have the expertise and scale to provide enormous storage and significant reliability and uptime in an efficient/economical way. Many Big Data research projects benefit from using cloud storage services (e.g., umich email, file-sharing, computational services etc.)&lt;br /&gt;
&lt;br /&gt;
3.4) Warehouse: a system used for reporting and data analysis. Integrating data from one or more disparate sources creates a central repository of data, a data warehouse (DW). DW stores current and historical data and are used for creating trending reports for senior management reporting such as annual comparison.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig2.jpg]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.5) DBs: database is an organized collection of data where data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
A well-known example would be the pipeline, which utilizes data from the LONI Image Data Archive (IDA). The pipeline takes advantage of the cluster nodes to download files in parallel from the IDA database. (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#IDA)&lt;br /&gt;
This article (https://ida.loni.usc.edu/login.jsp) provides a specific introduction to The LONI Image Data Archive (IDA), which offers an integrated environment for safely archiving, querying, visualizing and sharing neuroimaging data. It facilitates the de-identification and pooling of data from multiple institutions, protecting data from unauthorized access while providing the ability to share data among collaborative investigators. The archive provides flexibility in establishing project metadata, accommodating one or more research groups, sits and others. It’s simple, secure and requires nothing more than a computer with Internet connection and a web browser.&lt;br /&gt;
&lt;br /&gt;
3.6) Arrays: a data structure consisting of a collection of elements, each identified by at least one array index or key. &lt;br /&gt;
Types of arrays:&lt;br /&gt;
	One-dimensional array: a simple example: an array of 8 integer variables with indices 0 through 7 may be sored as 8 words at memory address: {200, 202, 204, 206, 208, 210, 212, 214} which can be memorized as 200+2i.&lt;br /&gt;
	Multidimensional arrays: Data=[■(2&amp;amp;3&amp;amp;0@6&amp;amp;4&amp;amp;5@5&amp;amp;3&amp;amp;1)].&lt;br /&gt;
&lt;br /&gt;
Example: R arrays and data-frames&lt;br /&gt;
&lt;br /&gt;
DF &amp;lt;- data.frame(a = 1:3, b = letters[10:12],&lt;br /&gt;
                 c = seq(as.Date(&amp;quot;2004-01-01&amp;quot;), by = &amp;quot;week&amp;quot;, len = 3),&lt;br /&gt;
                 stringsAsFactors = TRUE)&lt;br /&gt;
	&amp;gt; DF&lt;br /&gt;
  a b          c&lt;br /&gt;
1 1 j 2004-01-01&lt;br /&gt;
2 2 k 2004-01-08&lt;br /&gt;
3 3 l 2004-01-15&lt;br /&gt;
&lt;br /&gt;
data.matrix(DF[1:2])&lt;br /&gt;
data.matrix(DF)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; data.matrix(DF)&lt;br /&gt;
     a b     c&lt;br /&gt;
[1,] 1 1 12418&lt;br /&gt;
[2,] 2 2 12425&lt;br /&gt;
[3,] 3 3 12432&lt;br /&gt;
&lt;br /&gt;
	&amp;gt; sleep 		# sleep dataset&lt;br /&gt;
     extra group ID&lt;br /&gt;
1    0.7     1  1&lt;br /&gt;
2   -1.6     1  2&lt;br /&gt;
3   -0.2     1  3&lt;br /&gt;
4   -1.2     1  4&lt;br /&gt;
5   -0.1     1  5&lt;br /&gt;
6    3.4     1  6&lt;br /&gt;
7    3.7     1  7&lt;br /&gt;
8    0.8     1  8&lt;br /&gt;
9    0.0     1  9&lt;br /&gt;
10   2.0     1 10&lt;br /&gt;
11   1.9     2  1&lt;br /&gt;
12   0.8     2  2&lt;br /&gt;
13   1.1     2  3&lt;br /&gt;
14   0.1     2  4&lt;br /&gt;
15  -0.1     2  5&lt;br /&gt;
16   4.4     2  6&lt;br /&gt;
17   5.5     2  7&lt;br /&gt;
18   1.6     2  8&lt;br /&gt;
19   4.6     2  9&lt;br /&gt;
20   3.4     2 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.7) Binary ASCII:  ASCII, which is short for American Standard Code for Information Interchange is a character-encoding scheme originally based on English alphabet that encodes 128 specified characters – the numbers 0 – 9, the letters a – z and A – Z, some basic punctuation symbols, some control codes that originated with teletype machines and a bland space – into the 7-bit binary integers. It represents text in computers, communications equipment, and other devices that use text. To convert the ASCII code to binary character (part):&lt;br /&gt;
&lt;br /&gt;
Letter	ASCII Code	Binary	Letter	ASC II Code	Binary&lt;br /&gt;
a	097	01100001	A	065	01000001&lt;br /&gt;
b	098	01100010	B	066	01000010&lt;br /&gt;
c	099	01100011	C	067	01000011&lt;br /&gt;
d	100	01100100	D	068	01000100&lt;br /&gt;
e	101	01100101	E	069	01000101&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dec	Hex	Binary&lt;br /&gt;
    0	00	00000000&lt;br /&gt;
    1	01	00000001&lt;br /&gt;
    2	02	00000010&lt;br /&gt;
    3	03	00000011&lt;br /&gt;
    4	04	00000100&lt;br /&gt;
    5	05	00000101&lt;br /&gt;
    6	06	00000110&lt;br /&gt;
    7	07	00000111&lt;br /&gt;
    8	08	00001000&lt;br /&gt;
    9	09	00001001&lt;br /&gt;
  10	0A	00001010&lt;br /&gt;
  11	0B	00001011&lt;br /&gt;
  12	0C	00001100&lt;br /&gt;
  13	0D	00001101&lt;br /&gt;
  14	0E	00001110&lt;br /&gt;
  15	0F	00001111&lt;br /&gt;
  16	10	00010000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.8) Handling: the process of ensuring that the research data is stored, archived or disposed off in a safe and secure manner during and after the conclusion of a research project. This includes the development of policies and procedures to manage data handled electronically as well as through non-electronic means. &lt;br /&gt;
&lt;br /&gt;
	Data handling is important in ensuring the integrity of research data since it addresses concerns related to confidentially, security, and preservation/retention of research data. Proper planning for data handling can also result in efficient and economical storage, retrieval, and disposal of data. In the case of data handled electronically, data integrity is a primary concern to ensure that recorded data is not altered, erased, lost or accessed by unauthorized users.&lt;br /&gt;
&lt;br /&gt;
	Data handling issues encompass both electronic as well as non-electronic systems, such as paper files, journals, and laboratory notebooks. Electronic systems include computer workstations and laptops, personal digital assistants (PDA), storage media such as videotape, diskette, CD, DVD, memory cards, and other electronic instrumentation. These systems may be used for storage, archival, sharing, and disposing off data, and therefore, require adequate planning at the start of a research project so that issues related to data integrity can be analyzed and addressed early on.&lt;br /&gt;
	Issues needed to be considered in ensuring integrity of data handled:&lt;br /&gt;
	Type of data handled and its impact on the environment (especially if it is on a toxic media);&lt;br /&gt;
	Type of media containing data and its storage capacity, handling and storage requirements, reliability, longevity (in the case of degradable medium), retrieval effectiveness, and ease of upgrade to newer media;&lt;br /&gt;
	Data handling responsibilities/privileges, that is, who can handle which portion of data, at what point during the project, for what purpose, etc;&lt;br /&gt;
	Data handling procedures that describe how long the data should be kept, and when, how, and who should handle data for storage, sharing, archival, retrieval and disposal purposes.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://en.wikibooks.org/wiki/OpenClinica_User_Manual) presents a comprehensive introduction to EDC (electronic data capture) in clinical research. It contains a series of guides to help users learn how to use OpenClinica for clinical data management. This user manual serves a perfect introduction to OpenClinica and equips researches with background information, specific data management procedures, study construction and system maintenance for data management in clinical studies.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#XNAT)  talked about issues regarding building the workflow with LONI Pipeline. It introduced dragging and connecting in the modules and how data is managed with pipeline. It also illustrates usage of pipeline with IDA, NDAR, XNAT and the cloud storage it supported. &lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://onlinepubs.trb.org/onlinepubs/nchrp/cd-22/manual/v2chapter2.pdf) presents a general introduction to data management, analysis tools and analysis mechanics. It illustrated the purpose, steps, considerations and useful tools in data management and introduced the specific steps in data handling. It go through the major steps with examples and illustrated the database handling with consideration of the dataset size. This article offers a comprehensive analysis of data management and would be a good start to implement data management.&lt;br /&gt;
&lt;br /&gt;
4.4) This article (http://www.sciencedirect.com/science/article/pii/S0167819102000947) presents two services that they believe are fundamental to any data grid: reliable, high-speed transport and replica management. Their high-speed transport service, GridFTP, extends the popular FTP protocol with new features required for Data Grid applications, such as striping and partial file access and their replica management service integrates a replica catalog with GridFTP transfers to provide for the creation, registration, location, and management of dataset replicas. The article also presents the design of both services and also preliminary performance results and implementations exploit security and other services provided by the Globus Toolkit.&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
Data Import/Export in R: http://cran.r-project.org/doc/manuals/r-devel/R-data.html&lt;br /&gt;
Package ‘rmongodb’ in R (provides an interface to the NoSQL MongoDB database): http://cran.r-project.org/web/packages/rmongodb/ .&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
Example 1: Data Streaming: &lt;br /&gt;
&lt;br /&gt;
&amp;gt; library(&amp;quot;stream&amp;quot;)&lt;br /&gt;
&amp;gt; dsd &amp;lt;- DSD_Gaussians(k=3, d=3, noise=0.05)&lt;br /&gt;
&amp;gt; dsd&lt;br /&gt;
Static Mixture of Gaussians Data Stream&lt;br /&gt;
With 3 clusters in 3 dimensions &lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=5)&lt;br /&gt;
&amp;gt; p&lt;br /&gt;
         V1        V2        V3&lt;br /&gt;
1 0.6930698 0.4082633 0.3857444&lt;br /&gt;
2 0.9086645 0.5545718 0.6942871&lt;br /&gt;
3 0.6031121 0.5288573 0.5795389&lt;br /&gt;
4 0.7590460 0.5485160 0.6484480&lt;br /&gt;
5 0.7249682 0.7327056 0.4891291&lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=100, assignment=TRUE)&lt;br /&gt;
&amp;gt; attr(p, &amp;quot;assignment&amp;quot;)&lt;br /&gt;
  [1]  3  3  3 NA  2  2  2  3  1  2  1  2  2  3  1  1  1  3  3  2  3  1  1  2&lt;br /&gt;
 [25]  3  1  3  3  1  1  3  2  3  3  2 NA  1  1  1  1  1  3  2  2  2  3  1  2&lt;br /&gt;
 [49]  2  2  2  3  1 NA  1  3  2  2  3  3  3  2  1  2  2  2  1  3  1  1  1  2&lt;br /&gt;
 [73]  1  3  2  2  3  1 NA  1  2  1  1  3  3  1  1  2  1  3  3  3  2  3  3  2&lt;br /&gt;
 [97] NA  1  2  1&lt;br /&gt;
&amp;gt; plot(dsd, n=500)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig4.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Example 2: Import of big data: zips (the data would be available at http://media.mongodb.org/zips.json)  import using R/MongoDB:&lt;br /&gt;
Steps. Install the package of ‘rmongodb’ and import data zips, this data is included in the rmongodb package and can be loaded using the command data(zips):&lt;br /&gt;
&lt;br /&gt;
install.package('rmonogodb')&lt;br /&gt;
library(rmongodb)&lt;br /&gt;
data(zips)&lt;br /&gt;
head(zips)&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; install.packages('rmongodb')&lt;br /&gt;
trying URL 'http://cran.mtu.edu/bin/macosx/leopard/contrib/2.15/rmongodb_1.6.5.tgz'&lt;br /&gt;
Content type 'application/x-gzip' length 1291831 bytes (1.2 Mb)&lt;br /&gt;
opened URL&lt;br /&gt;
==================================================&lt;br /&gt;
downloaded 1.2 Mb&lt;br /&gt;
&lt;br /&gt;
The downloaded binary packages are in&lt;br /&gt;
	/var/folders/k6/3r5dstw5385_b4fzt679pmsr0000gn/T//RtmpWD2wiV/downloaded_packages&lt;br /&gt;
&lt;br /&gt;
&amp;gt; head(zips)&lt;br /&gt;
     city         loc       pop   state _id    &lt;br /&gt;
[1,] &amp;quot;ACMAR&amp;quot;      Numeric,2 6055  &amp;quot;AL&amp;quot;  &amp;quot;35004&amp;quot;&lt;br /&gt;
[2,] &amp;quot;ADAMSVILLE&amp;quot; Numeric,2 10616 &amp;quot;AL&amp;quot;  &amp;quot;35005&amp;quot;&lt;br /&gt;
[3,] &amp;quot;ADGER&amp;quot;      Numeric,2 3205  &amp;quot;AL&amp;quot;  &amp;quot;35006&amp;quot;&lt;br /&gt;
[4,] &amp;quot;KEYSTONE&amp;quot;   Numeric,2 14218 &amp;quot;AL&amp;quot;  &amp;quot;35007&amp;quot;&lt;br /&gt;
[5,] &amp;quot;NEW SITE&amp;quot;   Numeric,2 19942 &amp;quot;AL&amp;quot;  &amp;quot;35010&amp;quot;&lt;br /&gt;
[6,] &amp;quot;ALPINE&amp;quot;     Numeric,2 3062  &amp;quot;AL&amp;quot;  &amp;quot;35014&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger http://mirlyn.lib.umich.edu/Record/004199238&lt;br /&gt;
 &lt;br /&gt;
Sampling / Steven K. Thompson. http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
&lt;br /&gt;
Data Handling http://ori.hhs.gov/education/products/n_illinois_u/datamanagement/dhtopic.html&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12990</id>
		<title>SMHS DataManagement</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12990"/>
		<updated>2014-07-31T19:52:16Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Data Management ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Data management comprised all the discipline related to managing data as a valuable resource and it is of significant importance in various fields. It is officially defined as the development and execution of architectures, policies, practices and procedures that properly manage the full data lifecycle needs of an enterprise. There are various ways to manage data. In this lecture, we are going to introduce the fundamental roles of data management in statistics and illustrate commonly used ways and steps in data managements through examples from different areas including tables, streams, cloud, warehouses, DBs, arrays, binary ASC II, handling and mechanics.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The next step after getting data would be to make proper management of the data in hand. Data management is of course a vital step in data analysis and is crucial to the success and reproducibility of a statistical analysis. So how would we do a good data management and what are the commonly used ways of data management? In order to further make good use of the data, we are going to learn more about the area of data management and various ways to implement it. Selection of appropriate tools and efficient use of these tools can save the researcher numerous hours, and allow other researchers to leverage the products of their work. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Tables: one of the most commonly used ways to manage data. It is a means of arranging data in rows and columns. It is of pervasive use throughout all research and data analysis. &lt;br /&gt;
There are two basic types of tables: &lt;br /&gt;
	Simple Table: consider the following example of a table summarizing the data from two groups. The table presents a general comparison of the two groups and shows us a clear picture of the measurements and the comparative characteristics between the two groups. What we learn from the table below: (1) these two groups with the same sample size have the same mean; (2) group 1 has a bigger range of the data values; (3) group 2 has a smaller standard deviation indicating a less variant dataset compared to group 1.&lt;br /&gt;
	Minimum	Maximum	Mean	Standard Deviation	Size &lt;br /&gt;
Group 1	12	45	22	2.6	40&lt;br /&gt;
Group 2	15	30	22	1.5	40&lt;br /&gt;
&lt;br /&gt;
	Multi-dimensional table: consider the F distribution (http://socr.umich.edu/Applets/F_Table.html) where the first row and the column is the degree of freedoms and the data in the middle is the 99% quantiles of F(k,l). This is a two dimensional example and the coordinates or combinations of the basic headers give a unique value attached.&lt;br /&gt;
&lt;br /&gt;
l \ k	1	2	3	4	5&lt;br /&gt;
1	4052.	4999.5	5403.	5625.	5764.&lt;br /&gt;
2	98.50	99.00	99.17	99.25	99.30&lt;br /&gt;
3	34.12	30.82	29.46	28.71	28.24&lt;br /&gt;
4	21.20	18.00	16.69	15.98	15.52&lt;br /&gt;
5	13.27	12.06	11.39	10.97	10.67&lt;br /&gt;
&lt;br /&gt;
3.2) Streams: is also an easy way of data management and it is more visualized with pictures. It is a sequence of data elements made available over time and can be thought as a conveyor belt that allows items to be processed one at a time rather than in large batches. It is a sequence of digitally encoded coherent signals used to transmit or receive information that is in the process of being transmitted. In electronics and computer architecture, it determines for which time which data item is scheduled to enter or leave which port. &lt;br /&gt;
&lt;br /&gt;
From the chart below, we have three apparent observations: (1) pre-dialysis kidney function is associated with patient survival; (2) pre-dialysis kidney function differs by type of dialysis treatment (it is associated with type of dialysis); (3) pre-dialysis kidney function is not in the causal pathway of type of dialysis and survival. And from these three conditions, we can conclude that pre-dialysis kidney function is a potential confounder.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementChart1.png]]&lt;br /&gt;
&lt;br /&gt;
An illustrative example of streaming is wind map (http://hint.fm/wind/), which generates a vivid demonstration of the wind speed over the USA with data streamed live from different resources. We can have a clear picture of the wind range countrywide with streaming.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementFig1.png]]&lt;br /&gt;
&lt;br /&gt;
3.3) Cloud Data Storage: Data cloud storage demands high availability, durability, and scalability from a few bytes to petabytes. Examples of data cloud storage services include Amazon’s S3, which promises a 99.9% monthly availability and 99.999999999% durability per year. This translates into less than an hour outage per month. For an example of durability, assume that a user stores 10,000 objects in a cloud storage, then, on average, the user would expect to lose one object every 10,000,000 years. S3, and other cloud service providers, achieve this reliability by storing data in multiple facilities with error checking and self-healing processes to detect and repair errors and device failures. This process is completely transparent to the user and requires no actions or knowledge of the underlying complexities. Global data-intense service providers like Google and Facebook have the expertise and scale to provide enormous storage and significant reliability and uptime in an efficient/economical way. Many Big Data research projects benefit from using cloud storage services (e.g., umich email, file-sharing, computational services etc.)&lt;br /&gt;
&lt;br /&gt;
3.4) Warehouse: a system used for reporting and data analysis. Integrating data from one or more disparate sources creates a central repository of data, a data warehouse (DW). DW stores current and historical data and are used for creating trending reports for senior management reporting such as annual comparison.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig2.jpg]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.5) DBs: database is an organized collection of data where data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:DataManagementFig3.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
A well-known example would be the pipeline, which utilizes data from the LONI Image Data Archive (IDA). The pipeline takes advantage of the cluster nodes to download files in parallel from the IDA database. (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#IDA)&lt;br /&gt;
This article (https://ida.loni.usc.edu/login.jsp) provides a specific introduction to The LONI Image Data Archive (IDA), which offers an integrated environment for safely archiving, querying, visualizing and sharing neuroimaging data. It facilitates the de-identification and pooling of data from multiple institutions, protecting data from unauthorized access while providing the ability to share data among collaborative investigators. The archive provides flexibility in establishing project metadata, accommodating one or more research groups, sits and others. It’s simple, secure and requires nothing more than a computer with Internet connection and a web browser.&lt;br /&gt;
&lt;br /&gt;
3.6) Arrays: a data structure consisting of a collection of elements, each identified by at least one array index or key. &lt;br /&gt;
Types of arrays:&lt;br /&gt;
	One-dimensional array: a simple example: an array of 8 integer variables with indices 0 through 7 may be sored as 8 words at memory address: {200, 202, 204, 206, 208, 210, 212, 214} which can be memorized as 200+2i.&lt;br /&gt;
	Multidimensional arrays: Data=[■(2&amp;amp;3&amp;amp;0@6&amp;amp;4&amp;amp;5@5&amp;amp;3&amp;amp;1)].&lt;br /&gt;
&lt;br /&gt;
Example: R arrays and data-frames&lt;br /&gt;
&lt;br /&gt;
DF &amp;lt;- data.frame(a = 1:3, b = letters[10:12],&lt;br /&gt;
                 c = seq(as.Date(&amp;quot;2004-01-01&amp;quot;), by = &amp;quot;week&amp;quot;, len = 3),&lt;br /&gt;
                 stringsAsFactors = TRUE)&lt;br /&gt;
	&amp;gt; DF&lt;br /&gt;
  a b          c&lt;br /&gt;
1 1 j 2004-01-01&lt;br /&gt;
2 2 k 2004-01-08&lt;br /&gt;
3 3 l 2004-01-15&lt;br /&gt;
&lt;br /&gt;
data.matrix(DF[1:2])&lt;br /&gt;
data.matrix(DF)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; data.matrix(DF)&lt;br /&gt;
     a b     c&lt;br /&gt;
[1,] 1 1 12418&lt;br /&gt;
[2,] 2 2 12425&lt;br /&gt;
[3,] 3 3 12432&lt;br /&gt;
&lt;br /&gt;
	&amp;gt; sleep 		# sleep dataset&lt;br /&gt;
     extra group ID&lt;br /&gt;
1    0.7     1  1&lt;br /&gt;
2   -1.6     1  2&lt;br /&gt;
3   -0.2     1  3&lt;br /&gt;
4   -1.2     1  4&lt;br /&gt;
5   -0.1     1  5&lt;br /&gt;
6    3.4     1  6&lt;br /&gt;
7    3.7     1  7&lt;br /&gt;
8    0.8     1  8&lt;br /&gt;
9    0.0     1  9&lt;br /&gt;
10   2.0     1 10&lt;br /&gt;
11   1.9     2  1&lt;br /&gt;
12   0.8     2  2&lt;br /&gt;
13   1.1     2  3&lt;br /&gt;
14   0.1     2  4&lt;br /&gt;
15  -0.1     2  5&lt;br /&gt;
16   4.4     2  6&lt;br /&gt;
17   5.5     2  7&lt;br /&gt;
18   1.6     2  8&lt;br /&gt;
19   4.6     2  9&lt;br /&gt;
20   3.4     2 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.7) Binary ASCII:  ASCII, which is short for American Standard Code for Information Interchange is a character-encoding scheme originally based on English alphabet that encodes 128 specified characters – the numbers 0 – 9, the letters a – z and A – Z, some basic punctuation symbols, some control codes that originated with teletype machines and a bland space – into the 7-bit binary integers. It represents text in computers, communications equipment, and other devices that use text. To convert the ASCII code to binary character (part):&lt;br /&gt;
&lt;br /&gt;
Letter	ASCII Code	Binary	Letter	ASC II Code	Binary&lt;br /&gt;
a	097	01100001	A	065	01000001&lt;br /&gt;
b	098	01100010	B	066	01000010&lt;br /&gt;
c	099	01100011	C	067	01000011&lt;br /&gt;
d	100	01100100	D	068	01000100&lt;br /&gt;
e	101	01100101	E	069	01000101&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dec	Hex	Binary&lt;br /&gt;
    0	00	00000000&lt;br /&gt;
    1	01	00000001&lt;br /&gt;
    2	02	00000010&lt;br /&gt;
    3	03	00000011&lt;br /&gt;
    4	04	00000100&lt;br /&gt;
    5	05	00000101&lt;br /&gt;
    6	06	00000110&lt;br /&gt;
    7	07	00000111&lt;br /&gt;
    8	08	00001000&lt;br /&gt;
    9	09	00001001&lt;br /&gt;
  10	0A	00001010&lt;br /&gt;
  11	0B	00001011&lt;br /&gt;
  12	0C	00001100&lt;br /&gt;
  13	0D	00001101&lt;br /&gt;
  14	0E	00001110&lt;br /&gt;
  15	0F	00001111&lt;br /&gt;
  16	10	00010000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.8) Handling: the process of ensuring that the research data is stored, archived or disposed off in a safe and secure manner during and after the conclusion of a research project. This includes the development of policies and procedures to manage data handled electronically as well as through non-electronic means. &lt;br /&gt;
&lt;br /&gt;
	Data handling is important in ensuring the integrity of research data since it addresses concerns related to confidentially, security, and preservation/retention of research data. Proper planning for data handling can also result in efficient and economical storage, retrieval, and disposal of data. In the case of data handled electronically, data integrity is a primary concern to ensure that recorded data is not altered, erased, lost or accessed by unauthorized users.&lt;br /&gt;
&lt;br /&gt;
	Data handling issues encompass both electronic as well as non-electronic systems, such as paper files, journals, and laboratory notebooks. Electronic systems include computer workstations and laptops, personal digital assistants (PDA), storage media such as videotape, diskette, CD, DVD, memory cards, and other electronic instrumentation. These systems may be used for storage, archival, sharing, and disposing off data, and therefore, require adequate planning at the start of a research project so that issues related to data integrity can be analyzed and addressed early on.&lt;br /&gt;
	Issues needed to be considered in ensuring integrity of data handled:&lt;br /&gt;
	Type of data handled and its impact on the environment (especially if it is on a toxic media);&lt;br /&gt;
	Type of media containing data and its storage capacity, handling and storage requirements, reliability, longevity (in the case of degradable medium), retrieval effectiveness, and ease of upgrade to newer media;&lt;br /&gt;
	Data handling responsibilities/privileges, that is, who can handle which portion of data, at what point during the project, for what purpose, etc;&lt;br /&gt;
	Data handling procedures that describe how long the data should be kept, and when, how, and who should handle data for storage, sharing, archival, retrieval and disposal purposes.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://en.wikibooks.org/wiki/OpenClinica_User_Manual) presents a comprehensive introduction to EDC (electronic data capture) in clinical research. It contains a series of guides to help users learn how to use OpenClinica for clinical data management. This user manual serves a perfect introduction to OpenClinica and equips researches with background information, specific data management procedures, study construction and system maintenance for data management in clinical studies.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#XNAT)  talked about issues regarding building the workflow with LONI Pipeline. It introduced dragging and connecting in the modules and how data is managed with pipeline. It also illustrates usage of pipeline with IDA, NDAR, XNAT and the cloud storage it supported. &lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://onlinepubs.trb.org/onlinepubs/nchrp/cd-22/manual/v2chapter2.pdf) presents a general introduction to data management, analysis tools and analysis mechanics. It illustrated the purpose, steps, considerations and useful tools in data management and introduced the specific steps in data handling. It go through the major steps with examples and illustrated the database handling with consideration of the dataset size. This article offers a comprehensive analysis of data management and would be a good start to implement data management.&lt;br /&gt;
&lt;br /&gt;
4.4) This article (http://www.sciencedirect.com/science/article/pii/S0167819102000947) presents two services that they believe are fundamental to any data grid: reliable, high-speed transport and replica management. Their high-speed transport service, GridFTP, extends the popular FTP protocol with new features required for Data Grid applications, such as striping and partial file access and their replica management service integrates a replica catalog with GridFTP transfers to provide for the creation, registration, location, and management of dataset replicas. The article also presents the design of both services and also preliminary performance results and implementations exploit security and other services provided by the Globus Toolkit.&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
Data Import/Export in R: http://cran.r-project.org/doc/manuals/r-devel/R-data.html&lt;br /&gt;
Package ‘rmongodb’ in R (provides an interface to the NoSQL MongoDB database): http://cran.r-project.org/web/packages/rmongodb/ .&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
Example 1: Data Streaming: &lt;br /&gt;
&lt;br /&gt;
&amp;gt; library(&amp;quot;stream&amp;quot;)&lt;br /&gt;
&amp;gt; dsd &amp;lt;- DSD_Gaussians(k=3, d=3, noise=0.05)&lt;br /&gt;
&amp;gt; dsd&lt;br /&gt;
Static Mixture of Gaussians Data Stream&lt;br /&gt;
With 3 clusters in 3 dimensions &lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=5)&lt;br /&gt;
&amp;gt; p&lt;br /&gt;
         V1        V2        V3&lt;br /&gt;
1 0.6930698 0.4082633 0.3857444&lt;br /&gt;
2 0.9086645 0.5545718 0.6942871&lt;br /&gt;
3 0.6031121 0.5288573 0.5795389&lt;br /&gt;
4 0.7590460 0.5485160 0.6484480&lt;br /&gt;
5 0.7249682 0.7327056 0.4891291&lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=100, assignment=TRUE)&lt;br /&gt;
&amp;gt; attr(p, &amp;quot;assignment&amp;quot;)&lt;br /&gt;
  [1]  3  3  3 NA  2  2  2  3  1  2  1  2  2  3  1  1  1  3  3  2  3  1  1  2&lt;br /&gt;
 [25]  3  1  3  3  1  1  3  2  3  3  2 NA  1  1  1  1  1  3  2  2  2  3  1  2&lt;br /&gt;
 [49]  2  2  2  3  1 NA  1  3  2  2  3  3  3  2  1  2  2  2  1  3  1  1  1  2&lt;br /&gt;
 [73]  1  3  2  2  3  1 NA  1  2  1  1  3  3  1  1  2  1  3  3  3  2  3  3  2&lt;br /&gt;
 [97] NA  1  2  1&lt;br /&gt;
&amp;gt; plot(dsd, n=500)&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementFig4.png]]&lt;br /&gt;
&lt;br /&gt;
Example 2: Import of big data: zips (the data would be available at http://media.mongodb.org/zips.json)  import using R/MongoDB:&lt;br /&gt;
Steps. Install the package of ‘rmongodb’ and import data zips, this data is included in the rmongodb package and can be loaded using the command data(zips):&lt;br /&gt;
&lt;br /&gt;
install.package('rmonogodb')&lt;br /&gt;
library(rmongodb)&lt;br /&gt;
data(zips)&lt;br /&gt;
head(zips)&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; install.packages('rmongodb')&lt;br /&gt;
trying URL 'http://cran.mtu.edu/bin/macosx/leopard/contrib/2.15/rmongodb_1.6.5.tgz'&lt;br /&gt;
Content type 'application/x-gzip' length 1291831 bytes (1.2 Mb)&lt;br /&gt;
opened URL&lt;br /&gt;
==================================================&lt;br /&gt;
downloaded 1.2 Mb&lt;br /&gt;
&lt;br /&gt;
The downloaded binary packages are in&lt;br /&gt;
	/var/folders/k6/3r5dstw5385_b4fzt679pmsr0000gn/T//RtmpWD2wiV/downloaded_packages&lt;br /&gt;
&lt;br /&gt;
&amp;gt; head(zips)&lt;br /&gt;
     city         loc       pop   state _id    &lt;br /&gt;
[1,] &amp;quot;ACMAR&amp;quot;      Numeric,2 6055  &amp;quot;AL&amp;quot;  &amp;quot;35004&amp;quot;&lt;br /&gt;
[2,] &amp;quot;ADAMSVILLE&amp;quot; Numeric,2 10616 &amp;quot;AL&amp;quot;  &amp;quot;35005&amp;quot;&lt;br /&gt;
[3,] &amp;quot;ADGER&amp;quot;      Numeric,2 3205  &amp;quot;AL&amp;quot;  &amp;quot;35006&amp;quot;&lt;br /&gt;
[4,] &amp;quot;KEYSTONE&amp;quot;   Numeric,2 14218 &amp;quot;AL&amp;quot;  &amp;quot;35007&amp;quot;&lt;br /&gt;
[5,] &amp;quot;NEW SITE&amp;quot;   Numeric,2 19942 &amp;quot;AL&amp;quot;  &amp;quot;35010&amp;quot;&lt;br /&gt;
[6,] &amp;quot;ALPINE&amp;quot;     Numeric,2 3062  &amp;quot;AL&amp;quot;  &amp;quot;35014&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger http://mirlyn.lib.umich.edu/Record/004199238&lt;br /&gt;
 &lt;br /&gt;
Sampling / Steven K. Thompson. http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
&lt;br /&gt;
Data Handling http://ori.hhs.gov/education/products/n_illinois_u/datamanagement/dhtopic.html&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12987</id>
		<title>SMHS DataManagement</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=12987"/>
		<updated>2014-07-31T19:44:50Z</updated>

		<summary type="html">&lt;p&gt;Mwolvie: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Data Management ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Data management comprised all the discipline related to managing data as a valuable resource and it is of significant importance in various fields. It is officially defined as the development and execution of architectures, policies, practices and procedures that properly manage the full data lifecycle needs of an enterprise. There are various ways to manage data. In this lecture, we are going to introduce the fundamental roles of data management in statistics and illustrate commonly used ways and steps in data managements through examples from different areas including tables, streams, cloud, warehouses, DBs, arrays, binary ASC II, handling and mechanics.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The next step after getting data would be to make proper management of the data in hand. Data management is of course a vital step in data analysis and is crucial to the success and reproducibility of a statistical analysis. So how would we do a good data management and what are the commonly used ways of data management? In order to further make good use of the data, we are going to learn more about the area of data management and various ways to implement it. Selection of appropriate tools and efficient use of these tools can save the researcher numerous hours, and allow other researchers to leverage the products of their work. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
3.1) Tables: one of the most commonly used ways to manage data. It is a means of arranging data in rows and columns. It is of pervasive use throughout all research and data analysis. &lt;br /&gt;
There are two basic types of tables: &lt;br /&gt;
	Simple Table: consider the following example of a table summarizing the data from two groups. The table presents a general comparison of the two groups and shows us a clear picture of the measurements and the comparative characteristics between the two groups. What we learn from the table below: (1) these two groups with the same sample size have the same mean; (2) group 1 has a bigger range of the data values; (3) group 2 has a smaller standard deviation indicating a less variant dataset compared to group 1.&lt;br /&gt;
	Minimum	Maximum	Mean	Standard Deviation	Size &lt;br /&gt;
Group 1	12	45	22	2.6	40&lt;br /&gt;
Group 2	15	30	22	1.5	40&lt;br /&gt;
&lt;br /&gt;
	Multi-dimensional table: consider the F distribution (http://socr.umich.edu/Applets/F_Table.html) where the first row and the column is the degree of freedoms and the data in the middle is the 99% quantiles of F(k,l). This is a two dimensional example and the coordinates or combinations of the basic headers give a unique value attached.&lt;br /&gt;
&lt;br /&gt;
l \ k	1	2	3	4	5&lt;br /&gt;
1	4052.	4999.5	5403.	5625.	5764.&lt;br /&gt;
2	98.50	99.00	99.17	99.25	99.30&lt;br /&gt;
3	34.12	30.82	29.46	28.71	28.24&lt;br /&gt;
4	21.20	18.00	16.69	15.98	15.52&lt;br /&gt;
5	13.27	12.06	11.39	10.97	10.67&lt;br /&gt;
&lt;br /&gt;
3.2) Streams: is also an easy way of data management and it is more visualized with pictures. It is a sequence of data elements made available over time and can be thought as a conveyor belt that allows items to be processed one at a time rather than in large batches. It is a sequence of digitally encoded coherent signals used to transmit or receive information that is in the process of being transmitted. In electronics and computer architecture, it determines for which time which data item is scheduled to enter or leave which port. &lt;br /&gt;
&lt;br /&gt;
From the chart below, we have three apparent observations: (1) pre-dialysis kidney function is associated with patient survival; (2) pre-dialysis kidney function differs by type of dialysis treatment (it is associated with type of dialysis); (3) pre-dialysis kidney function is not in the causal pathway of type of dialysis and survival. And from these three conditions, we can conclude that pre-dialysis kidney function is a potential confounder.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementChart1.png]]&lt;br /&gt;
&lt;br /&gt;
An illustrative example of streaming is wind map (http://hint.fm/wind/), which generates a vivid demonstration of the wind speed over the USA with data streamed live from different resources. We can have a clear picture of the wind range countrywide with streaming.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementFig1.png]]&lt;br /&gt;
&lt;br /&gt;
3.3) Cloud Data Storage: Data cloud storage demands high availability, durability, and scalability from a few bytes to petabytes. Examples of data cloud storage services include Amazon’s S3, which promises a 99.9% monthly availability and 99.999999999% durability per year. This translates into less than an hour outage per month. For an example of durability, assume that a user stores 10,000 objects in a cloud storage, then, on average, the user would expect to lose one object every 10,000,000 years. S3, and other cloud service providers, achieve this reliability by storing data in multiple facilities with error checking and self-healing processes to detect and repair errors and device failures. This process is completely transparent to the user and requires no actions or knowledge of the underlying complexities. Global data-intense service providers like Google and Facebook have the expertise and scale to provide enormous storage and significant reliability and uptime in an efficient/economical way. Many Big Data research projects benefit from using cloud storage services (e.g., umich email, file-sharing, computational services etc.)&lt;br /&gt;
&lt;br /&gt;
3.4) Warehouse: a system used for reporting and data analysis. Integrating data from one or more disparate sources creates a central repository of data, a data warehouse (DW). DW stores current and historical data and are used for creating trending reports for senior management reporting such as annual comparison.&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementFig2.jpg]]&lt;br /&gt;
&lt;br /&gt;
3.5) DBs: database is an organized collection of data where data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. &lt;br /&gt;
 &lt;br /&gt;
[[File:DataManagementFig3.png]]&lt;br /&gt;
&lt;br /&gt;
A well-known example would be the pipeline, which utilizes data from the LONI Image Data Archive (IDA). The pipeline takes advantage of the cluster nodes to download files in parallel from the IDA database. (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#IDA)&lt;br /&gt;
This article (https://ida.loni.usc.edu/login.jsp) provides a specific introduction to The LONI Image Data Archive (IDA), which offers an integrated environment for safely archiving, querying, visualizing and sharing neuroimaging data. It facilitates the de-identification and pooling of data from multiple institutions, protecting data from unauthorized access while providing the ability to share data among collaborative investigators. The archive provides flexibility in establishing project metadata, accommodating one or more research groups, sits and others. It’s simple, secure and requires nothing more than a computer with Internet connection and a web browser.&lt;br /&gt;
&lt;br /&gt;
3.6) Arrays: a data structure consisting of a collection of elements, each identified by at least one array index or key. &lt;br /&gt;
Types of arrays:&lt;br /&gt;
	One-dimensional array: a simple example: an array of 8 integer variables with indices 0 through 7 may be sored as 8 words at memory address: {200, 202, 204, 206, 208, 210, 212, 214} which can be memorized as 200+2i.&lt;br /&gt;
	Multidimensional arrays: Data=[■(2&amp;amp;3&amp;amp;0@6&amp;amp;4&amp;amp;5@5&amp;amp;3&amp;amp;1)].&lt;br /&gt;
&lt;br /&gt;
Example: R arrays and data-frames&lt;br /&gt;
&lt;br /&gt;
DF &amp;lt;- data.frame(a = 1:3, b = letters[10:12],&lt;br /&gt;
                 c = seq(as.Date(&amp;quot;2004-01-01&amp;quot;), by = &amp;quot;week&amp;quot;, len = 3),&lt;br /&gt;
                 stringsAsFactors = TRUE)&lt;br /&gt;
	&amp;gt; DF&lt;br /&gt;
  a b          c&lt;br /&gt;
1 1 j 2004-01-01&lt;br /&gt;
2 2 k 2004-01-08&lt;br /&gt;
3 3 l 2004-01-15&lt;br /&gt;
&lt;br /&gt;
data.matrix(DF[1:2])&lt;br /&gt;
data.matrix(DF)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; data.matrix(DF)&lt;br /&gt;
     a b     c&lt;br /&gt;
[1,] 1 1 12418&lt;br /&gt;
[2,] 2 2 12425&lt;br /&gt;
[3,] 3 3 12432&lt;br /&gt;
&lt;br /&gt;
	&amp;gt; sleep 		# sleep dataset&lt;br /&gt;
     extra group ID&lt;br /&gt;
1    0.7     1  1&lt;br /&gt;
2   -1.6     1  2&lt;br /&gt;
3   -0.2     1  3&lt;br /&gt;
4   -1.2     1  4&lt;br /&gt;
5   -0.1     1  5&lt;br /&gt;
6    3.4     1  6&lt;br /&gt;
7    3.7     1  7&lt;br /&gt;
8    0.8     1  8&lt;br /&gt;
9    0.0     1  9&lt;br /&gt;
10   2.0     1 10&lt;br /&gt;
11   1.9     2  1&lt;br /&gt;
12   0.8     2  2&lt;br /&gt;
13   1.1     2  3&lt;br /&gt;
14   0.1     2  4&lt;br /&gt;
15  -0.1     2  5&lt;br /&gt;
16   4.4     2  6&lt;br /&gt;
17   5.5     2  7&lt;br /&gt;
18   1.6     2  8&lt;br /&gt;
19   4.6     2  9&lt;br /&gt;
20   3.4     2 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.7) Binary ASCII:  ASCII, which is short for American Standard Code for Information Interchange is a character-encoding scheme originally based on English alphabet that encodes 128 specified characters – the numbers 0 – 9, the letters a – z and A – Z, some basic punctuation symbols, some control codes that originated with teletype machines and a bland space – into the 7-bit binary integers. It represents text in computers, communications equipment, and other devices that use text. To convert the ASCII code to binary character (part):&lt;br /&gt;
&lt;br /&gt;
Letter	ASCII Code	Binary	Letter	ASC II Code	Binary&lt;br /&gt;
a	097	01100001	A	065	01000001&lt;br /&gt;
b	098	01100010	B	066	01000010&lt;br /&gt;
c	099	01100011	C	067	01000011&lt;br /&gt;
d	100	01100100	D	068	01000100&lt;br /&gt;
e	101	01100101	E	069	01000101&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dec	Hex	Binary&lt;br /&gt;
    0	00	00000000&lt;br /&gt;
    1	01	00000001&lt;br /&gt;
    2	02	00000010&lt;br /&gt;
    3	03	00000011&lt;br /&gt;
    4	04	00000100&lt;br /&gt;
    5	05	00000101&lt;br /&gt;
    6	06	00000110&lt;br /&gt;
    7	07	00000111&lt;br /&gt;
    8	08	00001000&lt;br /&gt;
    9	09	00001001&lt;br /&gt;
  10	0A	00001010&lt;br /&gt;
  11	0B	00001011&lt;br /&gt;
  12	0C	00001100&lt;br /&gt;
  13	0D	00001101&lt;br /&gt;
  14	0E	00001110&lt;br /&gt;
  15	0F	00001111&lt;br /&gt;
  16	10	00010000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.8) Handling: the process of ensuring that the research data is stored, archived or disposed off in a safe and secure manner during and after the conclusion of a research project. This includes the development of policies and procedures to manage data handled electronically as well as through non-electronic means. &lt;br /&gt;
&lt;br /&gt;
	Data handling is important in ensuring the integrity of research data since it addresses concerns related to confidentially, security, and preservation/retention of research data. Proper planning for data handling can also result in efficient and economical storage, retrieval, and disposal of data. In the case of data handled electronically, data integrity is a primary concern to ensure that recorded data is not altered, erased, lost or accessed by unauthorized users.&lt;br /&gt;
&lt;br /&gt;
	Data handling issues encompass both electronic as well as non-electronic systems, such as paper files, journals, and laboratory notebooks. Electronic systems include computer workstations and laptops, personal digital assistants (PDA), storage media such as videotape, diskette, CD, DVD, memory cards, and other electronic instrumentation. These systems may be used for storage, archival, sharing, and disposing off data, and therefore, require adequate planning at the start of a research project so that issues related to data integrity can be analyzed and addressed early on.&lt;br /&gt;
	Issues needed to be considered in ensuring integrity of data handled:&lt;br /&gt;
	Type of data handled and its impact on the environment (especially if it is on a toxic media);&lt;br /&gt;
	Type of media containing data and its storage capacity, handling and storage requirements, reliability, longevity (in the case of degradable medium), retrieval effectiveness, and ease of upgrade to newer media;&lt;br /&gt;
	Data handling responsibilities/privileges, that is, who can handle which portion of data, at what point during the project, for what purpose, etc;&lt;br /&gt;
	Data handling procedures that describe how long the data should be kept, and when, how, and who should handle data for storage, sharing, archival, retrieval and disposal purposes.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
4.1) This article (http://en.wikibooks.org/wiki/OpenClinica_User_Manual) presents a comprehensive introduction to EDC (electronic data capture) in clinical research. It contains a series of guides to help users learn how to use OpenClinica for clinical data management. This user manual serves a perfect introduction to OpenClinica and equips researches with background information, specific data management procedures, study construction and system maintenance for data management in clinical studies.&lt;br /&gt;
&lt;br /&gt;
4.2) This article (http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#XNAT)  talked about issues regarding building the workflow with LONI Pipeline. It introduced dragging and connecting in the modules and how data is managed with pipeline. It also illustrates usage of pipeline with IDA, NDAR, XNAT and the cloud storage it supported. &lt;br /&gt;
&lt;br /&gt;
4.3) This article (http://onlinepubs.trb.org/onlinepubs/nchrp/cd-22/manual/v2chapter2.pdf) presents a general introduction to data management, analysis tools and analysis mechanics. It illustrated the purpose, steps, considerations and useful tools in data management and introduced the specific steps in data handling. It go through the major steps with examples and illustrated the database handling with consideration of the dataset size. This article offers a comprehensive analysis of data management and would be a good start to implement data management.&lt;br /&gt;
&lt;br /&gt;
4.4) This article (http://www.sciencedirect.com/science/article/pii/S0167819102000947) presents two services that they believe are fundamental to any data grid: reliable, high-speed transport and replica management. Their high-speed transport service, GridFTP, extends the popular FTP protocol with new features required for Data Grid applications, such as striping and partial file access and their replica management service integrates a replica catalog with GridFTP transfers to provide for the creation, registration, location, and management of dataset replicas. The article also presents the design of both services and also preliminary performance results and implementations exploit security and other services provided by the Globus Toolkit.&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
Data Import/Export in R: http://cran.r-project.org/doc/manuals/r-devel/R-data.html&lt;br /&gt;
Package ‘rmongodb’ in R (provides an interface to the NoSQL MongoDB database): http://cran.r-project.org/web/packages/rmongodb/ .&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
Example 1: Data Streaming: &lt;br /&gt;
&lt;br /&gt;
&amp;gt; library(&amp;quot;stream&amp;quot;)&lt;br /&gt;
&amp;gt; dsd &amp;lt;- DSD_Gaussians(k=3, d=3, noise=0.05)&lt;br /&gt;
&amp;gt; dsd&lt;br /&gt;
Static Mixture of Gaussians Data Stream&lt;br /&gt;
With 3 clusters in 3 dimensions &lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=5)&lt;br /&gt;
&amp;gt; p&lt;br /&gt;
         V1        V2        V3&lt;br /&gt;
1 0.6930698 0.4082633 0.3857444&lt;br /&gt;
2 0.9086645 0.5545718 0.6942871&lt;br /&gt;
3 0.6031121 0.5288573 0.5795389&lt;br /&gt;
4 0.7590460 0.5485160 0.6484480&lt;br /&gt;
5 0.7249682 0.7327056 0.4891291&lt;br /&gt;
&amp;gt; p &amp;lt;- get_points(dsd, n=100, assignment=TRUE)&lt;br /&gt;
&amp;gt; attr(p, &amp;quot;assignment&amp;quot;)&lt;br /&gt;
  [1]  3  3  3 NA  2  2  2  3  1  2  1  2  2  3  1  1  1  3  3  2  3  1  1  2&lt;br /&gt;
 [25]  3  1  3  3  1  1  3  2  3  3  2 NA  1  1  1  1  1  3  2  2  2  3  1  2&lt;br /&gt;
 [49]  2  2  2  3  1 NA  1  3  2  2  3  3  3  2  1  2  2  2  1  3  1  1  1  2&lt;br /&gt;
 [73]  1  3  2  2  3  1 NA  1  2  1  1  3  3  1  1  2  1  3  3  3  2  3  3  2&lt;br /&gt;
 [97] NA  1  2  1&lt;br /&gt;
&amp;gt; plot(dsd, n=500)&lt;br /&gt;
&lt;br /&gt;
[[File:DataManagementFig4.png]]&lt;br /&gt;
&lt;br /&gt;
Example 2: Import of big data: zips (the data would be available at http://media.mongodb.org/zips.json)  import using R/MongoDB:&lt;br /&gt;
Steps. Install the package of ‘rmongodb’ and import data zips, this data is included in the rmongodb package and can be loaded using the command data(zips):&lt;br /&gt;
&lt;br /&gt;
install.package('rmonogodb')&lt;br /&gt;
library(rmongodb)&lt;br /&gt;
data(zips)&lt;br /&gt;
head(zips)&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; install.packages('rmongodb')&lt;br /&gt;
trying URL 'http://cran.mtu.edu/bin/macosx/leopard/contrib/2.15/rmongodb_1.6.5.tgz'&lt;br /&gt;
Content type 'application/x-gzip' length 1291831 bytes (1.2 Mb)&lt;br /&gt;
opened URL&lt;br /&gt;
==================================================&lt;br /&gt;
downloaded 1.2 Mb&lt;br /&gt;
&lt;br /&gt;
The downloaded binary packages are in&lt;br /&gt;
	/var/folders/k6/3r5dstw5385_b4fzt679pmsr0000gn/T//RtmpWD2wiV/downloaded_packages&lt;br /&gt;
&lt;br /&gt;
&amp;gt; head(zips)&lt;br /&gt;
     city         loc       pop   state _id    &lt;br /&gt;
[1,] &amp;quot;ACMAR&amp;quot;      Numeric,2 6055  &amp;quot;AL&amp;quot;  &amp;quot;35004&amp;quot;&lt;br /&gt;
[2,] &amp;quot;ADAMSVILLE&amp;quot; Numeric,2 10616 &amp;quot;AL&amp;quot;  &amp;quot;35005&amp;quot;&lt;br /&gt;
[3,] &amp;quot;ADGER&amp;quot;      Numeric,2 3205  &amp;quot;AL&amp;quot;  &amp;quot;35006&amp;quot;&lt;br /&gt;
[4,] &amp;quot;KEYSTONE&amp;quot;   Numeric,2 14218 &amp;quot;AL&amp;quot;  &amp;quot;35007&amp;quot;&lt;br /&gt;
[5,] &amp;quot;NEW SITE&amp;quot;   Numeric,2 19942 &amp;quot;AL&amp;quot;  &amp;quot;35010&amp;quot;&lt;br /&gt;
[6,] &amp;quot;ALPINE&amp;quot;     Numeric,2 3062  &amp;quot;AL&amp;quot;  &amp;quot;35014&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Statistical inference / George Casella, Roger L. Berger http://mirlyn.lib.umich.edu/Record/004199238&lt;br /&gt;
 &lt;br /&gt;
Sampling / Steven K. Thompson. http://mirlyn.lib.umich.edu/Record/004232056 &lt;br /&gt;
&lt;br /&gt;
Sampling theory and methods / S. Sampath.  http://mirlyn.lib.umich.edu/Record/004133572 &lt;br /&gt;
&lt;br /&gt;
Data Handling http://ori.hhs.gov/education/products/n_illinois_u/datamanagement/dhtopic.html&lt;/div&gt;</summary>
		<author><name>Mwolvie</name></author>
		
	</entry>
</feed>