<?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=Liyufang</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=Liyufang"/>
	<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php/Special:Contributions/Liyufang"/>
	<updated>2026-07-14T09:19:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_CIs&amp;diff=13580</id>
		<title>SMHS CIs</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_CIs&amp;diff=13580"/>
		<updated>2014-08-29T18:54:16Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Point and Interval Estimation: MoM and MLE ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Estimation of population parameters is critical in many applications. In statistics, estimation uses a combination of effect sizes, confidence intervals, and meta-analysis to plan experiments, analyze data and interpret results. It is most frequently carried in terms of point-estimates or interval estimates for population parameters that are of interest. This lesson aims to study the various methodologies commonly used in point and interval estimates like Method of Moments (MOM), Maximum Likelihood Estimation (MLE). We are interested in looking at ways in estimation of a population based on the sample distribution and illustrated on point and interval estimation of population mean, proportion, and variance using methods introduced in this class.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
Suppose we wanted to estimate the probability of a head of flipping a specific coin by repeating the experiment several times. How much confidence are we in our estimation? There are a number of other similar situations where we need to evaluate, predict or estimate a population parameter of interest using an observed data sample. The method of moments (MOM) and maximum likelihood estimation (MLE) are among the most commonly used methods to estimate various population parameters. &lt;br /&gt;
&lt;br /&gt;
In point and interval estimation, not only do we need to consider the distribution and model the estimates are based on, we also need to make assumptions in terms of the population distribution. Also, the estimates of parameters are influenced by other parameters of the population. For example, the estimate of the mean of the population is influenced by parameters like variance and sample size.&lt;br /&gt;
&lt;br /&gt;
Confidence interval is a type of interval that contains the true value of a parameter of interest for $(1-α)100%$ of sample taken is called a %(1-α)100%% confidence interval for that parameter, and the ends of the CI are called confidence limits. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
====Method of Moments (MOM) Estimation====&lt;br /&gt;
This method uses the sample data to calculate some sample moments and then sets these equal to their corresponding population counterparts. Steps: &lt;br /&gt;
# Determine the k parameters of interest and the specific distribution for this process; &lt;br /&gt;
# Compute the first $k$ (or more) sample moments; &lt;br /&gt;
# Set the sample moments equal to the population moments and solve for a (linear or non-linear) system of $k$ equations with $k$ unknowns.&lt;br /&gt;
	&lt;br /&gt;
* MOM proportion example: consider the example of flipping a coin 10 times and recording the outcomes of heads and tails. We use the outcomes to infer the true probability of a head ($p=P(Head)$). Suppose we observe the outcome of $\{H,T,T,T,T,H,H,T,H,T\}$. With MOM we have: this is a [[SMHS_ProbabilityDistributions#Binomial_distribution |Binomial experiment]] and $E[X]=np$. $X$ is the number of heads in the experiment. Hence, $np=4$, $MOM(p)=p = \frac{4}{10}$.&lt;br /&gt;
&lt;br /&gt;
* MOM Beta distribution example: Suppose we have 10 observations we suspect came from a [http://www.distributome.org/js/calc/BetaCalculator.html Beta distribution]. &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;
! Data||0.055||1.005||0.075||0.005||0.075||1.005||0.005||0.035||0.225&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The beta distribution mean and variance are defined explicitly in terms of two parameters.&lt;br /&gt;
* Mean: $μ=\frac{α}{α+β}$, &lt;br /&gt;
* Variance: $σ^2=\frac{αβ}{(α+β)^2 (α+β+1)}$.&lt;br /&gt;
&lt;br /&gt;
The sample mean and sample variance are $\bar{x} = 0.251$, and $s^2=0.6187$. Solve for α and β.&lt;br /&gt;
&lt;br /&gt;
====Maximum likelihood estimation (MLE)====&lt;br /&gt;
Modeling distribution parameters using MLE estimation based on observed real world data offers a way of tuning the free parameters of the model to provide an optimum fit. &lt;br /&gt;
	&lt;br /&gt;
Suppose we observe a sample $x_1,x_2,…,x_n$ of $n$ values from one distribution with probability density/mass function $f_θ$, and we are trying to estimate the parameter $θ$. We can compute the (multivariate) probability density associated with our observed data, $f_θ (x_1,x_2,…,x_n│θ)$. As a function of $θ$ with $x_1,x_2,…,x_n$ fixed, the likelihood function is &lt;br /&gt;
$$L(θ)=f_θ (x_1,x_2,…,x_n│θ).$$&lt;br /&gt;
&lt;br /&gt;
The MLE of $θ$ is the value of $θ$ that maximizes $L(θ)$: $\arg\max_θ{L(θ)}.$&lt;br /&gt;
&lt;br /&gt;
It is typically assumed that the observed data are independent and identically distributed (iid) with unknown parameter $θ$. The likelihood can be written as a product of n univariate probability densities: $L(θ)=\prod_{i=1}^n {f_θ (x_i |θ)}$ and since maxima are unaffected by monotone transformations and one can take the logarithm of this expression to turn it into a sum: $L^* (θ)=\sum_{i=1}^n {\ln{f_θ (x_i |θ)}}$. The maximum of this expression can then be found numerically using various optimization algorithms. &lt;br /&gt;
&lt;br /&gt;
* Note: The MLE may not be unique, or guaranteed to exist.&lt;br /&gt;
&lt;br /&gt;
* Example: consider the coin flipping example above, observing the number of heads in the outcomes and using this to infer the true probability of p(Head). &lt;br /&gt;
: Likelihood function: $L(θ)=f(x│θ=p)={10 \choose 4} p^4 (1-p)^6$&lt;br /&gt;
: Log-likelihood function: $L^* (θ)=\ln{10 \choose 4} + 4\ln{p} + 6\ln{(1-p)}$.&lt;br /&gt;
: Maximize the log-likelihood function by setting its first derivative to zero: &lt;br /&gt;
$$ 0=\frac{d(\ln{10 \choose 4} + 4\ln{p} + 6\ln{(1-p))}}{dp} =4/p-6/(1-p), p=2/5.$$&lt;br /&gt;
&lt;br /&gt;
====MOM vs. MLE====&lt;br /&gt;
* The MOM is inferior to Fisher’s MLE method, because MLE have higher probability of being close to the quantities to be estimated. &lt;br /&gt;
* MLE may be intractable in some situations, whereas the MOM estimates can be quickly and easily calculated by hand or using a computer.&lt;br /&gt;
* MOM estimates may be used as the first approximations to the solutions of the MLE method, and successive improved approximations may then be found by the [http://en.wikipedia.org/wiki/Newton-Raphson_method Newton-Raphson method]. In this respect, the MOM and MLE are symbiotic.&lt;br /&gt;
* Sometimes, MOM estimates may be outside of the parameter space, i.e., they are unreliable, which is never a problem with ML method.&lt;br /&gt;
* MOM estimates are not necessarily sufficient statistics, i.e., they sometimes fail to take into account all relevant information in the sample.&lt;br /&gt;
* MOM may be preferred to MLE for estimating some structural parameters, when appropriate probability distributions are unknown.&lt;br /&gt;
&lt;br /&gt;
===Student’s T Distribution===&lt;br /&gt;
The distribution needed to estimate the mean of a normally distributed population when the sample size is small and the population variance is unknown. It is the basis of the popular Student’s t-tests for the statistical significance of the difference between two sample means, and for confidence intervals for the difference between two population means.&lt;br /&gt;
&lt;br /&gt;
Suppose $X_1,X_2,…,X_n$ are independent random variables that are normally distributed with expected value $μ$ and variance $σ^2$.  Sample mean: $\bar{x}_n = \frac{1}{n} \sum_{i=1}^n{x_i}$. Sample variance: $S_n^2=\frac{1}{n} \sum_{i=1}^n{(x_i-\bar{x})^2}$, $Z=\frac{\bar{x}_n-\mu}{\frac{\sigma}{\sqrt{n}}}$ is normally distributed with mean 0 and variance 1, since the sample mean ($\bar{x}_n$) is normally distributed with mean μ and standard deviation $\frac{\sigma}{\sqrt{n}}$. &lt;br /&gt;
$$Z=\frac{\bar{x}_n-\mu}{\frac{\sigma}{\sqrt{n}}}$$&lt;br /&gt;
$$T=\frac{\bar{x}_n-\mu}{\frac{S_n}{\sqrt{n}}}$$&lt;br /&gt;
&lt;br /&gt;
T replaces $\sigma$ with with sample standard deviation. Also, $(n-1) \frac{S_n^2}{\sigma^2}$ has a [[AP_Statistics_Curriculum_2007_Chi-Square|Chi-square distribution]] $\chi_{n-1}^2$ with degree of freedom equal to $n-1$.&lt;br /&gt;
	&lt;br /&gt;
* Example: suppose a research involves 25 patients and relative measurements are recorded: &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;
| Variable ||N || N* || Mean ||SE of Mean||StDev ||Minimum ||  Q1|| Median ||  Q3 ||Maximum&lt;br /&gt;
|-&lt;br /&gt;
| CD4 || 25|| 0 ||321.4||  14.8 || 73.8 ||208.0 ||261.5 || 325.0 ||394.0 || 449.0&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do we know from the background information?&lt;br /&gt;
: $\bar{y}= 321.4$&lt;br /&gt;
: $s = 73.8$&lt;br /&gt;
: $SE = 14.8$&lt;br /&gt;
: $n = 25$&lt;br /&gt;
&lt;br /&gt;
: $CI(\alpha)=CI(0.05)$: $\bar{y} \pm t_{\alpha\over 2} {1\over \sqrt{n}} \sqrt{\sum_{i=1}^n{\frac{(x_i-\bar{x})^2}{n-1}}}.$&lt;br /&gt;
&lt;br /&gt;
: $321.4 \pm t_{(24, 0.025)}{73.8\over \sqrt{25}}$&lt;br /&gt;
: $321.4 \pm 2.064\times 14.8$&lt;br /&gt;
: $[290.85, 351.95]$&lt;br /&gt;
&lt;br /&gt;
====Estimating a population mean with large samples====&lt;br /&gt;
We use the following protocol to find point and interval estimates when the sample sizes are large, say exceeding 100.&lt;br /&gt;
* Assumptions: The [[SMHS_CLT_LLN|Central Limit Theorem]] guarantees that for large samples, the method above provides a valid recipe for constructing a confidence interval for the population mean, no matter what the distribution for the observed data may be. Of course, for significantly non-Normal distributions, we may need to increase the sample size to guarantee that the sampling distribution of the mean is approximately Normal.&lt;br /&gt;
&lt;br /&gt;
* Point estimation of population mean: $\bar{X_n}={1\over n}\sum_{i=1}^n{X_i}$, constructed from a random sample of the process {$X_1, X_2, X_3, \cdots , X_n$}, which is an [http://en.wikipedia.org/wiki/Estimator_bias unbiased] estimate of the population mean $\mu$, if it exists! Note that the [[AP_Statistics_Curriculum_2007_EDA_Center | sample average may be susceptible to outliers]].&lt;br /&gt;
&lt;br /&gt;
* Interval estimation of a population mean: Choose a confidence level &amp;lt;math&amp;gt;(1-\alpha)100%&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; is small (e.g., 0.1, 0.05, 0.025, 0.01, 0.001, etc.). Then a &amp;lt;math&amp;gt;(1-\alpha)100%&amp;lt;/math&amp;gt; confidence interval for &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; will be &lt;br /&gt;
: &amp;lt;math&amp;gt;CI(\alpha): \overline{x} \pm z_{\alpha\over 2} E,&amp;lt;/math&amp;gt;&lt;br /&gt;
:: The '''Error''' term, E, is defined as &lt;br /&gt;
:: &amp;lt;math&amp;gt;E = \begin{cases}{\sigma\over\sqrt{n}},&amp;amp; \texttt{for-known}-\sigma,\\&lt;br /&gt;
{SE},&amp;amp; \texttt{for-unknown}-\sigma.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
:: The '''Standard Error''' of the estimated &amp;lt;math&amp;gt;\overline {x}&amp;lt;/math&amp;gt; is obtained by replacing the unknown population standard deviation by the sample standard deviation:&lt;br /&gt;
&amp;lt;math&amp;gt;SE(\overline {x}) = {1\over \sqrt{n}} \sqrt{\sum_{i=1}^n{(x_i-\overline{x})^2\over n-1}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;z_{\alpha\over 2}&amp;lt;/math&amp;gt; is the [[AP_Statistics_Curriculum_2007_Normal_Critical | Critical Value]] for a [[AP_Statistics_Curriculum_2007_Normal_Std |Standard Normal]] distribution at &amp;lt;math&amp;gt;{\alpha\over 2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Example: a random sample of the number of sentences found in 30 magazine advertisements is listed below. Use this sample to find point estimate for the population mean μ. Samples: 16, 9, 14, 11, 17, 12, 99, 18, 13, 12, 5, 9, 17, 6, 11, 17, 18, 20, 6, 14, 7, 11, 12, 5, 18, 6, 4, 13, 11, 12. Suppose the point estimate is 12.25.&lt;br /&gt;
A confidence interval estimate of μ is a range of values used to estimate a population parameter.&lt;br /&gt;
** Known variance: Suppose that we know the variance for the ''number of sentences per advertisement'' example above is known to be 256 (so the population standard deviation is &amp;lt;math&amp;gt;\sigma=16&amp;lt;/math&amp;gt;). &lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}=0.1&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;80% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 1.28SE(\overline{x})=14.77 \pm 1.28{16\over \sqrt{30}}=[11.03;18.51]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}=0.05&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;90% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 1.645SE(\overline{x})=14.77 \pm 1.645{16\over \sqrt{30}}=[9.96;19.57]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}=0.005&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;99% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 2.575SE(\overline{x})=14.77 \pm 2.575{16\over \sqrt{30}}=[7.24;22.29]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
: Notice the increase of the CI's (directly related to the decrease of &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt;) reflecting our choice for higher confidence.&lt;br /&gt;
&lt;br /&gt;
** Unknown variance: use the sample variance 273 as an estimate (so the sample standard deviation is &amp;lt;math&amp;gt;s=\hat{\sigma}=16.54&amp;lt;/math&amp;gt;).&lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;80% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 1.28SE(\overline{x})=14.77 \pm 1.28{16.54\over \sqrt{30}}=[10.90;18.63]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}=0.05&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;90% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 1.645SE(\overline{x})=14.77 \pm 1.645{16.54\over \sqrt{30}}=[9.80;19.73]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}=0.005&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;99% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 2.575SE(\overline{x})=14.77 \pm 2.575{16.54\over \sqrt{30}}=[6.99;22.54]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
: Notice the increase of the CI's (directly related to the decrease of &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt;) reflecting our choice for higher confidence.&lt;br /&gt;
&lt;br /&gt;
: You can use the [http://www.socr.ucla.edu/htmls/ana/ConfidenceInterval_Analysis.html SOCR CI Analysis Applet] to compute these interval estimates.&lt;br /&gt;
&lt;br /&gt;
====Estimating a population mean with small samples (say &amp;lt;30 observations)====&lt;br /&gt;
For small samples, the point estimates are less precise and the interval estimates produce wider intervals, compared to the case of large samples. &lt;br /&gt;
&lt;br /&gt;
* Assumptions: need evidence that the data we observed and used for point and interval estimates come from a distribution, which is (approximately) normal. If this assumption is violated than the interval estimate we are going to introduce may be significantly misrepresenting the real confidence interval.&lt;br /&gt;
* Point estimation of population mean: Choose a confidence level &amp;lt;math&amp;gt;(1-\alpha)100%&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; is small (e.g., 0.1, 0.05, 0.025, 0.01, 0.001, etc.). Then a &amp;lt;math&amp;gt;(1-\alpha)100%&amp;lt;/math&amp;gt; confidence interval for &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; is defined in terms of the [http://socr.ucla.edu/htmls/dist/StudentT_Distribution.html T-distribution]: &lt;br /&gt;
:: &amp;lt;math&amp;gt;CI(\alpha): \overline{x} \pm t_{\alpha\over 2} E.&amp;lt;/math&amp;gt;&lt;br /&gt;
:: The '''Error''' term, E, is defined as  &amp;lt;math&amp;gt;E = \begin{cases}{\sigma\over\sqrt{n}},&amp;amp; \texttt{for-known}-\sigma,\\&lt;br /&gt;
{SE},&amp;amp; \texttt{for-unknown}-\sigma.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
:: The '''Standard Error''' of the estimate &amp;lt;math&amp;gt;\overline {x}&amp;lt;/math&amp;gt; is obtained by replacing the unknown population standard deviation by the sample standard deviation:&lt;br /&gt;
&amp;lt;math&amp;gt;SE(\overline {x}) = {1\over \sqrt{n}} \sqrt{\sum_{i=1}^n{(x_i-\overline{x})^2\over n-1}}&amp;lt;/math&amp;gt;&lt;br /&gt;
:: $t_{\alpha\over 2}$ is the [[AP_Statistics_Curriculum_2007_StudentsT |Critical Value for the T(df=sample-size -1) distribution at &amp;lt;math&amp;gt;{\alpha\over 2}&amp;lt;/math&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
* Example: a random sample of the number of sentences found in 10 magazine advertisements is listed below. Use this sample to find point estimate for the population mean μ. Samples: 16, 9, 14, 11, 17, 12, 99, 18, 13, 12. Suppose the point estimate is 22.1.&lt;br /&gt;
** Known variance: Suppose that we know the variance for the ''number of sentences per advertisement'' example above is known to be 256 (so the population standard deviation is &amp;lt;math&amp;gt;\sigma=16&amp;lt;/math&amp;gt;). &lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}=0.1&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;80% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 1.383{16\over \sqrt{10}}=22.1 \pm 1.28{16\over \sqrt{10}}=[15.10 ; 29.10]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}=0.05&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;90% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 1.833{16\over \sqrt{10}}=22.1 \pm 1.833{16\over \sqrt{10}}=[12.83 ; 31.37]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}=0.005&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;99% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 3.250{16\over \sqrt{10}}=22.1 \pm 3.250{16\over \sqrt{10}}=[5.66 ; 38.54]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
:: Notice the increase of the CI's (directly related to the decrease of &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt;) reflecting our choice for higher confidence.&lt;br /&gt;
&lt;br /&gt;
** Unknown variance: Suppose that we do '''not''' know the variance for the ''number of sentences per advertisement'' but use the sample variance 737.88 as an estimate (so the sample standard deviation is &amp;lt;math&amp;gt;s=\hat{\sigma}=27.16390579&amp;lt;/math&amp;gt;). &lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}=0.1&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;80% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 1.383{27.16390579\over \sqrt{10}}=22.1 \pm 1.383{27.16390579\over \sqrt{10}}=[10.22 ; 33.98]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}=0.05&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;90% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 1.833{27.16390579\over \sqrt{10}}=22.1 \pm 1.833{27.16390579\over \sqrt{10}}=[6.35 ; 37.85]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
:: For &amp;lt;math&amp;gt;{\alpha \over 2}=0.005&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;99% CI(\mu)&amp;lt;/math&amp;gt; is constructed by:&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt;\overline{x}\pm 3.250{27.16390579 \over \sqrt{10}}=22.1 \pm 3.250{27.16390579\over \sqrt{10}}=[-5.82 ; 50.02]&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
:: Notice the increase of the CI's (directly related to the decrease of &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt;) reflecting our choice for higher confidence.&lt;br /&gt;
&lt;br /&gt;
====Estimating a population proportion====&lt;br /&gt;
When the sample size is large, the sampling distribution of the sample proportion &amp;lt;math&amp;gt;\hat{p}&amp;lt;/math&amp;gt; is approximately Normal, by [[AP_Statistics_Curriculum_2007_Limits_CLT |CLT]], as the sample proportion may be presented as a [[AP_Statistics_Curriculum_2007_Limits_Norm2Bin |sample average or Bernoulli random variables]]. When the sample size is small, the normal approximation may be inadequate. To accommodate this, we will modify the '''sample-proportion''' &amp;lt;math&amp;gt;\hat{p}&amp;lt;/math&amp;gt; slightly and obtain the '''corrected-sample-proportion''' &amp;lt;math&amp;gt;\tilde{p}&amp;lt;/math&amp;gt;:&lt;br /&gt;
: &amp;lt;math&amp;gt;\hat{p}={y\over n} \longrightarrow \tilde{p}={y+0.5z_{\alpha \over 2}^2 \over n+z_{\alpha \over 2}^2},&amp;lt;/math&amp;gt;&lt;br /&gt;
where [[AP_Statistics_Curriculum_2007_Normal_Critical | &amp;lt;math&amp;gt;z_{\alpha \over 2}&amp;lt;/math&amp;gt; is the normal critical value we saw earlier]].&lt;br /&gt;
&lt;br /&gt;
The standard error of &amp;lt;math&amp;gt;\hat{p}&amp;lt;/math&amp;gt; also needs a slight modification&lt;br /&gt;
: &amp;lt;math&amp;gt;SE_{\hat{p}} =  \sqrt{\hat{p}(1-\hat{p})\over n} \longrightarrow SE_{\tilde{p}} =  \sqrt{\tilde{p}(1-\tilde{p})\over n+z_{\alpha \over 2}^2}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Example: Suppose a researcher is interested in studying the effect of aspirin in reducing heart attacks. He randomly recruits 500 subjects with evidence of early heart disease and has them take one aspirin daily for two years.  At the end of the two years, he finds that during the study only 17 subjects had a heart attack. Calculate a 95% (&amp;lt;math&amp;gt;\alpha=0.05&amp;lt;/math&amp;gt;) confidence interval for the true (unknown) proportion of subjects with early heart disease that have a heart attack while taking aspirin daily. Note that [[AP_Statistics_Curriculum_2007_Normal_Critical | &amp;lt;math&amp;gt;z_{\alpha \over 2} = z_{0.025}=1.96&amp;lt;/math&amp;gt;]]:&lt;br /&gt;
:: &amp;lt;math&amp;gt;\hat{p} = {17\over 500}=0.034&amp;lt;/math&amp;gt; ; &amp;lt;math&amp;gt;\tilde{p} = {17+0.5z_{0.025}^2\over 500+z_{0.025}^2}== {17+1.92\over 500+3.84}=0.038&amp;lt;/math&amp;gt; &lt;br /&gt;
:: &amp;lt;math&amp;gt;SE_{\hat{p}}= \sqrt{0.034(1-0.034)\over 500}=0.0036&amp;lt;/math&amp;gt;; &amp;lt;math&amp;gt;SE_{\tilde{p}}= \sqrt{0.038(1-0.038)\over 500+3.84}=0.0085&amp;lt;/math&amp;gt;&lt;br /&gt;
::And the corresponding confidence intervals are given by&lt;br /&gt;
:: &amp;lt;math&amp;gt;\hat{p}\pm 1.96 SE_{\hat{p}}=[0.026944, 0.041056]&amp;lt;/math&amp;gt;&lt;br /&gt;
:: &amp;lt;math&amp;gt;\tilde{p}\pm 1.96 SE_{\tilde{p}}=[0.0213, 0.0547]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: [[AP_Statistics_Curriculum_2007_Estim_Proportion#Sample-Size_Estimation_2|See this example of estimation of sample-size, given margin of error]]&lt;br /&gt;
&lt;br /&gt;
====Estimating population variance====&lt;br /&gt;
The most unbiased point estimate for the population variance &amp;lt;math&amp;gt;\sigma^2&amp;lt;/math&amp;gt; is the [[AP_Statistics_Curriculum_2007_EDA_Var | Sample-Variance (s&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;)]] and the point estimate for the population standard deviation &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the [[AP_Statistics_Curriculum_2007_EDA_Var | Sample Standard Deviation (s)]].&lt;br /&gt;
&lt;br /&gt;
We use a [http://en.wikipedia.org/wiki/Chi_square_distribution Chi-Square Distribution] to construct confidence intervals for the variance and standard distribution. If the process or phenomenon we study generates a Normal random variable, then computing the following random variable (for a sample of size &amp;lt;math&amp;gt;n&amp;gt;1&amp;lt;/math&amp;gt;) has a [[AP_Statistics_Curriculum_2007_Chi-Square|Chi-Square Distribution]]&lt;br /&gt;
: &amp;lt;math&amp;gt;\chi_o^2 = {(n-1)s^2 \over \sigma^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Chi-Square Distribution Properties&lt;br /&gt;
** All chi-squares values &amp;lt;math&amp;gt;\chi_o^2 \geq 0&amp;lt;/math&amp;gt;.&lt;br /&gt;
** The chi-square distribution is a family of curves, each is determined by the degrees of freedom (n-1). See the interactive [http://socr.ucla.edu/htmls/SOCR_Distributions.html Chi-Square distribution].&lt;br /&gt;
** To form a confidence interval for the variance (&amp;lt;math&amp;gt;\sigma^2&amp;lt;/math&amp;gt;), use the &amp;lt;math&amp;gt;\chi^2(df=n-1)&amp;lt;/math&amp;gt; distribution with degrees of freedom equal to one less than the sample size.  &lt;br /&gt;
** The area under each curve of the Chi-Square Distribution equals one.&lt;br /&gt;
** All Chi-Square Distributions are positively skewed.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SOCR_EBook_Dinov_Estim_Var_020408_Fig1.jpg|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Interval Estimates of Population Variance and Standard Deviation: &lt;br /&gt;
:: Notice that the Chi-Square Distribution is '''not''' symmetric (positively skewed) and therefore, there are two critical values for each level of confidence.  The value &amp;lt;math&amp;gt;\chi_L^2&amp;lt;/math&amp;gt; represents the left-tail critical value and &amp;lt;math&amp;gt;\chi_R^2&amp;lt;/math&amp;gt; represents the right-tail critical value.  For various degrees of freedom and areas, you can compute all critical values either using the [http://socr.ucla.edu/htmls/SOCR_Distributions.html SOCR Distributions] or using the [http://socr.ucla.edu/Applets.dir/Normal_T_Chi2_F_Tables.htm SOCR Chi-square Distribution Calculator].&lt;br /&gt;
&lt;br /&gt;
::: Example: Find the critical values, &amp;lt;math&amp;gt;\chi_L^2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\chi_R^2&amp;lt;/math&amp;gt;, for a 90% confidence interval when the sample size is 25. Use the following Protocol:&lt;br /&gt;
::: Identify the degrees of freedom (&amp;lt;math&amp;gt;df=n-1=24&amp;lt;/math&amp;gt;) and the level of confidence (&amp;lt;math&amp;gt;{\alpha\over 2}=0.05&amp;lt;/math&amp;gt;).&lt;br /&gt;
::: Find the left and right critical values, &amp;lt;math&amp;gt;\chi_L^2=13.848&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\chi_R^2=36.415&amp;lt;/math&amp;gt;, as in the image below.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SOCR_EBook_Dinov_Estim_Var_020408_Fig2.jpg|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* Confidence Interval for &amp;lt;math&amp;gt;\sigma^2&amp;lt;/math&amp;gt;&lt;br /&gt;
:: &amp;lt;math&amp;gt;{(n-1)s^2 \over \chi_R^2} \leq \sigma^2 \leq {(n-1)s^2 \over \chi_L^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Confidence Interval for &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
:: &amp;lt;math&amp;gt;\sqrt{(n-1)s^2 \over \chi_R^2} \leq \sigma \leq \sqrt{(n-1)s^2 \over \chi_L^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Hands-on Activity====&lt;br /&gt;
Construct the confidence intervals for &amp;lt;math&amp;gt;\sigma^2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; assuming the observations below represent a random sample from the liquid content (in fluid ounces) of 16 beverage cans and can be considered as Normally distributed. Use a 90% level of confidence.&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;
| 14.816 || 14.863 || 14.814 || 14.998 || 14.965 || 14.824 || 14.884 || 14.838 || 14.916 || 15.021 || 14.874 || 14.856 || 14.860 || 14.772 || 14.980 || 14.919&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get the sample statistics from [http://socr.ucla.edu/htmls/SOCR_Charts.html SOCR Charts] (e.g., Index Plot); Sample-Mean=14.8875; Sample-SD=0.072700298, Sample-Var=0.005285333.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SOCR_EBook_Dinov_Estim_Var_020408_Fig3.jpg|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Identify the degrees of freedom (&amp;lt;math&amp;gt;df=n-1=15&amp;lt;/math&amp;gt;) and the level of confidence (&amp;lt;math&amp;gt;{\alpha/2}=0.05&amp;lt;/math&amp;gt;), as we are looking for a &amp;lt;math&amp;gt;(1-\alpha)100% CI(\sigma^2)&amp;lt;/math&amp;gt;.&lt;br /&gt;
* Find the left and right critical values, &amp;lt;math&amp;gt;\chi_L^2=7.261&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\chi_R^2=24.9958&amp;lt;/math&amp;gt; using [http://socr.ucla.edu/htmls/SOCR_Distributions.html SOCR Chi-Square Distribution], as in the image below.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SOCR_EBook_Dinov_Estim_Var_020408_Fig4.jpg|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CI(&amp;lt;math&amp;gt;\sigma^2&amp;lt;/math&amp;gt;)&lt;br /&gt;
: &amp;lt;math&amp;gt;0.00318={15\times 0.0053 \over 24.9958} \leq \sigma^2 \leq {15\times 0.0053 \over 7.261}=0.01095&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CI(&amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;)&lt;br /&gt;
: &amp;lt;math&amp;gt;0.0564=\sqrt{15\times 0.0053 \over 24.9958} \leq \sigma \leq \sqrt{15\times 0.0053 \over 7.261}=0.10464&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** [[AP_Statistics_Curriculum_2007_Estim_Var#More_Examples|See more examples here]].&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
* [http://www.tandfonline.com/doi/abs/10.1207/.U5ys8BZRXKw This article] titled Reliability of Scales with General Structure: Point and Interval Estimation Using a Structural Equation discussed a method of obtaining point and interval estimates of reliability for composites of measures with a general structure. The approach is based on fitting a correspondingly constrained structural equation model and generalizes earlier covariance structure analysis methods for scale reliability estimation with congeneric tests. The procedure can be sued with weighted or unweighted composites, in which the weights need not be known in advance but may be estimated simultaneously. The method presented in this paper allows one to obtain an approximate standard error and confidence interval for scale reliability using bootstrap.&lt;br /&gt;
&lt;br /&gt;
* [[SOCR_EduMaterials_ModelerActivities_NormalBetaModelFit| This activity]] shows normal and beta distribution model fit. It describes the process of SOCR model fitting in the case of using Normal or Beta distribution models. The article aims to motivate the need for analytical modeling of natural processes and illustrated how to use SOCR modeler to fit models to real data ad presented applications of model fitting. It provides specific examples illustrating model fitting and two exercises to practice and learn. &lt;br /&gt;
&lt;br /&gt;
* [[SOCR_EduMaterials_Activities_General_CI_Experiment|This experiment]] shows SOCR activity on general confidence interval and demonstrates the usage and functionality of SOCR general confidence interval applet. It demonstrates the theory behind the use of interval-based estimates of the parameters, illustrates various confidence intervals construction recipes, draws parallels between the construction algorithms and intuitive meaning of confidence intervals and presents a new technology enhanced approach for understanding and utilizing confidence intervals for various applications. The article presents specific example and exercises in this topic and works as a good supplement to point and interval estimates. &lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
* [http://socr.ucla.edu/Applets.dir/Normal_T_Chi2_F_Tables.htm  SOCR Tables]&lt;br /&gt;
* [http://socr.ucla.edu/htmls/exp/Confidence_Interval_Experiment_General.html SOCR General CI Experiment]&lt;br /&gt;
* [http://socr.ucla.edu/htmls/SOCR_Modeler.html SOCR Modeler]&lt;br /&gt;
* [http://socr.ucla.edu/htmls/SOCR_Experiments.html SOCR Experiments]&lt;br /&gt;
* [http://socr.ucla.edu/htmls/SOCR_Charts.html SOCR CHarts]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
* Tom is in charge of sampling sugar measurements from a very large population of sugar. Lately her standard errors have been alarmingly high for her sample means. If she wants to decrease her sampling error (standard deviation of her sample means) by 1/2 what should she do?&lt;br /&gt;
: (a) Quadruple the variation inherent in the population.&lt;br /&gt;
: (b) Triple her sample size.&lt;br /&gt;
: (c) Quadruple her sample size.&lt;br /&gt;
: (d) Halve her sample size.&lt;br /&gt;
&lt;br /&gt;
* The average standardized math score for eighth graders in the state of Michigan is 70 and the standard deviation is 10. We want to find out if the average standardized math score in district A is higher than the average score for the state of Michigan. The mean for a random sample of 36 students from this district is 72. What is the best response?&lt;br /&gt;
: (a) The p-value is around 0.76 and it is concluded that the average standardized math score in this district is not different from the overall population mean.&lt;br /&gt;
: (b) The p-value is around 0.12 and it is concluded that the average standardized math score in this district is not higher than the overall population mean.&lt;br /&gt;
: (c) The p-value is around 0.24 and it is concluded that the average standardized math score in this district is not higher than the overall population mean.&lt;br /&gt;
: (d) The p-value is around 0.88 and it is concluded that the average standardized math score in this district is not higher than the overall population mean.&lt;br /&gt;
&lt;br /&gt;
* A random sample of 121 students from the UMich was selected to estimate the average ACT score of all UMich students. The average for the sample was 23.4 and the sample standard deviation was 3.65. If you wanted to calculate a more precise and accurate prediction of the average ACT score of UMich students, which one of the following would be the best thing to do?&lt;br /&gt;
: (a) Decrease the sample size to 91.&lt;br /&gt;
: (b) Increase the sample size to 151.&lt;br /&gt;
: (c) Increase the confidence level to 99%.&lt;br /&gt;
: (d) Decrease the confidence level to 90%.&lt;br /&gt;
&lt;br /&gt;
* How does the shape, center, and spread of t-models change as its degrees of freedom increases?&lt;br /&gt;
: (a) The shape and center stays the same, but the spread becomes narrower.&lt;br /&gt;
: (b) The shape and center stays the same, but the spread becomes wider.&lt;br /&gt;
: (c) The shape and spread stays the same, but the center will increase.&lt;br /&gt;
: (d) The shape and spread stays the same, but the center will decrease.&lt;br /&gt;
&lt;br /&gt;
* Estimate the critical value of t for a 95% confidence interval with df = 15&lt;br /&gt;
: (a) 1.71&lt;br /&gt;
: (b) 2.131&lt;br /&gt;
: (c) 1.17&lt;br /&gt;
: (d) 3.45&lt;br /&gt;
&lt;br /&gt;
* True or False: In a well-designed sample survey like the Current Population Survey, the observed sample percentage (e.g., percentage unemployed) is equal to the population percentage. Thus, it is appropriate to just report the sample percentage, without any measure of accuracy (i.e. without the margin of error).&lt;br /&gt;
: (a) True&lt;br /&gt;
: (b) False&lt;br /&gt;
&lt;br /&gt;
* Suppose an NPR news story reports that: &amp;quot;A polling agency reports that the percentage of the American public who agree we should spend more money on the mental health of the war veterans is 42% +/- 3%.&amp;quot;&lt;br /&gt;
: (a) The probability that the American public agree that we should spend more money on the mental health of the war veterans is between 39% to 42%.&lt;br /&gt;
: (b) The percentage of the American public who agree that we should spend more money on the mental health of the war veterans is between 39% to 45%.&lt;br /&gt;
: (c) We are 95% confident that the percentage of the American public who agree that we should spend more money on the mental health of the war veterans is between 39% to 45%.&lt;br /&gt;
: (d) The percentage of the American public who agree that we should spend more money on the mental health of the war veterans is 42%.&lt;br /&gt;
&lt;br /&gt;
* A major newspaper wants to hire a polling agency to predict who will be the next governor. Agency A proposes to do the job with a random sample of 5000 voters at a cost of $\$ 50K$ (K = one thousand). Agency B proposes to do the job with a random sample of 7500 voters at a cost of $\$ $75K. Assume both agencies find the percentage of voters to be 40% and both use the normal model to calculate the 95% interval. Which agency will you hire? Hint: Compare the margin of error for the two agencies and the relative costs before making your decision.&lt;br /&gt;
: (a) I will hire B.&lt;br /&gt;
: (b) I have no preference.&lt;br /&gt;
: (c) I need more information to decide who to hire.&lt;br /&gt;
: (d) I will hire A.&lt;br /&gt;
&lt;br /&gt;
* Suppose that the proportion of the adult population who jog is 0.15. What is the probability that the proportion of joggers in a random sample of size n =200 lies between 0.13 and 0.17?&lt;br /&gt;
: (a) 0.5762 approximately&lt;br /&gt;
: (b) 0.8125 approximately&lt;br /&gt;
: (c) 0.2345 approximately&lt;br /&gt;
: (d) 0.1234 approximately&lt;br /&gt;
&lt;br /&gt;
*  Records at a large university indicate that 20% of all freshmen are placed on academic probation at the end of the first semester. A random sample of 100 freshmen found that 25% of them were placed on probation. The results of the sample:&lt;br /&gt;
: (a) are surprising since it indicates that 5% more of these freshmen were placed on probation than expected&lt;br /&gt;
: (b) are surprising since the standard deviation of the sampling distribution is 0.4%.&lt;br /&gt;
: (c) are biased since an increase of 5% could not happen without injecting bias into the sample.&lt;br /&gt;
: (d) are not surprising since the standard deviation of the sampling distribution is 4%.&lt;br /&gt;
: (e) are surprising since SAT scores have increased over the past years&lt;br /&gt;
&lt;br /&gt;
* We have discussed that the standard deviation of the distribution of sample percentages, $SE(\hat{p})$ is calculated by taking the square root of $\frac{\hat{p}(1-\hat{p})}{N}$, where $\hat{p}$ is the proportion in the sample and N is sample size. What does $SE(\hat{p})$ show?&lt;br /&gt;
: (a) It shows the standard error of the man across repeated samples from the population.&lt;br /&gt;
: (b) It shows the distribution of $\hat{p}$ for the single sample that the researcher draws from the population.&lt;br /&gt;
: (c) It shows the standard deviation of $\hat{p}$ for repeated samples from the population.&lt;br /&gt;
: (d) It shows the variation for $\hat{p}$ values for repeated samples from the population.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [http://wiki.stat.ucla.edu/socr/index.php/Probability_and_statistics_EBook#Chapter_VII:_Point_and_Interval_Estimates SOCR]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Method_of_moments_(statistics)  MoM Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_CIs}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_DecisionTheory&amp;diff=13577</id>
		<title>SMHS DecisionTheory</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_DecisionTheory&amp;diff=13577"/>
		<updated>2014-08-29T18:46:00Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /*  Scientific Methods for Health Sciences - Decision Theory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Decision Theory ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Decision theory is concerned with determining the optimal course of action when a number of alternatives, whose consequences cannot be forecasted with certainty, are present. Namely, decision theory is method to make decisions in the presence of statistical knowledge when some uncertainties are involved. In this section, we present an introduction to decision theory and illustrate its application with specific examples. Sample R codes will also be provided to help apply decision theory in the programming background.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
Suppose a drug company is deciding whether they should market a new drug. Two of the main factors to consider including the proportion of people for which the drug will prove effective $(\theta_{1})$ and the proportion of the market the drug will capture ($\theta_{2})$. Both of these two factors are generally unknown even with experiments conducted to obtain statistical information about them. This kind of problem is one of the application where decision theory in that ultimate purpose is to decide whether to market the drug and how much to market and questions like this. So, what is decision theory and how does it work?&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
*Decision theory: concerned with the problem of making decisions in the presence of statistical knowledge which sheds light on some of the uncertainty involved in the decision problem. In most cases, we will assume that these uncertainties can be considered to be unknown numerical quantities, and will represent them by $\theta$, which could be a vector or matrix. &lt;br /&gt;
*Statistics is directed towards the use of sample information in making references about $\theta$ without regard to the use to which they are to be put. Beside, we try to combine the sample information with other relevant aspects of the problem in order to make the optimal decisions. The relevant information include knowledge of the possible consequences of the decision, quantified by determining the loss that would be incurred for each possible decision and for various think in terms of losses and non-sample information that is useful to consider, which is called prior information considering about $\theta$ arising from sources other than statistical investigation. Generally speaking, prior information comes from past experience about similar situations involving similar $\theta$ and l as the set of all possible actions under consideration. &lt;br /&gt;
*The uncertain quantity $\theta$, which affects the decision process is commonly referred to as the state of nature. It is clearly important to consider what the possible states of nature are when making decisions. We use the symbol $\Theta$ to denote the set of all possible states of nature (parameter space) and $\theta$ (parameter). Loss function is an important element in decision theory. If a particular action $a_{1}$ is taken and $\theta_{1}$ turns out to be the true state of nature, then a loss function $L(\theta_{1},a_{1})$  is defined for all $(\theta,a)  \in\Theta×\ell.$ For technical convenience, only loss function satisfying $L(\theta,a)≥-K&amp;gt;-\infty$ will be considered.&lt;br /&gt;
*With a statistical investigation, the outcome will be denoted as X, which is often referred to as a vector $X=(X_{1},X_{2},…,X_{n})$, where $X_{i}$ are independent observations from a common distribution. A particular realization of X will be denoted x and the set of possible outcomes is the sample space, which is denoted as $\mathcal {L}$, usually a subset of $R^{n}$, n-dimensional Euclidean space. The possible distribution of X depends on the unknown state of nature $\theta$. Let $P_{\theta}(A)$ or $P_{\theta}$ $(X\in A)$ denote the probability of the event $A(A\subset \mathcal {L}$ when $\theta$ is the true state of nature. For simplicity $X$ will be assumed to be either continuous or discrete random variable with density $\mathcal{f}(x|\theta)$. If $ X $ is continuous then $P_{θ} (A)=\int_{A}\mathcal {f}(x│\theta)dx$ when $X$ is discrete $P_{\theta}(A)=\sum_{X\in A} \mathcal {f}(x│\theta)$. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
*[http://www.yorku.ca/ptryfos/ch3000.pdf  Chapter 3 Decision Theory / York University]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Decision_theory  Decision Theory Wikipedia]&lt;br /&gt;
*[http://www.stat.ntnu.no/~ushakov/emner/ST2201/v07/files/berger1.pdf  Statistical Decision Theory and Bayesian Analysis / James O. Berger]&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;
&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;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_DecisionTheory}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_SurvivalAnalysis&amp;diff=13568</id>
		<title>SMHS SurvivalAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_SurvivalAnalysis&amp;diff=13568"/>
		<updated>2014-08-29T17:31:42Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Survival Analysis ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Survival analysis is statistical methods for analyzing longitudinal data on the occurrence of events. Events may include death, injury, onset of illness, recovery from illness (binary variables) or transition above or below the clinical threshold of a meaningful continuous variable (e.g. [http://en.wikipedia.org/wiki/CD4 CD4 counts]). Typically, survival analysis accommodates data from randomized clinical trial or cohort study designs. In this section, we will present a general introduction to survival analysis including terminology and data structure, survival/hazard functions, parametric versus semi-parametric regression techniques and introduction to (non-parametric) [http://en.wikipedia.org/wiki/Kaplan%E2%80%93Meier_estimator Kaplan-Meier methods]. Code examples are also included showing the applications survival analysis in practical studies.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
Studies in the field of public health often involve questions like “What is the proportion of a population which will survive past time t?” “What is the expected rate of death in study participants, or the population”? “How do particular circumstances increase or decrease the probability of survival?” To answer questions like this, we would need to define the term of lifetime and model the time to event data. In cases like this, death or failure is considered as an event in survival analysis of time duration to until one or more events happen.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
====Hazard Ratios====&lt;br /&gt;
Hazard is the slope of the survival curve — a measure of how rapidly critical events occur (e.g., subjects are dying).&lt;br /&gt;
* The hazard ratio compares two treatments. If the hazard ratio is 2.0, then the rate of deaths in one treatment group is twice the rate in the other group.&lt;br /&gt;
* The hazard ratio is not computed at any one time point, but is computed from all the data in the survival curve. &lt;br /&gt;
* Since there is only one hazard ratio reported, it can only be interpreted if you assume that the population hazard ratio is consistent over time, and that any differences are due to random sampling. This is called the assumption of proportional hazards.&lt;br /&gt;
* If the hazard ratio is not consistent over time, the value reported for the hazard ratio may not be useful. If two survival curves cross, the hazard ratios are certainly not consistent (unless they cross at late time points, when there are few subjects still being followed so there is a lot of uncertainty in the true position of the survival curves). &lt;br /&gt;
* The hazard ratio is not directly related to the ratio of median survival times. A hazard ratio of 2.0 does not mean that the median survival time is doubled (or halved). A hazard ratio of 2.0 means a patient in one treatment group who has not died (or progressed, or whatever end point is tracked) at a certain time point has twice the probability of having died (or progressed...) by the next time point compared to a patient in the other treatment group.&lt;br /&gt;
* Hazard ratios, and their confidence intervals, may be computed using two methods, each reporting both the hazard ratio and its reciprocal. If people in group A die at twice the rate of people in group B (HR=2.0), then people in group B die at half the rate of people in group A (HR=0.5).&lt;br /&gt;
&lt;br /&gt;
====The LogRank and Mantel-Haenszel methods====&lt;br /&gt;
Both, the LogRank and Mantel-Haenszel methods usually give nearly identical results, unless in situations when several subjects die at the same time or when the hazard ratio is far from 1.0.&lt;br /&gt;
: The Mantel-Haenszel method reports hazard ratios that are further from 1.0  (so the reported hazard ratio is too large when the hazard ratio is greater than 1.0, and too small when the hazard ratio is less than 1.0): &lt;br /&gt;
::(1) Compute the total variance, V; &lt;br /&gt;
::(2) Compute $K = \frac{O1 - E1}{V}$, where $O1$ - is the total ''observed'' number of events in group1, $E1$ is the total ''expected'' number of events in group1. You'd get the same value of $K$ if you used the other group; &lt;br /&gt;
::(3) The hazard ratio equals $e^K$; &lt;br /&gt;
::(4) The 95% confidence interval of the hazard ratio is: ($e^{K - \frac{1.96}{\sqrt{V}}}$, $e^{K + \frac{1.96}{\sqrt{V}}}$).&lt;br /&gt;
&lt;br /&gt;
: The logrank method (referred to as O/E method) reports values that are closer to 1.0 than the true Hazard Ratio, especially when the hazard ratio is large or the sample size is large. When there are ties, both methods are less accurate. The logrank methods tend to report hazard ratios that are even closer to 1.0 (so the reported hazard ratio is too small when the hazard ratio is greater than 1.0, and too large when the hazard ratio is less than 1.0): &lt;br /&gt;
::(1) As part of the Kaplan-Meier calculations, compute the number of observed events (deaths, usually) in each group ($O_a$ and $O_b$), and the number of expected events assuming a null hypothesis of no difference in survival ($E_a$ and $E_b$); &lt;br /&gt;
::(2) The hazard ratio then is: $HR= \frac{\frac{O_a}{O_a}}{\frac{O_b}{E_b}}$; &lt;br /&gt;
::(3) The standard error of the natural logarithm of the hazard ratio is: $\sqrt{\frac{1}{E_a} + \frac{1}{E_b}}$; &lt;br /&gt;
::(4) The lower and upper limits of the 95% confidence interval of the hazard ratio are: $e^{\frac{O_a-E_a}{V} \pm 1.96 \sqrt{\frac{1}{E_a} + \frac{1}{E_b}}}$.&lt;br /&gt;
&lt;br /&gt;
====Survival analysis goals====&lt;br /&gt;
* Estimate time-to-event for a group of individuals, such as time until second heart-attack for a group of MI patients;&lt;br /&gt;
* To compare time-to-event between two or more groups, such as treated vs. placebo Myocardial infarction (MI) patients in a randomized controlled trial;&lt;br /&gt;
* To assess the relationship of co-variables to time-to-event, such as: does weight, insulin resistance, or cholesterol influence survival time of MI patients?&lt;br /&gt;
&lt;br /&gt;
====Terminology====&lt;br /&gt;
* '''Time-to-event''':  The time from entry into a study until a subject has a particular outcome&lt;br /&gt;
* '''Censoring''':  Subjects are said to be censored if they are lost to follow up or drop out of the study, or if the study ends before they die or have another outcome of interest.  They are (censored) counted as alive or disease-free for the time they were enrolled in the study. If dropout is related to both outcome and treatment, dropouts may bias the results.&lt;br /&gt;
* '''Two-variable outcome''': time variable: $t_i$ = time of last disease-free observation or time at event; censoring variable: $c_i=1$ if had the event; $c_i =0$ no event by time $t_i$. &lt;br /&gt;
* Right Censoring ($T&amp;gt;t$): Common examples: termination of the study; death due to a cause that is not the event of interest; loss to follow-up. We know that subject survived at least to time $t$.&lt;br /&gt;
&lt;br /&gt;
* Example: Suppose subject 1 is enrolled at day 55 and dies on day 76, subject 2 enrolls at day 87 and dies at day 102, subject 3 enrolls at day 75 but is lost (censored) by day 81, and subject 4 enrolls in day 99 and dies at day 111. The Figure below shows these data graphically. Note of varying start times. This figure is generated using the [[SOCR_EduMaterials_Activities_YIntervalChart|SOCR Y Interval Chart]].&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_SurvivalAnalysis_Fig1.png|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
: The next Figure shows a plot of every subject's time since their baseline time collection (right censoring).&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_SurvivalAnalysis_Fig2.png|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Survival distributions====&lt;br /&gt;
* $T_i$, the event time for an individual, is a random variable having certain probability distribution;&lt;br /&gt;
* Different models for survival data are distinguished by different choice of distribution for the variable $T_i$;&lt;br /&gt;
* Parametric survival analysis is based on ''Waiting Time'' distributions (e.g., [[AP_Statistics_Curriculum_2007_Exponential|exponential probability distribution]]);&lt;br /&gt;
* Assume that times-to-event for individuals in a dataset follow a continuous probability distribution (for which we may have an analytic mathematical representation or not). For all possible times $T_i$ after baseline, there is a certain probability that an individual will have an event at exactly time $T_i$.  For example, human beings have a certain probability of dying at ages 1, 26, 86, 100, denoted by $P(T=1)$, $P(T=26)$, $P(T=86)$, $P(T=100)$, respectively, and these probabilities are obviously vastly different from one another;&lt;br /&gt;
* Probability density function f(t): In the case of human longevity, $T_i$ is unlikely to follow a unimodal normal distribution, because the probability of death is not highest in the middle ages, but at the beginning and end of life (bimodal?).  The probability of the failure time occurring at exactly time $t$ (out of the whole range of possible $t$’s) is: $f(t)=log_{∆t→0}\frac{P(t≤T&amp;lt;t+∆t)}{∆t}$. &lt;br /&gt;
&lt;br /&gt;
* Example: Suppose we have the following hypothetical data (Figure below). People have a high chance of dying in their 70’s and 80’s, but they have a smaller chance of dying in their 90’s and 100’s, because few people make it long enough to die at these ages. &lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_SurvivalAnalysis_Fig3.png|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The Survival function, $S(t)=1-F(t)$: The goal of survival analysis is to estimate and compare survival experiences of different groups. Survival experience is described by the cumulative survival function: $S(t)=1-P(T≤t)=1-F(t)$, where $F(t)$ is the [[SMHS_ProbabilityDistributions#Theory|CDF]] of $f(t)$. The Figure below shows the cumulative survival for the same hypothetical data, plotted as cumulative distribution rather than density.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_SurvivalAnalysis_Fig4.png|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Try to use real-data and the [[SOCR_EduMaterials_AnalysisActivities_Survival|SOCR Survival Analysis]] and the [http://www.socr.ucla.edu/htmls/ana/Survival_Analysis.html SOCR Survival Java Applet] to generate a similar plot.&lt;br /&gt;
&lt;br /&gt;
* Hazard function represents the probability that if you survive to $t$, you will succumb to the event in the next instant. &lt;br /&gt;
$$h(t)=log_{∆t→0}⁡ \frac{P(t≤T&amp;lt;t+∆t|T≥t)}{∆t}.$$&lt;br /&gt;
&lt;br /&gt;
: The Hazard function may also be expressed in terms of density and survival: $h(t)=f(t)/S(t)$. This is because of the [[SMHS_Probability#Theory|Bayesian rule]]: &lt;br /&gt;
$$h(t)dt = P(t≤T&amp;lt;t+dt|T≥t)=\frac{P(t≤T&amp;lt;t+dt \cap T≥t)}{P(T≥t)} =\frac{P(t≤T&amp;lt;t+dt){}P(T≥t)} =\frac{f(t)dt}{S(t)}.$$&lt;br /&gt;
 &lt;br /&gt;
: The Figure below illustrates an example plot of a hazard function depicting the hazard rate as an instantaneous incidence rate.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_SurvivalAnalysis_Fig5.png|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Examples&lt;br /&gt;
::  For uncensored data, the following failure time are observed for n=10 subjects. For convenience, the failure times have been ordered. Calculate $\hat{S}(20)$.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:45%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  i||1||2||3||4||5||6||7||8||9||10&lt;br /&gt;
|-&lt;br /&gt;
| $T_i$||2||5||8||12||15||21||25||29||30||34&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
$$\hat{S}(20)=0.5.$$&lt;br /&gt;
&lt;br /&gt;
:: For censored data, suppose instead the observed data were:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:45%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! i||1||2||3||4||5||6||7||8||9||10&lt;br /&gt;
|-&lt;br /&gt;
| $X_i$||2||5||8||12||15||21||25||29||30||34&lt;br /&gt;
|-&lt;br /&gt;
| $∆_i$||1||0||1||0||1||0||1||0||1||0&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
$$\hat{h}(2)=0.1; \hat{h}(8)=0.125; \hat{h}(15)=0.166.$$&lt;br /&gt;
&lt;br /&gt;
* Cumulative Hazard function is defined as $Λ(t)=\int_0^t{h(u)du}$. There is an important connection between cumulative hazard and survival: $S(t)=e^{-Λ(t)}$, although, the cumulative hazard function may be hard to interpret. Note that $e^{-a} \approx 1-a$ for small $a$. Thus, we have $e^{-λ(u)} \approx 1-λ(u)$, taking product between 0 and t on both sides, we have $e^{-Λ(t)}=\prod_{u \in (0,t]}{1-λ(u)du}$.&lt;br /&gt;
: Properties: &lt;br /&gt;
::(1) $Λ(t)≥0$; &lt;br /&gt;
::(2) $log_{t→∞}{⁡Λ(t)}=\infty$; &lt;br /&gt;
::(3) $Λ(0)=0$.&lt;br /&gt;
	&lt;br /&gt;
* ''Hazard vs. density'' example: at birth, each person has a certain probability of dying at any age; that’s the probability density (cf. ''marginal probability''). For example: a girl born today may have a 2% chance of dying at the age of 80 years. However, if a person survives for a while, the probabilities of prospective survival change (cf. ''conditional probability''). For example, a woman who is 79 today may have a 6% chance of dying at the age of 80. The figure bellow gives a set of possible probability density, failure, survival and hazard function. $F(t)$=cumulative failure=$1-e^{-t^1.7}$; $f(t)$=density function=$1.7 t^{0.7} e^{-t^{1.7}}$; $S(t)$=cumulative survival=$e^{-t^{1.7}}$; $h(t)$=hazard function=$1.7t^{0.7}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_SurvivalAnalysis_Fig6.png|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Common density functions describing survival probability====&lt;br /&gt;
* [[AP_Statistics_Curriculum_2007_Exponential| Exponential]] (hazard is constant over time, simplest model!): constant hazard function $h(t)=h$; exponential density functions: $P(T=t)=f(t)=he^{-ht}$; survival function $P(T&amp;gt;t)=S(t)=\int_t^{\infty} {he^{-hu} du}=-e^{-hu} |_t^{\infty}=e^{-ht}$.&lt;br /&gt;
:: See the [http://www.socr.ucla.edu/htmls/dist/Exponential_Distribution.html SOCR Exponential Distribution Calculator]&lt;br /&gt;
:: See the [http://www.distributome.org/V3/calc/ExponentialCalculator.html Probability Distributome Exponential Calculator]&lt;br /&gt;
&lt;br /&gt;
* Example: $h(t)=0.1$ cases/person-year; Then &lt;br /&gt;
:: the probability of developing disease at year 10 is: $P(t=10)=0.01e^{-0.1*10}=0.01e^{-0.1}=0.009$;&lt;br /&gt;
:: the probability of surviving past year 10 is: $S(t)=e^{-0.01t}=90.5%$; &lt;br /&gt;
:: the cumulative risk through year 10 is 9.5%.&lt;br /&gt;
&lt;br /&gt;
* Weibull (hazard function is increasing or decreasing over time)&lt;br /&gt;
:: See the [http://www.socr.ucla.edu/htmls/dist/Weibull_Distribution.html SOCR Weibull Distribution Calculator]&lt;br /&gt;
:: See the [http://www.distributome.org/V3/calc/WeibullCalculator.html Probability Distributome Weibull Calculator]&lt;br /&gt;
&lt;br /&gt;
====Mathematical formulation/relations====&lt;br /&gt;
* Hazard from density and survival: $h(t)=\frac{f(t)}{S(t)}$ &lt;br /&gt;
* Survival from density: $S(t)=\int_t^{\infty} {f(u)du}$&lt;br /&gt;
* Density from survival: $f(t)=-\frac{dS(t)}{dt}=S(t)h(t)$&lt;br /&gt;
* Density from hazard: $f(t)=h(t) e^(-\int_0^t {h(u)du}$&lt;br /&gt;
* Survival from hazard: $S(t)=e^(-\int_0^t {h(u)du}$&lt;br /&gt;
* Hazard from survival: $h(t)=-\frac{d}{dt} \ln{S(t)}$&lt;br /&gt;
* Cumulative hazard from survival: $Λ(t)=-\log{S(t)}$&lt;br /&gt;
* Life expectancy (mean survival time): $E[T]=\int_0^{\infty} {tf(t)dt}=\int_0^{\infty} {S(t)}$, which is the area under the survival curve&lt;br /&gt;
* Restricted mean lifetime: $E[T∧L]=\int_0^L {S(t)dt}$&lt;br /&gt;
* Mean residual lifetime: $m(t_0)=E[T-t_0|T&amp;gt;t_0]=\int_{t_0}^{\infty}{\frac{(t-t_0)f(t)dt}{S(t_0)}}=\int_{t_0}^{\infty} {\frac{S(t)dt}{S(t_0)}}$, set $t_0=0$ to obtain E[T].&lt;br /&gt;
&lt;br /&gt;
====Hazard function models====&lt;br /&gt;
* Parametric multivariate regression techniques: model the underlying hazard/survival function; assume that the dependent variable (time-to-event) takes on some known distribution, such as Weibull, exponential, or lognormal; estimates parameters of these distributions (e.g., baseline hazard function); estimates covariate-adjusted hazard ratios (a hazard ratio is a ratio of hazard rates); many times we care more about comparing groups than about estimating absolute survival. The model of parametric regression: components include a baseline hazard function (which may change over time) and a linear function of a set of k fixed covariates that when exponentiated gives the relative risk.&lt;br /&gt;
&lt;br /&gt;
: ''Exponential'' model assumes fixed baseline hazard that we can estimate: with exponential distribution, $S(t)=e^{-λt}$, model applied: $\log{h_i(t)}=μ+β_1 x_{i1}+⋯+β_k x_{ik}$; &lt;br /&gt;
&lt;br /&gt;
: ''Weibull'' model models the baseline hazard as a function of time: two parameters of shape ($\gamma$) and scale ($λ$) must be estimated to describe the underlying hazard function over time. With Weibull distribution: $S(t)=e^{-λt^{\gamma}}$, model applied: $\log {h_i(t)}= μ+α\log{t}+β_1 x_{i1}+⋯+β_k x_{ik}$;&lt;br /&gt;
&lt;br /&gt;
: ''Cox regression'' (semi-parametric): Cox models the effect of predictors and covariates on the hazard rate but leaves the baseline hazard rate unspecified; also called proportional hazards regression; does not assume knowledge of absolute risk; estimates relative rather than absolute risk.&lt;br /&gt;
:: Components: a baseline hazard function that is left unspecified but must be positive (equal to the hazard when all covariates are 0); a linear function of a set of $k$ fixed covariates that is exponentiated (equal to the relative risk).&lt;br /&gt;
:: $\log{h_i(t)}= \log{h_0 (t)}+β_1 x_{i1}+⋯+β_k x_{ik}$; $h_i (t)=h_0(t) e^{β_1 x_{i1}+⋯+β_k x_{ik}}$.&lt;br /&gt;
:: The point is to compare the hazard rates of individuals who have different covariates: hence, called ''Proportional hazards'': $HR=\frac{h_1 (t)}{h_2 (t)}=\frac{h_0 (t) e^{βx_1 }}{h_0 (t) e^{βx_2}}=e^{β(x_1-x_2)}$, hazard functions should be strictly parallel.&lt;br /&gt;
&lt;br /&gt;
:: Kaplan-Meier Estimates (non-parametric estimate of the survival function): no a priori math assumptions (either about the underlying hazard function or about proportional hazards); simply, the empirical probability of surviving past certain times in the sample (taking into account censoring); non-parametric estimate of the survival function; commonly used to describe survivorship of study population/s; commonly used to compare two study populations; intuitive graphical presentation.&lt;br /&gt;
&lt;br /&gt;
: Limit of Kaplan-Meier: this approach is mainly descriptive, doesn’t control for covariates, requires categorical predictors and can’t accommodate time-dependent variables.&lt;br /&gt;
&lt;br /&gt;
: With Kaplan-Meier: (for uncensored data) $\hat{S}(t)=\frac{1}{n}\sum_{i=1}^n{I(T_i&amp;gt;t)}$,  where $I(A)=1$ if $A$ is true and 0 otherwise. (for censored data, calculated in censoring free subintervals). For example:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:45%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! i||1||2||3||4||5||6||7||8||9||10&lt;br /&gt;
|-&lt;br /&gt;
| $X_i$||2||5||8||12||15||21||25||29||30||34&lt;br /&gt;
|-&lt;br /&gt;
| $∆_i$||1||0||1||0||1||0||1||0||1||0&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
To estimate $S(10)$: $S(10)=P(T&amp;gt;10)=P(T&amp;gt;10,T&amp;gt;8,T&amp;gt;5,T&amp;gt;2)=P(T&amp;gt;10│T&amp;gt;8)P(T&amp;gt;8│T&amp;gt;5)P(T&amp;gt;5│T&amp;gt;2)P(&amp;gt;2)=9/10*9/9*7/8*7/7=0.7875$. So, $\hat{S}_{KM}(10)=0.7875$.&lt;br /&gt;
	Example survival data (right-censored):&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The product limit estimate: the probability of surviving in the entire year, taking into account censoring P= (4/5) (2/3) = 53%. Note that: (1) P &amp;gt; 40% (2/5) because the one drop-out survived at least a portion of the year; (2) P&amp;lt;60% (3/5) because we don’t know if the one drop-out would have survived until the end of the year.&lt;br /&gt;
 &lt;br /&gt;
Figure 6 Compare two groups. Use log-rank test to test the null hypothesis of no difference between survival functions of the two groups. USE SOCR APPLET to chart …&lt;br /&gt;
	Caution: Survival estimates can be unreliable toward the end of a study when there are small numbers of subjects at risk of having an event.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Survival_analysis  Survival Analysis Wikipedia]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Hazard_ratio  Hazard Ratio Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_SurvivalAnalysis}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13567</id>
		<title>SMHS ReliabilityValidity</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ReliabilityValidity&amp;diff=13567"/>
		<updated>2014-08-29T17:29:42Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* 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;
[http://www.socialresearchmethods.net/kb/constval.php  This article] 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;
[http://www.egadconnection.org/Reliability%20and%20validity.pdf  This article] 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;
[http://psycnet.apa.org/psycinfo/1995-00092-001 This article] assessed the reliability and validity of the Childhood Trauma Questionnaire (CTQ), a retrospective measure of child abuse and neglect. 286drug- 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;
*[https://www.uni.edu/chfasoa/reliabilityandvalidity.htm  Exploring Reliability in Academic Assessment]&lt;br /&gt;
*[http://ocw.jhsph.edu/courses/hsre/PDFs/HSRE_lect7_weiner.pdf  Measurements: Reliability and Validity Measures]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Validity_(statistics)  Validity (statistics) Wikipedia]&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_Cronbachs&amp;diff=13566</id>
		<title>SMHS Cronbachs</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_Cronbachs&amp;diff=13566"/>
		<updated>2014-08-29T17:25:25Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Instrument Performance Evaluation: Cronbach's α ==&lt;br /&gt;
&lt;br /&gt;
===Overview:===&lt;br /&gt;
Cronbach’s alpha $\alpha$ is a coefficient of internal consistency and is commonly used as an estimate of the reliability of a psychometric test. Internal consistency is typically a measure based on the correlations between different items on the same test and measures whether several items that propose to measure the same general construct and produce similar scores. Cronbach’s alpha is widely used in the social science, nursing, business and other disciplines. Here we present a general introduction to Cronbach’s alpha, how is it calculated, how to apply it in research and what are some common problems when using Cronbach’s alpha.&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
We have discussed about internal and external consistency and their importance in researches and studies. How do we measure internal consistency? For example, suppose we are interested in measuring the extent of handicap of patients suffering from certain disease. The dataset contains 10records measuring the degree of difficulty experienced in carrying out daily activities. Each item is recorded from 1 (no difficulty) to 4 (can’t do). When those data is used to form a scale they need to have internal consistency. All items should measure the same thing, so they could be correlated with one another. Cronbach’s alpha generally increases when correlations between items increase.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
====Cronbach’s Alpha====&lt;br /&gt;
Cronbach’s Alpha is a measure of internal consistency or reliability of a psychometric instrument and measures how well a set of items measure a single, one-dimensional latent aspect of individuals. &lt;br /&gt;
&lt;br /&gt;
*Suppose we measure a quantity X, which is a sum of K components: $X=Y_{1}+ Y_{2}+⋯+Y_{k}$, then Cronbach’s alpha is defined as $\alpha =\frac{K}{K-1}$  $\left( 1-\frac{\sum_{i=1}^{K}\sigma_{{Y}_{i}^{2}}} {\sigma_{X}^{2}}\right)$, where $\sigma_{X}^{2}$ is the variance of the observed total test scores, and $ \sigma_{{Y}_{i}^{2}} $ is the variance of component $i$ for the current sample. &lt;br /&gt;
&lt;br /&gt;
: If items are scored from 0 to 1, then $\alpha =\frac{K}{K-1}$ $\left( 1-\frac{\sum_{i=1}^{K}P_{i}Q_{i}} {\sigma_{X}^{2}} \right)$, where $P_{i}$ is the proportion scoring 1 on item $i$ and $Q_{i=1}-P_{i}$, alternatively, Cronbach’s alpha can be defined as $\alpha$=$\frac{K\bar c}{(\bar v +(K-1) \bar c )}$,where K is as above, $\bar v$ is the average variance of each component and $\bar c$ is the average of all covariance between the components across the current sample of persons.&lt;br /&gt;
&lt;br /&gt;
*The standardized Cronbach’s alpha can be defined as $\alpha_{standardized}=\frac{K\bar r}  {(1+(K-1)\bar r )}$, $\bar r$ is the mean of $\frac {K(K-1)}{2}$ non redundant correlation coefficients (i.e., the mean of an upper triangular, or lower triangular, correlation matrix).&lt;br /&gt;
&lt;br /&gt;
*The theoretical value of alpha varies from 0 to 1 considering it is ratio of two variance. $\rho_{XX}=\frac{\sigma_{T}^{2}} {\sigma_{X}^{2}}$, reliability of test scores is the ratio of the true score and total score variance. &lt;br /&gt;
&lt;br /&gt;
====Internal consistency====&lt;br /&gt;
Internal consistency is a measure of whether several items that proposed to measure the same general construct produce similar score. It is usually measured with Cronbach’s alpha, which is calculated from the pairwise correlation between items. Internal consistency can take values from negative infinity to 1. It is negative when there is greater within subject variability than between-subject variability. Only positive values of Cronbach’s alpha make sense. Cronbach’s alpha will generally increases as the inter-correlations among items tested increase. &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:35%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Cronbach's alpha||	Internal consistency&lt;br /&gt;
|-&lt;br /&gt;
| $\alpha$  ≥ 0.9||	Excellent (High-Stakes testing)&lt;br /&gt;
|-&lt;br /&gt;
|0.7 ≤ $\alpha$ &amp;lt; 0.9||	Good (Low-Stakes testing)&lt;br /&gt;
|-&lt;br /&gt;
|0.6 ≤ $\alpha$ &amp;lt; 0.7||	Acceptable&lt;br /&gt;
|-&lt;br /&gt;
|0.5 ≤ $\alpha$ &amp;lt; 0.6||	Poor&lt;br /&gt;
|-&lt;br /&gt;
|$\alpha$ &amp;lt; 0.5	||Unacceptable&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Other Measures====&lt;br /&gt;
* '''Intra-class correlation:''' Cronbach’s alpha equals to the stepped-up intra-class correlation coefficient, which is commonly used in observational studies if and only if the value of the item variance component equals zero. If this variance component is negative, then alpha will underestimate the stepped-up intra-class correlation coefficient; if it’s positive, alpha will overestimate the stepped-up intra-class correlation.&lt;br /&gt;
&lt;br /&gt;
====Generalizability theory====&lt;br /&gt;
Cronbach’s alpha is an unbiased estimate of the generalizability. It can be viewed as a measure of how well the sum score on the selected items capture the expected score in the entire domain, even if that domain is heterogeneous. &lt;br /&gt;
&lt;br /&gt;
====Problems with Cronbach’s alpha====&lt;br /&gt;
# it is dependent not only on the magnitude of the correlations among items, but also on the number of items in the scale. Hence, a scale can be made to look more homogenous simply by increasing the number of items though the average correlation remains the same; &lt;br /&gt;
# if two scales each measuring a distinct aspect are combined to form a long scale, alpha would probably be high though the merged scale is obviously tapping two different attributes; &lt;br /&gt;
# if alpha is too high, then it may suggest a high level of item redundancy.&lt;br /&gt;
&lt;br /&gt;
====Split-Half Reliability====&lt;br /&gt;
In Split-Half Reliability assessment, the test is split in half (e.g., odd / even) creating “equivalent forms”. The two “forms” are correlated with each other and the correlation coefficient is adjusted to reflect the entire test length, using the Spearman-Brown Prophecy formula. Suppose the $Corr(Even,Odd)=r$ is the raw correlation between the even and odd items. Then the adjusted correlation will be:$r’ = \frac{n r}{1 + (n-1)r},$ where n = number of items (in this case n=2).&lt;br /&gt;
&lt;br /&gt;
Example:&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:35%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Index||	Q1||	Q2||	Q3||	Q4||	Q5||	Q6||	Odd||	Even&lt;br /&gt;
|-&lt;br /&gt;
|1	||1||	0||	0||	1||	1||	0||	2||	1&lt;br /&gt;
|-&lt;br /&gt;
|2||	1||	1	||0	||1||	0	||1||	1||	3&lt;br /&gt;
|-&lt;br /&gt;
|3||	1||	1||	1||	1||	1||	0||	3||	2&lt;br /&gt;
|-&lt;br /&gt;
|4	||1	||0	||0	||0	||1	||0||	2||	0&lt;br /&gt;
|-&lt;br /&gt;
|5||	1||	1||	1||	1||	0||	0||	2||	2&lt;br /&gt;
|-&lt;br /&gt;
|6	||0||	0	||0	||0	||1	||0	||1||	0&lt;br /&gt;
|-&lt;br /&gt;
| colspan=6 rowspan=4| ||mean||	1.833333333||	1.33333333&lt;br /&gt;
|-&lt;br /&gt;
| SD||	0.752772653||	1.21106014&lt;br /&gt;
|-		&lt;br /&gt;
| corr(Even,Odd)||	0.073127242 || rowspan=2| &lt;br /&gt;
|-	&lt;br /&gt;
| AdjCorr(Even,Odd)=$\frac{n*r}{(n-1)*(r+1)}$|| 0.136288111&lt;br /&gt;
|-	&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====KR-20====&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Kuder%E2%80%93Richardson_Formula_20 Kuder–Richardson Formula 20 (KR-20)] is a very reliable internal reliability estimate which simulates calculating split-half reliability for every possible combination of items. For a test with ''K'' test items indexed ''i''=1 to ''K'':&lt;br /&gt;
$$KR-20 = \frac{K}{K-1} \left( 1 - \frac{\sum_{i=1}^K p_i q_i}{\sigma^2_X} \right),$$&lt;br /&gt;
where $p_i$ is the proportion of ''correct'' responses to test item ''i'', $q_i$ is the proportion of ''incorrect'' responses to test item ''i'' (thus $p_i + q_i= 1$), the variance for the denominator is&lt;br /&gt;
$\sigma^2_X = \frac{\sum_{i=1}^n (X_i-\bar{X})^2\,{}}{n-1},$ and where $n$ is the total sample size.&lt;br /&gt;
&lt;br /&gt;
The Cronbach's α and KR-20 are similar -- KR-20 is a derivative of the Cronbach's α with the advantage that it can handle both dichotomous and continuous variables, however, KR-20 can't be used when multiple-choice questions involve partial credit and require systematic item-based analysis.&lt;br /&gt;
&lt;br /&gt;
====Standard Error of Measurement (SEM)====&lt;br /&gt;
The greater the reliability of the test, the smaller the SEM.&lt;br /&gt;
&lt;br /&gt;
$$SEM=S\sqrt{1-r_{xx}},$$&lt;br /&gt;
where $r_{xx’}$ is the correlation between two instances of the measurements under identical conditions, and $S$ is the total standard deviation.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
* [http://link.springer.com/article/10.1007/s10869-005-8262-4 This article] explores the internal validity and reliability of Kolb’s revised learning style inventory in a sample with 221 graduate and undergraduate business students. It also reviewed research on the LSI and studied on implications of conducting factor analysis using ipsative data (type of data where respondents compare two or more desirable options and pick the one that is most preferred (sometimes called a &amp;quot;forced choice&amp;quot; scale). Experiential learning theory is presented and the concept of learning styles explained. This paper largely supports prior research supporting the internal reliability of scales.&lt;br /&gt;
&lt;br /&gt;
* [https://scholarworks.iupui.edu/bitstream/handle/1805/344/Gliem%20&amp;amp;%20Gliem.pdf?s This article] showed the reason a single-item questions pertaining to a construct are not reliable and should not be used in drawing conclusions. It compared the reliability of a summated, multi-item scale versus a single-item question and showed how unreliable a single item is and therefore not appropriate to make inferences based on analysis of single item question, which are used in measuring a construct.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
&lt;br /&gt;
'''In R:''' using [http://cran.r-project.org/web/packages/psy/psy.pdf the ''psy'' package] and the psychometry dataset (expsy), which is a [http://www.r-tutor.com/r-introduction/data-frame frame] with 30 rows and 16 columns with missing data, where it1-it10 correspond to the rating of 30 patients with a 10 items scale, r1, r2, r3 to the rating of item 1 by 3 different clinicians of the same 30 patients, rb1, rb2, rb3 to the binary transformation of r1, r2, r3 (1 or 2 -&amp;gt; 0; and 3 or 4 -&amp;gt; 1).&lt;br /&gt;
 &lt;br /&gt;
 cronbach(v1)  ## v1 is n*p matrix or data frame with n subjects and p items.&lt;br /&gt;
 ## This phrase is used to compute the Cronbach’s reliability coefficient alpha. &lt;br /&gt;
 ## This coefficient may be applied to a series of items aggregated in a single score. &lt;br /&gt;
 ## It estimates reliability in the framework of the domain sampling model. &lt;br /&gt;
&lt;br /&gt;
An example to calculate Cronbach’s alpha:&lt;br /&gt;
 library(psy)&lt;br /&gt;
 data(expsy)     &lt;br /&gt;
 cronbach(expsy[,1:10])  &lt;br /&gt;
 ## this choose the vector of the columns 1 to 10 and calculated the  Cronbach’s Alpha value&lt;br /&gt;
&lt;br /&gt;
 $\$ $sample.size&lt;br /&gt;
 [1] 27&lt;br /&gt;
 $\$ $number.of.items&lt;br /&gt;
 [1] 10&lt;br /&gt;
 $\$ $alpha&lt;br /&gt;
 [1] 0.1762655&lt;br /&gt;
 ## not good because item 2 is reversed (1 is high and 4 is low)     &lt;br /&gt;
&lt;br /&gt;
 cronbach(cbind(expsy[,c(1,3:10)],-1*expsy[,2]))  &lt;br /&gt;
 ## this choose columns 1 and columns 3 to 10 and added in the reversed column 2, &lt;br /&gt;
 ## and then calculated the Cronbach’s Alpha value for the revised data&lt;br /&gt;
&lt;br /&gt;
 $\$ $sample.size&lt;br /&gt;
 [1] 27&lt;br /&gt;
 $\$ $number.of.items&lt;br /&gt;
 [1] 10&lt;br /&gt;
 $\$ $alpha&lt;br /&gt;
 [1] 0.3752657&lt;br /&gt;
&lt;br /&gt;
 ## better to obtain a 95%confidence interval:     &lt;br /&gt;
 datafile &amp;lt;- cbind(expsy[,c(1,3:10)],-1*expsy[,2])  &lt;br /&gt;
 ## extract the revised data into a new dataset named ‘datafile’&lt;br /&gt;
 library(boot)&lt;br /&gt;
 cronbach.boot &amp;lt;- function(data,x) {cronbach(data[x,])[[3]]}&lt;br /&gt;
 res &amp;lt;- boot(datafile,cronbach.boot,1000)   &lt;br /&gt;
 res&lt;br /&gt;
&lt;br /&gt;
 Call:&lt;br /&gt;
 boot(data = datafile, statistic = cronbach.boot, R = 1000)&lt;br /&gt;
 Bootstrap Statistics :&lt;br /&gt;
     original      bias    std. error&lt;br /&gt;
 t1* 0.3752657 -0.06104997   0.2372292&lt;br /&gt;
&lt;br /&gt;
 quantile(res$\$ $t,c(0.025,0.975))  ## this calculated the 25% and 97.5% value to form the 95% confidence interval of Cronbach’s alpha&lt;br /&gt;
      2.5%      97.5% &lt;br /&gt;
 -0.2987214  0.6330491&lt;br /&gt;
 ## two-sided bootstrapped confidence interval of Cronbach’s alpha boot.ci(res,type=&amp;quot;bca&amp;quot;) &lt;br /&gt;
 ## adjusted bootstrap percentile (BCa) confidence interval (better) &lt;br /&gt;
&lt;br /&gt;
 BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS&lt;br /&gt;
 Based on 1000 bootstrap replicates&lt;br /&gt;
 &lt;br /&gt;
 CALL : &lt;br /&gt;
 boot.ci(boot.out = res, type = &amp;quot;bca&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 Intervals : &lt;br /&gt;
 Level       BCa          &lt;br /&gt;
 95%   (-0.1514,  0.6668 )  &lt;br /&gt;
 Calculations and Intervals on Original Scale&lt;br /&gt;
&lt;br /&gt;
===Cronbach's $\alpha$ calculations===&lt;br /&gt;
The table below illustrates the setting and core calculations involved in computing the Cronbach's $\alpha$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  rowspan=&amp;quot;2&amp;quot;| Subjects || colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot;| Items/Questions Part of the Assessment Instrument|| rowspan=&amp;quot;2&amp;quot; | Total Score per Subject&lt;br /&gt;
|-&lt;br /&gt;
|  $Q_1$ ||$Q_2$ ||... ||$Q_k$&lt;br /&gt;
|-&lt;br /&gt;
|  $S_1$||$Y_{1,1}$||$Y_{1,2}$||…||$Y_{1,k}$||$X_1=\sum_{j=1}^k{Y_{1,j}}$&lt;br /&gt;
|-&lt;br /&gt;
|  $S_2$||$Y_{2,1}$||$Y_{2,2}$||…||$Y_{2,k}$||$X_2=\sum_{j=1}^k{Y_{2,j}}$&lt;br /&gt;
|-&lt;br /&gt;
|  ... ||... ||... ||...||...||...&lt;br /&gt;
|-&lt;br /&gt;
|  $S_n$||$Y_{n,1}$||$Y_{n,2}$||…||$Y_{n,k}$||$X_n=\sum_{j=1}^k{Y_{n,j}}$&lt;br /&gt;
|-&lt;br /&gt;
|  Variance per Item||$\sigma_{Y_{.,1}}^2=\frac{1}{n-1}\sum_{i=1}^n{(Y_{i,1}-\bar{Y}_{.,1})^2}$||$$\sigma_{Y_{.,2}}^2=\frac{1}{n-1}\sum_{i=1}^n{(Y_{i,2}-\bar{Y}_{.,2})^2}$$||…||$$\sigma_{Y_{.,k}}^2=\frac{1}{n-1}\sum_{i=1}^n{(Y_{i,k}-\bar{Y}_{.,k})^2}$$||$$\sigma_X^2=\frac{1}{n-1}\sum_{i=1}^n{(X_i-\bar{X})^2}$$&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cronbach's_alpha  Cronbach's alpha Wikipedia]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Kuder–Richardson_Formula_20  Kuder-Richardson Formula 20 Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_Cronbachs}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13565</id>
		<title>SMHS NonParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_NonParamInference&amp;diff=13565"/>
		<updated>2014-08-29T17:19:10Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&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;
*[http://wiki.stat.ucla.edu/socr/index.php/Probability_and_statistics_EBook#Chapter_XII:_Non-Parametric_Inference  SOCR]&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ANOVA&amp;diff=13564</id>
		<title>SMHS ANOVA</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ANOVA&amp;diff=13564"/>
		<updated>2014-08-29T17:18:22Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Analysis of Variance (ANOVA) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Analysis of Variance (ANOVA) is the common method applied to analyze the differences between group means. In ANOVA, we divide the observed variance into components attributed to different sources of variation. It is widely used statistical technique which provides a statistical test of whether or not the means of several groups are equal, that is ANOVA can be thought as a generalized t-test for more than 2 groups (ANOVA results in the case of 2 groups coincide with the corresponding results of a 2-sample independent t-test). Here we introduce the ANOVA method, specifically one-way ANOVA and two-way ANOVA, with examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the previous two-sample inference, we applied the independent t-test to compare two independent group means. What if we want to compare k (k&amp;gt;2) independent samples? In this case, we will need to decompose the entire variation into components allowing us to analyze the variance of the entire dataset. Suppose 5 varieties of products are tested for further study. A filed was divided into 20 plots, with each variety planted in four plots. The measurements are shown in the table 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:35%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|A	||B||	C||	D||	E&lt;br /&gt;
|-&lt;br /&gt;
|26.2||	29.2||	29.1	||21.3||	20.1&lt;br /&gt;
|-&lt;br /&gt;
|24.3||	28.1	||30.8	||22.4||	19.3&lt;br /&gt;
|-&lt;br /&gt;
|21.8	||27.3||	33.9||	24.3	||19.9&lt;br /&gt;
|-&lt;br /&gt;
|28.1||	31.2||	32.8||	21.8||	22.1&lt;br /&gt;
|-&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:35%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|A||	26.2,24.3,21.8,28.1&lt;br /&gt;
|-&lt;br /&gt;
|B||	29.2,28.1,27.3,31.2&lt;br /&gt;
|-&lt;br /&gt;
|C||	29.1,30.8,33.9,32.8&lt;br /&gt;
|-&lt;br /&gt;
|D||	21.3,22.4,24.3,21.8&lt;br /&gt;
|-&lt;br /&gt;
|E||	20.1,19.3,19.9,22.1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using ANOVA, the data are regarded as random samples from k populations. Suppose the population means of the sample are denoted as $\mu_{1},\mu_{2},\mu_{3},\mu_{4},\mu_{5}$and their population standard deviation are denoted as $\sigma_{1},\sigma_{2},\sigma_{3},\sigma_{4},\sigma_{5}$. An obvious method is to do $\binom{5}{2}=10$ separate t-tests and compare all independent pairs of groups. In this case, ANOVA would be much easier and powerful.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
====One-way ANOVA====&lt;br /&gt;
One-way ANOVA expands our inference methods to study and compare k independent samples. In this case, we will be decomposing the entire variation in the data into independent components.&lt;br /&gt;
&lt;br /&gt;
*Notations first: $y_{ij}$ is the measurement from group $i$, observation index $j$; $k$ is the number of groups; $n_{i}$ is the number of observations in group $i$; $n$ is the total number of observations and $n=n_{1}+n_{2}+⋯+n_{k}$. The group mean for group $i$ is $\bar y_{l}$=$\frac{\sum_{j=1}^{n_{i}} y_{ij}} {n_{i}}$, the grand mean is $\bar y =\bar y_{..}=$ $\frac{\sum_{i=1}^{k}\sum_{j=1}^{n}_{i}y_{ij}}{n}$&lt;br /&gt;
&lt;br /&gt;
*Difference between the means (compare each group mean to the grand mean): total variance $SST(total)=\sum_{i=1}^{k}\sum_{j=1}^{n_i}(y_{ij}-(\bar y_{..})^{2}$, degrees of freedom $df(total)=n-1$; difference between each group mean and grand mean: $SST(between)$=$\sum_{i=1}^{k} \sum_{j=1}^{n_i}(y_{ij}-\bar y_{..})^{2}$, degrees of freedom $df(between)=k-1$; Sum square due to error (combination of variation within group):$SSE=\sum_{i=1}^{k} n_{i}(\bar y_{l.}- \bar y_{..})^2$, degrees of freedom $df(within)=n-k$. With ANOVA decomposition, we have $\sum_{i=1}^{k} {\sum_{j=1}^{n_{i}} {(y_{ij}- \bar y_{..})^2 }} = \sum_{i=1}^{k} {n_{i} (y_{l.}-\bar y_{..})^2} + \sum_{i=1}^{k} {\sum_{j=1}^{n_i} {(y_{ij}-\bar y_{l.})^2}},$ that is $SST(total)$=$SST(between)$+$SSE(within)$ and $df(total)$=$df(between)$+$df(within).$&lt;br /&gt;
&lt;br /&gt;
*Calculations: &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:50%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Variance Source || Degrees of Freedom (df) || Sum  of Squares (SS) || Mean Sum  of Squares (MS) || F-Statistics || [http://socr.ucla.edu/htmls/SOCR_Distributions.html P-value]&lt;br /&gt;
|-&lt;br /&gt;
| Treatment Effect (Between Group) || k-1 || &amp;lt;math&amp;gt;\sum_{i=1}^{k}{n_i(\bar{y}_{i,.}-\bar{y})^2}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;MST(Between)={SST(Between)\over df(Between)}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;F_o = {MST(Between)\over MSE(Within)}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;P(F_{(df(Between), df(Within))} &amp;gt; F_o)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Error (Within Group) || n-k || &amp;lt;math&amp;gt;\sum_{i=1}^{k}{\sum_{j=1}^{n_i}{(y_{i,j}-\bar{y}_{i,.})^2}}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;MSE(Within)={SSE(Within)\over df(Within)}&amp;lt;/math&amp;gt; ||  || [http://socr.ucla.edu/Applets.dir/Normal_T_Chi2_F_Tables.htm F-Distribution Calculator]&lt;br /&gt;
|-&lt;br /&gt;
| Total || n-1 || &amp;lt;math&amp;gt;\sum_{i=1}^{k}{\sum_{j=1}^{n_i}{(y_{i,j} - \bar{y})^2}}&amp;lt;/math&amp;gt; ||   ||  || [[SOCR_EduMaterials_AnalysisActivities_ANOVA_1 | ANOVA Activity]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ANOVA hypotheses (general form): $H_{\sigma}:\mu_{1}=\mu_{2}=⋯=\mu_{k}$; $H_{a}:\mu_{I}≠\mu_{j}$ for some $i≠j$.  The test statistics: $F_{0}=\frac{MST(between)}{MSE(within)}$ , if $F_{0}$ is large, then there is a lot between group variation, relative to the within group variation. Therefore, the discrepancies between the group means are large compared to the variability within the groups (error). That is large $F_{0}$ provides strong evidence against $H_{0}$.&lt;br /&gt;
&lt;br /&gt;
*Examples: given the following data from a hands-on study.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:35%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| ||	colspan=3|Groups&lt;br /&gt;
|-		&lt;br /&gt;
|Index||	A||	B||	C&lt;br /&gt;
|-&lt;br /&gt;
|1 ||	0||	1||	4&lt;br /&gt;
|-&lt;br /&gt;
|2||	1||	0||	5&lt;br /&gt;
|-&lt;br /&gt;
|3||	||2||	&lt;br /&gt;
|-&lt;br /&gt;
|$n_{i}$||	2||	3||	2&lt;br /&gt;
|-&lt;br /&gt;
| $s$	||1||	3||	9&lt;br /&gt;
|-&lt;br /&gt;
|$\bar y_{l}$||	0.5||	1||	4.5&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using this data, we have the following ANOVA 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:50%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Variance Source || Degrees of Freedom (df) || Sum  of Squares (SS) || Mean Sum  of Squares (MS) || F-Statistics || [http://socr.ucla.edu/htmls/dist/Fisher_Distribution.html P-value]&lt;br /&gt;
|-&lt;br /&gt;
| Treatment Effect (Between Group) || 3-1 || &amp;lt;math&amp;gt;\sum_{i=1}^{k}{n_i(\bar{y}_{i,.}-\bar{y})^2}=19.86&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;{SST(Between)\over df(Between)}={19.86\over 2}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;F_o = {MST(Between)\over MSE(Within)}=13.24&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;P(F_{(df(Between), df(Within))} &amp;gt; F_o)=0.017&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Error (Within Group) || 7-3 || &amp;lt;math&amp;gt;\sum_{i=1}^{k}{\sum_{j=1}^{n_i}{(y_{i,j}-\bar{y}_{i,.})^2}}=3&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;{SSE(Within)\over df(Within)}={3\over 4}&amp;lt;/math&amp;gt; ||  || [http://socr.ucla.edu/Applets.dir/Normal_T_Chi2_F_Tables.htm F-Distribution Calculator]&lt;br /&gt;
|-&lt;br /&gt;
| Total || 7-1 || &amp;lt;math&amp;gt;\sum_{i=1}^{k}{\sum_{j=1}^{n_i}{(y_{i,j} - \bar{y})^2}}=22.86&amp;lt;/math&amp;gt; ||   ||  || [[SOCR_EduMaterials_AnalysisActivities_ANOVA_1 | Anova Activity]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the ANOVA table above, we can reject the null hypothesis at $\alpha=0.05.$&lt;br /&gt;
&lt;br /&gt;
*ANOVA conditions: valid if (1) design conditions: all groups of observations represent random samples from their population respectively. Plus, all the observations within each group are independent of each other; (2) population conditions: the k population distributions must be approximately normal. If sample size is large, the normality condition is less crucial. Plus, the standard deviations of all populations are equal, which can be slightly relaxed when $0.5≤\frac{\sigma_{i}}{\sigma_{j}}≤2,$ for all $i$ and $j$, none of the population variance is twice larger than any of the other ones.&lt;br /&gt;
&lt;br /&gt;
====Two-way ANOVA====&lt;br /&gt;
Two-way ANOVA decomposes the variance of a dataset into independent (orthogonal) components when we have two grouping factors.&lt;br /&gt;
Notations first: two-way model:$y_{ijk}=\mu+\tau_{i}+\beta_{j}+γ_{ij}+\varepsilon_{ijk},$ for all $1≤i≤a,1≤j≤b$ and $1≤k≤r.$ $y_{ijk}$ is the A-factor level $i$, and B-factor level $j$, observation-index $k$ measurement; $k$ is the number of replications; $a_{i}$ is the number of A-factor observations at level $i,a=a_{1}+⋯+a_{I}$; $b_{j}$ is the number of B-factor observations at level $j$, $b=b_{1}+⋯+b_{J}$; $N$ is the total number of observations and $N=a*a*b$. Here $\mu$ is the overall mean response, $\tau_{i}$ is the effect due to the $i^{th}$ level of factor A, $\beta_{j}$ is the effect due to the $j^{th}$ level of factor B, and $\gamma_{ij}$ is the effect due to any interaction between the $i^{th}$ level of factor A and $j^{th}$ level of factor B. The mean for A-factor group mean at level $I$ and B-factor at level $j$ is $\bar{y}_{ij.}=\frac{\sum_{k=1}^{r} {y_{ijk}}} {r},$ the grand mean is $\bar {y} =\bar{y}_{...} = \frac{\sum_{k=1}^{r} {\sum_{i=1}^{a} {\sum_{j=1}^{b} {y_{ijk}}}}} {n}$, and we have we have $SST(total)=SS(A)+SS(B)+SS(AB)+SSE$.&lt;br /&gt;
&lt;br /&gt;
*Hypotheses: &lt;br /&gt;
**Null hypotheses: (1) the population means of the first factor are equal, which is like the one-way ANOVA for the row factor; (2) the population means of the second factor are equal, which is like the one-way ANOVA for the column factor; (3) there is no interaction between the two factors, which is similar to performing a test for independence with contingency tables.&lt;br /&gt;
**Factors: factor A and factor B are independent variables in two-way ANOVA.&lt;br /&gt;
**Treatment groups: formed by making all possible combinations of two factors. For example, if the factor A has 3 levels and factor B has 5 levels, then there will be 3*5=15 different treatment groups.&lt;br /&gt;
**Main effect: involves the dependent variable one at a time. The interaction is ignored for this part. &lt;br /&gt;
**Interaction effect: the effect that one factor has on the other factor. The degree of freedom is the product of the two degrees of freedom of each factor.&lt;br /&gt;
&lt;br /&gt;
*Calculations: &lt;br /&gt;
It is assumed that main effect A has ''a'' levels (and df(A) = a-1), main effect B has ''b'' levels (and (df(B) = b-1), ''r'' is the sample size of each treatment, and &amp;lt;math&amp;gt;N = a\times b\times n&amp;lt;/math&amp;gt; is the total sample size. Notice the overall degree of freedom is once again one less than the total sample size.&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:50%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Variance Source || Degrees of Freedom (df) || Sum  of Squares (SS) || Mean Sum  of Squares (MS) || F-Statistics || [http://socr.umich.edu/html/dist/ P-value]&lt;br /&gt;
|-&lt;br /&gt;
| Main Effect A || df(A)=a-1 || &amp;lt;math&amp;gt;SS(A)=r\times b\times\sum_{i=1}^{a}{(\bar{y}_{i,.,.}-\bar{y})^2}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;{SS(A)\over df(A)}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;F_o = {MS(A)\over MSE}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;P(F_{(df(A), df(E))} &amp;gt; F_o)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Main Effect B || df(B)=b-1 || &amp;lt;math&amp;gt;SS(B)=r\times a\times\sum_{j=1}^{b}{(\bar{y}_{., j,.}-\bar{y})^2}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;{SS(B)\over df(B)}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;F_o = {MS(B)\over MSE}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;P(F_{(df(B), df(E))} &amp;gt; F_o)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| A vs.B Interaction || df(AB)=(a-1)(b-1) || &amp;lt;math&amp;gt;SS(AB)=r\times \sum_{i=1}^{a}{\sum_{j=1}^{b}{((\bar{y}_{i, j,.}-\bar{y}_{i, .,.})+(\bar{y}_{., j,.}-\bar{y}))^2}}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;{SS(AB)\over df(AB)}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;F_o = {MS(AB)\over MSE}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;P(F_{(df(AB), df(E))} &amp;gt; F_o)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Error || &amp;lt;math&amp;gt;N-a\times b&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;SSE=\sum_{k=1}^r{\sum_{i=1}^{a}{\sum_{j=1}^{b}{(\bar{y}_{i, j,k}-\bar{y}_{i, j,.})^2}}}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;{SSE\over df(Error)}&amp;lt;/math&amp;gt; ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Total || N-1 || &amp;lt;math&amp;gt;SST=\sum_{k=1}^r{\sum_{i=1}^{a}{\sum_{j=1}^{b}{(\bar{y}_{i, j,k}-\bar{y}_{., .,.})^2}}}&amp;lt;/math&amp;gt; ||   ||  || [[SOCR_EduMaterials_AnalysisActivities_ANOVA_2 | ANOVA Activity]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Two-way ANOVA is valid if:&lt;br /&gt;
:: (1) the population from which the samples were obtained must be normally or approximately normally distributed; &lt;br /&gt;
:: (2) the samples must be independent; &lt;br /&gt;
:: (3) the variances of the populations must be equal; (4) the groups must have the same sample size.&lt;br /&gt;
&lt;br /&gt;
* Example: [http://wiki.stat.ucla.edu/socr/index.php/AP_Statistics_Curriculum_2007_ANOVA_2Way clinical example  of knee pain study]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
* [[SOCR_EduMaterials_Activities_BoxAndWhiskerChart|This activity]] presents the Box and Whisker Chart, which is often used in exploratory data analyses. It demonstrates the range, standard deviation, mean and quartiles of the values and is especially useful in comparing statistical data. This article illustrated the implementation of the chart in SOCR with comprehensive introduction. It also included the application of this method in different areas.&lt;br /&gt;
&lt;br /&gt;
* [[SOCR_EduMaterials_AnalysisActivities_ANOVA_2|The SOCR Two-Way ANOVA Java Applet]] includes examples of two-way analysis of variance using SOCR tools. It illustrated the application of two-way ANOVA with examples applied in the SOCR. It also expanded the two-way ANOVA in softwares like R and SAS.&lt;br /&gt;
&lt;br /&gt;
* [[SOCR_Activity_ANOVA_SnailsSexualDimorphism| Ther SOCR Snails Sexual Dimorphism Activity]] shows an application of ANOVA. This activity recreates part of the design of a classification method for the Cocholotoma septemspirale snail. By observing multiple traits of the shells, the original researchers were able to decide on a series of dimorphisms (difference in forms) between male and female snails. This article presents a comprehensive illustration of the example.&lt;br /&gt;
&lt;br /&gt;
===Software ===&lt;br /&gt;
* [http://socr.umich.edu/html/ana/ SOCR Analyses Java Applets]&lt;br /&gt;
* [[SOCR_EduMaterials_AnalysisActivities_ANOVA_1 | One-Way ANOVA Activity]]&lt;br /&gt;
* R: &lt;br /&gt;
 # fit a  model &lt;br /&gt;
 # one-way ANOVA with completely randomized design&lt;br /&gt;
 fit &amp;lt;- aov(y ~ A, data = mydata)&lt;br /&gt;
 # randomized block design (B as the blocking factor)&lt;br /&gt;
 fit &amp;lt;- aov(y ~ A + B, data = mydata)&lt;br /&gt;
 # two-way factorial design&lt;br /&gt;
 fit &amp;lt;- aov(y ~ A + B + A*B, data = mydata)&lt;br /&gt;
 # to check out the model fitted with type I ANOVA table&lt;br /&gt;
 summary(fit)&lt;br /&gt;
 # type III SS and F test&lt;br /&gt;
 drop1(fit, ~., test=’F’)&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
* Tom was shopping for a ping pong table that could be taken apart quickly and easily. For some reason, the salesman happened to have a table of the assembly times (sec) for the three tables. Using ANOVA, do you think there is a difference in the average time of assembly for the three brands of ping pong tables?&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center;&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Assembly_time_(sec)||Brand&lt;br /&gt;
|-&lt;br /&gt;
| 93.0||1&lt;br /&gt;
|-&lt;br /&gt;
| 67.0||1&lt;br /&gt;
|-&lt;br /&gt;
| 77.0||1&lt;br /&gt;
|-&lt;br /&gt;
| 92.0||1&lt;br /&gt;
|-&lt;br /&gt;
| 97.0||1&lt;br /&gt;
|-&lt;br /&gt;
| 62.0||1&lt;br /&gt;
|-&lt;br /&gt;
| 136.0||2&lt;br /&gt;
|-&lt;br /&gt;
| 120.0||2&lt;br /&gt;
|-&lt;br /&gt;
| 115.0||2&lt;br /&gt;
|-&lt;br /&gt;
| 104.0||2&lt;br /&gt;
|-&lt;br /&gt;
| 115.0||2&lt;br /&gt;
|-&lt;br /&gt;
| 121.0||2&lt;br /&gt;
|-&lt;br /&gt;
| 102.0||2&lt;br /&gt;
|-&lt;br /&gt;
| 130.0||2&lt;br /&gt;
|-&lt;br /&gt;
| 198.0||3&lt;br /&gt;
|-&lt;br /&gt;
| 217.0||3&lt;br /&gt;
|-&lt;br /&gt;
| 209.0||3&lt;br /&gt;
|-&lt;br /&gt;
| 221.0||3&lt;br /&gt;
|-&lt;br /&gt;
| 190.0||3&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: (a) We can say that there is no reason to reject the null that the average assembly times are the same&lt;br /&gt;
: (b) We should reject the null that the average assembly times are the same&lt;br /&gt;
&lt;br /&gt;
* Based on the data in the previous problem, what is the value for R square:&lt;br /&gt;
: (a) 0.342&lt;br /&gt;
: (b) 0.143&lt;br /&gt;
: (c) 0.832&lt;br /&gt;
: (d) 0.943&lt;br /&gt;
&lt;br /&gt;
* Tom is curious to see if two-door vehicles drive faster on average than four-door vehicles. He parks behind a bush so as not to be seen, and records the car type and the speed reading. Here are the results (1 means two-door, and 2 means four-door):&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center;&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Speed_(MPH)||Vehicle_Type&lt;br /&gt;
|-&lt;br /&gt;
| 45||2&lt;br /&gt;
|-&lt;br /&gt;
| 45||2&lt;br /&gt;
|-&lt;br /&gt;
| 40||2&lt;br /&gt;
|-&lt;br /&gt;
| 69||1&lt;br /&gt;
|-&lt;br /&gt;
| 72||1&lt;br /&gt;
|-&lt;br /&gt;
| 40||1&lt;br /&gt;
|-&lt;br /&gt;
| 75||2&lt;br /&gt;
|-&lt;br /&gt;
| 19||2&lt;br /&gt;
|-&lt;br /&gt;
| 62||1&lt;br /&gt;
|-&lt;br /&gt;
| 43||2&lt;br /&gt;
|-&lt;br /&gt;
| 75||1&lt;br /&gt;
|-&lt;br /&gt;
| 42||2&lt;br /&gt;
|-&lt;br /&gt;
| 58||1&lt;br /&gt;
|-&lt;br /&gt;
| 58||1&lt;br /&gt;
|-&lt;br /&gt;
| 47||2&lt;br /&gt;
|-&lt;br /&gt;
| 48||2&lt;br /&gt;
|-&lt;br /&gt;
| 49||2&lt;br /&gt;
|-&lt;br /&gt;
| 45||2&lt;br /&gt;
|-&lt;br /&gt;
| 54||2&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: At the 1% significance level, should we reject the null hypothesis that that average speed is the same for both types of vehicles?&lt;br /&gt;
: (a) Yes, we should reject the null hypothesis.&lt;br /&gt;
: (b) No, we should not reject the null hypothesis.&lt;br /&gt;
: (c) There is not enough information.&lt;br /&gt;
&lt;br /&gt;
*  Based on data above, what is the value for R square?&lt;br /&gt;
: (a) 0.432&lt;br /&gt;
: (b) 0.983&lt;br /&gt;
: (c) 0.308&lt;br /&gt;
: (d) 0.231&lt;br /&gt;
&lt;br /&gt;
*  In a two-way ANOVA test, which of the following is not the typical null hypothesizes?&lt;br /&gt;
: (a) The population means of the first factor are equal.&lt;br /&gt;
: (b) The population means of the first and second factor are equal.&lt;br /&gt;
: (c) The population means of the second factor are equal.&lt;br /&gt;
: (d) There is no interaction between the two factors.&lt;br /&gt;
&lt;br /&gt;
*  Suppose that two factors, A and B, is thought to affect the top speed of a car. We will use two-way ANOVA analysis. Are the population means of factor A equal?&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center;&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Top_Speed||A||B&lt;br /&gt;
|-&lt;br /&gt;
| 93.0||1||1&lt;br /&gt;
|-&lt;br /&gt;
| 136.0||1||2&lt;br /&gt;
|-&lt;br /&gt;
| 198.0||1||3&lt;br /&gt;
|-&lt;br /&gt;
| 88.0||2||1&lt;br /&gt;
|-&lt;br /&gt;
| 148.0||2||2&lt;br /&gt;
|-&lt;br /&gt;
| 279.0||2||3&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
: (a) Yes, they are equal.&lt;br /&gt;
: (b) No, they are not equal.&lt;br /&gt;
&lt;br /&gt;
* Use the data above and apply the two-way ANOVA analysis, are the population means of factor B equal?&lt;br /&gt;
: (a) Yes, they are equal.&lt;br /&gt;
: (b) No, they are not equal.&lt;br /&gt;
&lt;br /&gt;
*  Use data from problem 6.6 and apply the two-way ANOVA analysis, is there an interaction effect between the two factors&lt;br /&gt;
: (a) Yes, they are equal.&lt;br /&gt;
: (b) No, they are not equal.&lt;br /&gt;
&lt;br /&gt;
=== References===&lt;br /&gt;
* [http://wiki.stat.ucla.edu/socr/index.php/Probability_and_statistics_EBook#Chapter_XI:_Analysis_of_Variance_.28ANOVA.29  SOCR]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Analysis_of_variance  ANOVA Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_ANOVA}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13563</id>
		<title>SMHS ROC</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ROC&amp;diff=13563"/>
		<updated>2014-08-29T17:16:10Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /*  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;
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=$\frac{\sum Condition\, positive}{\sum Total\, population}$ ||&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2|Screening Test||Positive||a (True positives)||b (False positives)||Positive predictive value (PPV)=$\frac{\sum Ture\, positive}{\sum Test\,positives}$||False discovery rate (FDR)=$\frac{\sum False\, positive}{\sum Test\, positive}$&lt;br /&gt;
|-&lt;br /&gt;
|Negative||c (False negatives)||d (True negatives)||False omission rate (FOR)=$\frac{\sum False\, negative} {\sum Test\, negative}$||Negative predictive value (NPV)=$\frac{\sum True\, negative}{\sum Test\, negative}$&lt;br /&gt;
|-&lt;br /&gt;
| ||Positive Likelihood Ratio=TPR/FBR||True positive rate (TPR)=$\frac{\sum True\, positive} {\sum Condition\, positive}$||False positive rate (FPR)=$\frac{\sum False\, positive}{\sum Condition\, positive}$||Accuracy(ACC)=$\frac{\sum True\, positive}+ {\sum True\, negative} {\sum Total\, population}$| ||&lt;br /&gt;
|-&lt;br /&gt;
| ||Negative Likelihood Ratio=FNR/TNR||False negative rate (FNR)=$\frac{\sum False\, negative} {\sum condition\, negative}$||True negative rate (TNR)=$\frac{\sum True\, negative}{\sum Condition\, negative}$||True negative rate (TNR)=$\frac\sum True\, negative}{\sum Condition\, negative}$| || &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;		&lt;br /&gt;
&lt;br /&gt;
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;
 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;
&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;
[http://pubs.rsna.org/doi/abs/10.1148/radiology.143.1.7063747 This article] 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;
[http://www.sciencedirect.com/science/article/pii/S0001299878800142 This article] 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;
===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;
===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;
===References===&lt;br /&gt;
&lt;br /&gt;
*[http://gim.unmc.edu/dxtests/ROC1.htm  Introduction to ROC Curves]&lt;br /&gt;
*[http://gim.unmc.edu/dxtests/roc2.htm  Plotting and Intrepretting an ROC Curve]&lt;br /&gt;
*[http://gim.unmc.edu/dxtests/roc3.htm  The Area Under an ROC Curve]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Receiver_operating_characteristic  ROC Wikipedia]&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_SLR&amp;diff=13562</id>
		<title>SMHS SLR</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_SLR&amp;diff=13562"/>
		<updated>2014-08-29T17:14:06Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Correlation and Simple Linear Regression (SLR) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Many scientific applications involve the analysis of relationships between two or more variables involved in studying a process of interest. In this section, we are going to study on the correlations between 2 variables and start with simple linear regressions. Consider the simplest of all situations where Bivariate data (X and Y) are measured for a process and we are interested in determining the association with an appropriate model for the given observations. The first part of this lecture will discuss about correlation and then we are going to talk about SLR to address correlations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The analysis of relationships, if any, between two or more variables involved in the process of interest is widely needed in various studies. We begin with the simplest of all situations where bivariate data (X and Y) are measured for a process and we are interested in determining the association, relation or an appropriate model for these observations (e.g., fitting a straight line to the pairs of (X,Y) data). For example, we measured students of their math scores in the final exam and we want to find out if there is any association between the final score and their participation rate in the math class. Or we are interested to find out if there is any association between weight and lung capacity. Simple linear regression would certainly be a simple way to start and it can address the association very well in simple cases.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
*Correlation: correlation efficient $(-1≤\rho≤1)$ is a measure of linear association or clustering around a line of multivariate data. The main relationship between two variables (X,Y) can be summarized by $(\mu_{X},\sigma_{X})$,$(\mu_{Y},\sigma_{Y})$ and the correlation coefficient denoted by $\rho$=$\rho(X,Y)$.&lt;br /&gt;
**The correlation is defined only if both of the standard deviations are finite and are nonzero and it is bounded by -1≤$\rho$≤1.&lt;br /&gt;
**If $\rho$=1, perfect positive correlation (straight line relationship between the two variables); if $\rho$=0, no correlation (random cloud scatter), i.e., no linear relation between X and Y; if $\rho$=-1, a perfect negative correlation between the variables.&lt;br /&gt;
**$\rho(X,Y)$ $=\frac{cov(X,Y)}{\sigma_{X}\sigma_{Y}}$=$\frac{E((X-μ_{X})(Y-μ_{Y}))}{\sigma_{X}\sigma_{Y}}$=${E(XY)-E(X)E(Y)}\over{\sqrt{E(X^{2})-E^{2}(X)}\sqrt{E(Y^{2})-E^{2}(Y)}},$ where E is the expectation operator, and cov is the covariance. $\mu_{X}=E(X)$,$\sigma_{X}^{2}=E(X^{2})-E^{2}(X),$ and similarly for the second variable, Y, and $cov(X,Y)=E(XY)-E(X)*E(Y)$. &lt;br /&gt;
**Sample correlation: replace the unknown expectations and standard deviations by sample mean and sample standard deviation: suppose ${X_{1},X_{2},…,X_{n}}$ and ${Y_{1},Y_{2},…,Y_{n}}$ are bivariate observations of the same process and $(\mu_{X}$,$\sigma_{X})$,$\mu_{Y},\sigma_{Y})$ are the mean and standard deviations for the X and Y measurements respectively. $\rho(x,y)=\frac{\sum x_{i} y_{i}-n\bar{x}\bar{y}}{(n-1)s_{x} s_{y}}$=$\frac{n \sum x_{i} y_{i}-\sum x_{i}\sum y_{i}} {{\sqrt{n\sum x_{i}^{2} -(\sum x_{i})^{2}}} {\sqrt{ n\sum y_{i}^{2}-y_{i})^{2}}}}$; $\rho(x,y)=\frac{\sum(x_{i}-\bar x)(y_{i}-\bar y)}{(n-1)s_{x} s_{y}}$ $=\frac{1}{n-1}$ $\sum$ $\frac{x_{i}-\bar x}{s_{x}}\frac{y_{i}-\bar y}{s_{y}}$, $\bar X$ and $\bar y$ are the sample mean for $X$ and $Y$, $s_{x}$ and $s_{y}$ are the sample standard deviation for $X$ and $Y$. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Example: Human weight and height (suppose we took only 6 of the over 25000 observations of human weight and height included in [http://wiki.stat.ucla.edu/socr/index.php/SOCR_Data_Dinov_020108_HeightsWeights SOCR dataset ].&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:95%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Subject Index|| Height $(x_{i})$ in cm || Weight $(y_{i})$ in kg || $x_{i}-\bar x$ ||$y_{i}-\bar y$ || $(x_{i}-\bar x)^{2}$ || $(y_{i}-\bar y)^{2}$ ||$(x_{i}-\bar x)(y_{i}-\bar y)$ &lt;br /&gt;
|-&lt;br /&gt;
|1||167||60||	6||	4.6||	36||	21.82||	28.02&lt;br /&gt;
|-&lt;br /&gt;
|2||	170||	64||	9||	8.67	||81||	75.17||	78.03&lt;br /&gt;
|-&lt;br /&gt;
|3||	160||	57||	-1||	1.67||	1||	2.79||	-1.67&lt;br /&gt;
|-&lt;br /&gt;
|4||	152||	46||	-9||	-9.33||	81||	87.05	||83.97&lt;br /&gt;
|-&lt;br /&gt;
|5||	157||	55||	-4||	-0.33||	16||	0.11||	1.32&lt;br /&gt;
|-&lt;br /&gt;
|6||	160||	50||	-1||	-5.33||	1||	28.41||	5.33&lt;br /&gt;
|-&lt;br /&gt;
|Total||966	||332	||0	||0	||216||	215.33||195&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$\bar x\frac{966}{6}=161,\bar y=\frac{322}{6}= 55,s_{x}=\sqrt{\frac{216.5}{5}}=6.57, s_{y}=\sqrt{\frac {215.3}{5}}=6.56.$&lt;br /&gt;
&lt;br /&gt;
$\rho(x,y)=\frac{1}{n-1}$ $\sum$ $\frac{x_{i}-\bar x}{s_{x}}\frac{y_{1}-\bar y}{s_{y}}=0.904$&lt;br /&gt;
&lt;br /&gt;
'''Slope inference:''' we can conduct inference based on the linear relationship between two quantitative variables by inference on the slope. The basic idea is that we conduct a linear regression of the dependent variable on the predictor suppose they have a linear relationship and we came up with the linear model of y=α+βx+ε, and β is referred to as the true slope of the linear relationship and α represents the intercept of the true linear relationship on y-axis and ε is the random variation. We have talked about the slope in the linear regression, which describes the change in dependent variable y concerned with change in x.&lt;br /&gt;
&lt;br /&gt;
*Test of the significance of the slope β: (1) is there evidence of a real linear relationship which can be done by checking the fit of the residual plots and the initial scatterplots of y vs. x; (2) observations must be independent and the best evidence would be random sample; (3) the variation about the line must be constant, that is the variance of the residuals should be constant which can be checked by the plots of the residuals; (4) the response variable must have normal distribution centered on the line which can be checked with a histogram or normal probability plot. &lt;br /&gt;
*Formula we use:$ t=\frac{b-\beta}{SE_{b}}$ , where b stands for the statistic value, $\beta$ is the parameter we are testing on, $SE_{b}$ is the measure of the variation. For the null hypothesis is the $\beta$=0 that is there is no relationship between y and x, so under the null hypothesis, we have the test statistic $t=\frac {b} {SE_{b}}$.&lt;br /&gt;
&lt;br /&gt;
*Consider a research conducted on see if body fat is associated with age. The data included 18 subjects with the percentage of body fat and the age of the subjects.&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:35%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Age|| Percentage of Body Fat&lt;br /&gt;
|-&lt;br /&gt;
|23||9.5&lt;br /&gt;
|-&lt;br /&gt;
|23||27.9&lt;br /&gt;
|-&lt;br /&gt;
|27||7.8&lt;br /&gt;
|-&lt;br /&gt;
|27||	17.8&lt;br /&gt;
|-&lt;br /&gt;
|39	||31.4&lt;br /&gt;
|-&lt;br /&gt;
|41||	25.9&lt;br /&gt;
|-&lt;br /&gt;
|45	||27.4&lt;br /&gt;
|-&lt;br /&gt;
|49||	25.2&lt;br /&gt;
|-&lt;br /&gt;
|50	||31.1&lt;br /&gt;
|-&lt;br /&gt;
|53	||34.7&lt;br /&gt;
|-&lt;br /&gt;
|53	||42&lt;br /&gt;
|-&lt;br /&gt;
|54	||29.1&lt;br /&gt;
|-&lt;br /&gt;
|56	||32.5&lt;br /&gt;
|-&lt;br /&gt;
|57	||30.3&lt;br /&gt;
|-&lt;br /&gt;
|58||	33&lt;br /&gt;
|-&lt;br /&gt;
|58||	33.8&lt;br /&gt;
|-&lt;br /&gt;
|60||	41.1&lt;br /&gt;
|-&lt;br /&gt;
|61||	34.5&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The hypothesis tested: $H_{0}:\beta=0$ vs.$H_{a}:\beta\ne0;$ a t-test would be the test we are going to use here given that the data drawn is a random sample from the population. &lt;br /&gt;
&lt;br /&gt;
 In R &lt;br /&gt;
 ###&lt;br /&gt;
 ###&lt;br /&gt;
 ## first check the linearity of the relationship using a scatterplot&lt;br /&gt;
 x &amp;lt;- c(23,23,27,27,39,41,45,49,50,53,53,54,56,57,58,58,60,61)&lt;br /&gt;
 y &amp;lt;- c(9.5,27.9,7.8,17.8,31.4,25.9,27.4,25.2,31.1,34.7,42,29.1,32.5,30.3,33,33.8,41.1,34.5)&lt;br /&gt;
 plot(x,y,main='Scatterplot',xlab='Age',ylab='% fat')&lt;br /&gt;
 cor(x,y)&lt;br /&gt;
&lt;br /&gt;
 [1] 0.7920862&lt;br /&gt;
&lt;br /&gt;
[[Image:SMHS SLR Fig 1.png|500px]]&lt;br /&gt;
&lt;br /&gt;
The scatterplot shows that there is a linear relationship between x and y, and there is strong positive association of $r=0.7920862$ which further confirms the eye-bow test from the scatterplot about the linear relationship of age and percentage of body fat. &lt;br /&gt;
&lt;br /&gt;
Then we fit a simple linear regression of y on x and draw the scatterplot along with the fitted line:&lt;br /&gt;
&lt;br /&gt;
 fit &amp;lt;- lm(y~x)&lt;br /&gt;
 &lt;br /&gt;
 plot(x,y,main='Scatterplot',xlab='Age',ylab='% fat') &lt;br /&gt;
 &lt;br /&gt;
 abline(fit)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:SMHS SLR Fig 2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 summary(fit)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Call:&lt;br /&gt;
 lm(formula = y ~ x)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Residuals:&lt;br /&gt;
 Min       1Q   Median       3Q      Max &lt;br /&gt;
 -10.2166  -3.3214  -0.8424   1.9466  12.0753 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Coefficients:&lt;br /&gt;
 Estimate Std. Error t value Pr(&amp;gt;|t|) &lt;br /&gt;
 (Intercept)   3.2209     5.0762   0.635    0.535 &lt;br /&gt;
 x        0.5480     0.1056   5.191 8.93e-05 \***&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 plot(fit$\$ $resid,main='Residual Plot')&lt;br /&gt;
 abline(y=0)&lt;br /&gt;
&lt;br /&gt;
[[Image:SMHS SLR Fig3.png|500px]]&lt;br /&gt;
&lt;br /&gt;
 qqnorm(fit$\$ $resid)  # check the normality of the residuals&lt;br /&gt;
&lt;br /&gt;
[[Image:SMHS SLR Fig4.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From the residual plot and the QQ plot of residuals we can see that meet the constant variance and normality requirement with no heavy tails and the regression model is reasonable. From the summary of the regression model we have the t-test on the slope has the t value is 5.191 and the p-value is 8.93 e-05. We can reject the null hypothesis of no linear relationship and conclude that is significant linear relationship between age and percentage of body fat at 5% level of significance. &lt;br /&gt;
&lt;br /&gt;
The confidence interval for the parameter tested is $b±t^{*} SE_{b}$, where b is the slope of the least square regression line, $t^{*}$ is the upper $\frac {1-C} {2}$ critical value from the t distribution with degrees of freedom n-2 and $SE_{b}$ is the standard error of the slope.&lt;br /&gt;
&lt;br /&gt;
The standard error of the slope is 0.1056, so we have the 95% CI of the slope is $(0.5480-0.1056*2.12,0.5480+0.1056*2.12)$, that is $(0.324,0.772)$. So, we are 95% confident that the slope will fall in the range between 0.324 and 0.772. &lt;br /&gt;
&lt;br /&gt;
*Example 2: we are studying on a random sample (size 16) of baseball teams and the data show the team’s batting average and the total number of runs scored for the season.&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:35%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Batting average||	Number of runs scored&lt;br /&gt;
|-&lt;br /&gt;
|0.294||	968&lt;br /&gt;
|-&lt;br /&gt;
|0.278||	938&lt;br /&gt;
|-&lt;br /&gt;
|0.278	||925&lt;br /&gt;
|-&lt;br /&gt;
|0.27||	887&lt;br /&gt;
|-&lt;br /&gt;
|0.274	||825&lt;br /&gt;
|-&lt;br /&gt;
|0.271||	810&lt;br /&gt;
|-&lt;br /&gt;
|0.263||	807&lt;br /&gt;
|-&lt;br /&gt;
|0.257	||798&lt;br /&gt;
|-&lt;br /&gt;
|0.267	||793&lt;br /&gt;
|-&lt;br /&gt;
|0.265 ||	792&lt;br /&gt;
|-&lt;br /&gt;
|0.254||	764&lt;br /&gt;
|-&lt;br /&gt;
|0.246||	740&lt;br /&gt;
|-&lt;br /&gt;
|0.266||	738&lt;br /&gt;
|-&lt;br /&gt;
|0.262||31&lt;br /&gt;
|-&lt;br /&gt;
|.251	||708&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In R:&lt;br /&gt;
 x &amp;lt;- c(0.294,0.278,0.278,0.270,0.274,0.271,0.263,0.257,0.267,0.265,0.256,0.254,0.246,0.266,0.262,0.251)&lt;br /&gt;
 y &amp;lt;- c(968,938,925,887,825,810,807,798,793,792,764,752,740,738,731,708)&lt;br /&gt;
 cor(x,y)&lt;br /&gt;
 [1] 0.8654923&lt;br /&gt;
&lt;br /&gt;
The correlation between x and y is 0.8655 which is pretty strong positive correlation. So it would be reasonable to make the assumption of a linear regression model of number of runs scored and the average batting.&lt;br /&gt;
&lt;br /&gt;
 fit &amp;lt;- lm(y~x)&lt;br /&gt;
 summary(fit)&lt;br /&gt;
 Call:&lt;br /&gt;
 lm(formula = y ~ x)&lt;br /&gt;
 &lt;br /&gt;
 Residuals:&lt;br /&gt;
 *in      1Q  Median      3Q     Max &lt;br /&gt;
 -74.427 -26.596   1.899  38.156  57.062 &lt;br /&gt;
 &lt;br /&gt;
 Coefficients:&lt;br /&gt;
 *Estimate Std. Error t value Pr(&amp;gt;|t|)  &lt;br /&gt;
   &lt;br /&gt;
 (Intercept)   -706.2      234.9  -3.006  0.00943 ** &lt;br /&gt;
 x             5709.2      883.1   6.465 1.49e-05 ***&lt;br /&gt;
&lt;br /&gt;
 --- &lt;br /&gt;
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 &lt;br /&gt;
 Residual standard error: 40.98 on 14 degrees of freedom&lt;br /&gt;
 &lt;br /&gt;
 Multiple R-squared: 0.7491,	Adjusted R-squared: 0.7312 &lt;br /&gt;
 &lt;br /&gt;
 F-statistic: 41.79 on 1 and 14 DF,  p-value: 1.486e-05&lt;br /&gt;
 &lt;br /&gt;
 plot(x,y,main='Scatterplot',xlab='Batting average',ylab='Number of runs')&lt;br /&gt;
 &lt;br /&gt;
 abline(fit)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:SMHS_SLR_Fig5.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 par(mfrow=c(1,2))&lt;br /&gt;
&lt;br /&gt;
 plot(fit$\$ $resid,main='Residual Plot')&lt;br /&gt;
 &lt;br /&gt;
 abline(y=0)&lt;br /&gt;
 &lt;br /&gt;
 qqnorm(fit$\$ $resid)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:SMHS SLR Fig6.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The estimated value of the slope is 5709.2, standard error 833.1, t value = 6.465, and the p-value is 1.49 e-05, so we reject the null hypothesis and conclude that there is significant linear relationship between the average batting and the number of runs. We have the 95% CI of the slope is $(5709.2-833.1*2.145,5709.2+833.1*2.145)$, that is $(3922.2,7496.2)$. So, we are 95% confident that the slope will fall in the range between 3922.2 and 7496.2.&lt;br /&gt;
&lt;br /&gt;
You can also use SOCR SLR Analysis [http://www.socr.ucla.edu/htmls/ana/SimpleRegression_Analysis.html Simple Regression] to copy-paste the data in the applet, estimate regression slope and intercept and compute the corresponding statistics and p-values.&lt;br /&gt;
&lt;br /&gt;
Simple Linear Regression Results:&lt;br /&gt;
&lt;br /&gt;
 Mean of C1 = 46.33333&lt;br /&gt;
 Mean of C2 = 28.61111&lt;br /&gt;
 Regression Line:&lt;br /&gt;
 C2 = 3.22086 + 0.5479910213243551   C1&lt;br /&gt;
 Correlation(C1, C2) = .79209&lt;br /&gt;
 R-Square = .62740&lt;br /&gt;
 Intercept: &lt;br /&gt;
 Parameter Estimate: 3.22086&lt;br /&gt;
 Standard Error:     5.07616&lt;br /&gt;
 T-Statistics:        .63451&lt;br /&gt;
 P-Value:            .53472&lt;br /&gt;
 Slope: &lt;br /&gt;
 Parameter Estimate: .54799&lt;br /&gt;
 Standard Error:     .10558&lt;br /&gt;
 T-Statistics:        5.19053&lt;br /&gt;
 P-Value:            .00009&lt;br /&gt;
&lt;br /&gt;
[[Image:SMHS SLR Fig7.png|600px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:SMHS SLR Fig8.png|600px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:SMHS SLR Fig9.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Statistical inference on correlation coefficient:'''test on $H_{O}:r=\rho vs.H_{a}:r≠\rho$ is the correlation between X and Y. $t_{o}$ =${r}\over{\sqrt{1-r^{2}}\over{N-2}}$ with T distribution with $df=N-2$. &lt;br /&gt;
&lt;br /&gt;
Comparing two correlation coefficients: this Fisher’s transformation provides a mechanism to test for comparing two correlation coefficients using Normal distribution. Suppose we have 2 independent paired samples&lt;br /&gt;
${(X_{i},Y_{i})}_{i=1}^{n_{1}}$ and ${(U_{j},V_{j} )}_{j=1}^{n_{2}}$ and the $r_{1}=corr(X,Y)$ and $r_{2}=corr(U,V)$ and we are testing $H_{0}: r_{1}=r_{2}$  vs.$H_{a}:r_{1}≠r_{2}$ The Fisher’s transformation for the 2 correlations is defined by $\hat{r}=\frac{1}{2}log_{e}\|\frac{1+r}{1-r}\|$, transforming the two correlation coefficients separately yields $r_{11}=\frac{1}{2}log_{e}\|\frac {1+r_{1}}{1-r_{1}}\|$ and $r_{22}=\frac{1}{2}log_{e}\|\frac{+r_{22}}{1-r_{22}}\|$. $Z_{0}$ $ =\frac {r_{11}-r_{22}} {\sqrt\frac{1}{n_{1-3}}-\frac{1}{n_{2-3}}}$&lt;br /&gt;
&lt;br /&gt;
Note that the hypotheses for the single and double sample inference are $H_{0}:r=0$ vs.$H_{a}:r≠0$ and $H_{0}:r_{1}-r_{2}=0$ vs.$H_{a}:r_{1}-r_{2}≠0$ respectively. And an estimate of the standard deviation of the correlation is  $SD\hat{(r)}=\sqrt{\frac{1}{n-3}}$,thus $r\sim $ $N(0,\sqrt\frac{1} {n-3})$. &lt;br /&gt;
&lt;br /&gt;
*Example of brain volume (responses) and age (predictors) for 2 cohorts of subjects (Group 1 and Group 2).&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:90%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Group1	||Age1	||Volume1||Group2||Age2	||Volume2&lt;br /&gt;
|-&lt;br /&gt;
|1||	58||	0.269609	||2||	59	||0.27905&lt;br /&gt;
|-&lt;br /&gt;
|1||	55||	0.277243	||2||	50	||0.262916&lt;br /&gt;
|-&lt;br /&gt;
|1||	61||	0.236264||	2||	58||	0.290697&lt;br /&gt;
|-&lt;br /&gt;
|1||  70||	0.218015||	2||	58||	0.269361&lt;br /&gt;
|-&lt;br /&gt;
|1||	38||	0.287205||	2||	61||	0.268247&lt;br /&gt;
|-&lt;br /&gt;
|1||	41	||0.307387	||2||	57||	0.294204&lt;br /&gt;
|-&lt;br /&gt;
|1||	40||	0.271063||	2||	50||	0.292699&lt;br /&gt;
|-&lt;br /&gt;
|1||	25	||0.307688||	2||	38||	0.273969&lt;br /&gt;
|-&lt;br /&gt;
|1||	70||	0.237811||	2||	57||	0.29049&lt;br /&gt;
|-&lt;br /&gt;
|1||	49||	0.293371||	2||	64||	0.286564&lt;br /&gt;
|-&lt;br /&gt;
|1||	56||	0.252592||	2||	71||	0.257386&lt;br /&gt;
|-&lt;br /&gt;
|1||	56||	0.251349||	2||	34||	0.314958&lt;br /&gt;
|-&lt;br /&gt;
|1	||40||	0.29616	||2||	53||	0.298022&lt;br /&gt;
|-&lt;br /&gt;
|1||	50||	0.249596||	2||	53||	0.269229&lt;br /&gt;
|-&lt;br /&gt;
|1||	55||	0.282721||	2||	25||	0.270634&lt;br /&gt;
|-&lt;br /&gt;
|1	||69||	0.247565||	2||	61||	0.266905&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have two independent groups and Y=volume1(response) and X=age1(predictor); $V=volume2$ and $U=age2$, $n_{1}=27$,$n_{2}=27$. We compute the 2 correlation coefficients: $r_{1}=corr(X,Y)=-0.75338$ and $r_{2}=corr(U,V)=-0.49491.$ Using the Fisher’s transformation we obtain: $r_{11}=\frac{1}{2}log_{e}\|\frac {1+r_{1}}{1-r_{1}}\| = -0.980749 $ and $r_{22}=\frac{1}{2}log_{e}\|\frac{+r_{22}}{1-r_{22}}\| = -0.5425423,$ $Z_{0}$ $ =\frac {r_{11}-r_{22}} {\sqrt\frac{1}{n_{1-3}}-\frac{1}{n_{2-3}}} = 11.517993.$ The corresponding 1-sided p-value =$0.064508$, double-sided p-value =$0.129016$.&lt;br /&gt;
&lt;br /&gt;
*Simple linear regression (SLR): modeling of the linear relations between two variables using regression analysis. &lt;br /&gt;
$Y$ is an observed variable and $X$ is specified by the researcher, e.g. $Y$ is hair growth after $X$ months, for individuals at certain does level of hair growth cream; $X$ and $Y$ are both observed variables. &lt;br /&gt;
*Estimating the best linear fit: simple linear regression model $Y=a+bX+\varepsilon $ can be estimated using least square, which fits a line minimizing the sums of $ \varepsilon_{l}=\hat y_{l} -y_{i}, \sum_{i=1}^{N} \hat\varepsilon_l^{2}=\sum_{i=1}^{N}(\hat y_{l}-y_{i} )^{2}$, where $ \hat y_{l} = a+bx_{i}$ are observed and predicted values of $Y$ for $x_{i}$.&lt;br /&gt;
*Solving for the minimization problem:$ \hat b=\frac{\sum_{i=1}^{N}(x_{i-\bar x})(y_{i}-\bar y)} {\sum_{i=1}^{N} (x_{i}-\bar x)^{2}}$ = $\frac{\sum_{i=1}^{N} x_{i}y_{i}-N\bar x\bar y}}{\sum_{i=1}^{N}x_{i}^{2}-N\bar x^{-2}}$ = $ \rho_{X,Y}\frac{s_{y}}{s_{x}}$;&lt;br /&gt;
&lt;br /&gt;
$\hat a=\bar y-\hat b\bar x$.&lt;br /&gt;
&lt;br /&gt;
*Properties of the least square line: (1) the line goes through the point of (X ̅,Y ̅ ); (2) the sum of the residuals is equal to zero; (3) the estimates are unbiased, that is their expected values are equal to the real slope and intercept values.&lt;br /&gt;
*Regression coefficients inference: when the error terms are normally distributed, then the estimate of the slope coefficient has a normal distribution ith mean equal to $b$ and standard error $SE(\hat b)$ = $s_{\hat b}=\sqrt\frac{1}{N-2}\frac{\sum_{i=1}^{N}\hat\varepsilon_{i}^{2}} {\sum_{i=1}^{N}(x_{i}-\bar x)^{2}}$ To carry out the confidence interval estimating of the slope and intercept of linear model. Given that b follows $\hat b$ follows a T distribution with $N-2$ degrees of freedom, we can calculate the confidence interval for b:$[\hat b-s_{\hat b}t(\frac{\alpha}{2},N-2),\hat b-s_{\hat b}t(\frac{\alpha}{2},N-2)]$ The corresponding test for the regression slope coefficient b is analogously computed $(H_{0}:b=b_{0}$  vs.$H_{a}:b≠b_{0})$ and the test statistic is $t_{0}=\frac{\hat b-b_{0}}s_{\hat b}\sim~T_{df}=N-2$&lt;br /&gt;
*Example of earthquake dataset&lt;br /&gt;
**[http://wiki.stat.ucla.edu/socr/index.php/SOCR_Data_Dinov_021708_Earthquakes SOCR Data Earthquakes]: fit the best linear fit between the longitude and the latitude of the California earthquake since 1900. The SOCR Geomap of these earthquake &lt;br /&gt;
**[http://socr.ucla.edu/docs/resources/SOCR_Data/SOCR_Earthquake5Data_GoogleMap.html SOCR Google Map Earthquakes] shows using the SLR fit to the earthquake data.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
[http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_SLR This article ] presents the SLR analysis activity in SOCR analysis. It starts with a general introduction to SLR model and then illustrate this method in details with various examples. The article help read results of SLR, make interpretation of the slope and intercept and observe and interpret various data and resulting plots including scatter plots, normal QQ plot and different diagnostic plots such as residual on fit plot.&lt;br /&gt;
&lt;br /&gt;
[http://europepmc.org/abstract/MED/3840866  This article ] titled Simple Linear Regression In Medical Research discussed the method of fitting a straight line to data by linear regression and focuses on examples from 36 original articles published in 1978 and 1979. It concluded that investigators need to become better acquainted with residual plots, which give insight into how well the fitted lie models the data, and with confidence bounds for regression lines. Statistical computing package enable investigators to use these techniques easily. &lt;br /&gt;
&lt;br /&gt;
[http://ww2.coastal.edu/kingw/statistics/R-tutorials/simplelinear.html This article ]) presents the r tutorial for simple linear regression. It starts with the fundamental check on the data and comment on the existing patterns found and then fit the linear regression model with the height and weight. It also modified the regression with the Lowess smoothing and talked about the local weighted scatter plot smooth. This article is a comprehensive study on the SLR and correlation in R.&lt;br /&gt;
&lt;br /&gt;
[http://www.tandfonline.com/doi/abs/10.1080/00401706.1975.10489279 This article]titled The Probability Plot Correlation Coefficient Test For Normality introduced the normal probability plot correlation coefficient as a test statistic in complete samples for the composite hypothesis of normality. The proposed test statistic is conceptually simple, and is readily extendable to testing non-normal distribution hypotheses. The paper included an empirical power study which shows that the normal probability plot correlation coefficient compared favorably with seven other normal test statistics.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
&lt;br /&gt;
[http://socr.ucla.edu/htmls/SOCR_Distributions.html SOCR Distributions]&lt;br /&gt;
&lt;br /&gt;
[http://socr.ucla.edu/htmls/exp/Bivariate_Normal_Experiment.html  Bivariate Normal Experiment]&lt;br /&gt;
&lt;br /&gt;
[http://socr.ucla.edu/Applets.dir/Normal_T_Chi2_F_Tables.htm Normal Chi-Squared F Tables]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 1: Simple linear correlation and regression in R:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; library(MASS)&lt;br /&gt;
&amp;gt; data(cats)&lt;br /&gt;
&amp;gt; str(cats)&lt;br /&gt;
'data.frame':	144 obs. of  3 variables:&lt;br /&gt;
 $ Sex: Factor w/ 2 levels &amp;quot;F&amp;quot;,&amp;quot;M&amp;quot;: 1 1 1 1 1 1 1 1 1 1 ...&lt;br /&gt;
 $ Bwt: num  2 2 2 2.1 2.1 2.1 2.1 2.1 2.1 2.1 ...&lt;br /&gt;
 $ Hwt: num  7 7.4 9.5 7.2 7.3 7.6 8.1 8.2 8.3 8.5 ...&lt;br /&gt;
&amp;gt; summary(cats)&lt;br /&gt;
 Sex         Bwt             Hwt       &lt;br /&gt;
 F:47   Min.   :2.000   Min.   : 6.30  &lt;br /&gt;
 M:97   1st Qu.:2.300   1st Qu.: 8.95  &lt;br /&gt;
        Median :2.700   Median :10.10  &lt;br /&gt;
        Mean   :2.724   Mean   :10.63  &lt;br /&gt;
        3rd Qu.:3.025   3rd Qu.:12.12  &lt;br /&gt;
        Max.   :3.900   Max.   :20.50  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:SMHS SLR Fig10.png|300]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
A positive correlation between two variables X and Y means that if X increases, this will cause the value of Y to increase.&lt;br /&gt;
*(a) This is always true.&lt;br /&gt;
*(b) This is sometimes true.&lt;br /&gt;
*(c) This is never true.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The correlation between working out and body fat was found to be exactly -1.0. Which of the following would not be true about the corresponding scatterplot?&lt;br /&gt;
*(a) The slope of the best line of fit should be -1.0.&lt;br /&gt;
*(b) All the points would lie along a perfect straight line, with no deviation at all.&lt;br /&gt;
*(c) The best fitting line would have a downhill (negative) slope.&lt;br /&gt;
*(d) 100% of the variance in body fat can be predicted from workout.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that the correlation between working out and body fat was found to be exactly -1.0. Which of the following would NOT be true, about the corresponding scatterplot?&lt;br /&gt;
*(a) All points would lie along a straight line, with no deviation at all.&lt;br /&gt;
*(b) 100% of the variance in body fat can be predicted from the workout.&lt;br /&gt;
*(c) The slope of the linear model is -1.0.&lt;br /&gt;
*(d) The best fitting line would have a negative slope.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the correlation coefficient is 0.80, then:&lt;br /&gt;
*(a) The explanatory variable is usually less than the response variable.&lt;br /&gt;
*(b) The explanatory variable is usually more than the response variable.&lt;br /&gt;
*(c) None of the statements are correct.&lt;br /&gt;
*(d) Below-average values of the explanatory variable are more often associated with below-average values of the response variable.&lt;br /&gt;
*(e) Below-average values of the explanatory variable are more often associated with above-average values of the response variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two different researchers wanted to study the relationship between math anxiety and taking exams. Researcher A measured anxiety with a scale that had a minimum score of 0 and a maximum score of 20, and a final exam that had a minimum score of 0 and a maximum score of 50. He tested 120 students. Researcher B measured anxiety with a scale that had a minimum of 0 and a maximum of 30, and a final exam that had a minimum score of 0 and a maximum score of 35. He tested 60 students. Researcher A found that the coefficient of correlation between a student's math anxiety and his or her score on the final was -0.60. Researcher B found the correlation between a student's math anxiety and his or her score on the final was -0.30.&lt;br /&gt;
*(a) The coefficient of correlation for researcher A is twice as strong as the coefficient of correlation for researcher B.&lt;br /&gt;
*(b) Based on the study by researcher A one can conclude that high math anxiety is the reason that a lot of the students do not do well in math.&lt;br /&gt;
*(c) Given that coefficient of correlation shows the association between standardized scores, one can conclude that for researcher A a greater precentage of the students who have above average anxiety are likely to have below average score on the final.&lt;br /&gt;
*(d) Given that the minimum and the maximum values for math and anxiety are so different for the two researchers one cannot compare the coefficient of correlation found by these two researchers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the early 1900's when Francis Galton and Karl Pearson measured 1078 pairs of fathers and their grown-up sons, they calculated that the mean height for fathers was 68 inches with deviation of 3 inches. For their sons, the mean height was 69 inches with deviation of 3 inches. (The actual deviations a bit smaller, but we will work with these values to keep the calculations simple.) The correlation coefficient was 0.50. Use the information to calculate the slope of the linear model that predicts the height of the son from the height of the fathers.&lt;br /&gt;
*(a) 35.00&lt;br /&gt;
*(b) 0.50&lt;br /&gt;
*(c) The slope cannot be determined without the actual data&lt;br /&gt;
*(d) 3/3 = 1.00&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that wildlife researchers monitor the local alligator population by taking aerial photographs on a regular schedule. They determine that the best fitting linear model to predict weight in pounds from the length of the gators inches is:&lt;br /&gt;
Weight = -393 + 5.9*Length,with r2 = 0.836.&lt;br /&gt;
Which of the following statements is true?&lt;br /&gt;
*(a) A gator that is about 10 inches above average in length is about 59 pounds above the average weight of these gators.&lt;br /&gt;
*(b) The correlation between a gator's length and weight is 0.836.&lt;br /&gt;
*(c) The correlation between a gator's height and weight cannot be determined without the actual data.&lt;br /&gt;
*(d) The correlation between a gator's height and weight is about -0.914.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which of the following is NOT a property of the LSR Line?&lt;br /&gt;
*(a) The sum of the distances between each point and the LSR Line is minimized.&lt;br /&gt;
*(b) The average x value and the average y value lies on the LSR Line&lt;br /&gt;
*(c) The sum of squared residuals is minimized&lt;br /&gt;
*(d) The sum of the residuals = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that the linear model that predicts fat content in grams from the protein of selected items from Burger Queen menu is: Fat = 6.83 + 0.97*Protein. We learn that there are actually 20 grams of fat in the Chucking burger that has 20 grams of protein. Which of the following statements is true?&lt;br /&gt;
*(a) The linear model underestimates the actual fat content and produces a residual of -6.23&lt;br /&gt;
*(b) The linear model overestimates the fat content and produces a residual of -6.23&lt;br /&gt;
*(c) The linear model underestimates the fat content and produces a residual of -6.23&lt;br /&gt;
*(d) The linear model overestimates the fat content and produces a residual of 6.2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which statement describes the principle of &amp;quot;least squares&amp;quot; that we use in determining the best-fit line?&lt;br /&gt;
*(a) The best-fit line minimizes the distances between the observed values and the predicted values.&lt;br /&gt;
*(b) The best-fit line minimizes the sum of the squared residuals.&lt;br /&gt;
*(c) The best-fit line minimizes the sum of the residuals.&lt;br /&gt;
*(d) The best-fit line minimizes the sum of the distances between the actual values and the predicted values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The scores of midterm and final exams for a random sample of Stats 10 students can be summarized as follows:&lt;br /&gt;
Mean of midterm score = 36.92; SD of midterm score = 37.79 Mean of final score = 24.71; SD of final score= 25.21 r= 0.978&lt;br /&gt;
Choose one answer.&lt;br /&gt;
*(a) 23.44&lt;br /&gt;
*(b) 0.62&lt;br /&gt;
*(c) 25.21&lt;br /&gt;
*(d) 35&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which of the following is NOT a property of the Least Squares Regression Line?&lt;br /&gt;
*(a) The sum of the distances between each point and the LSR Line is minimized.&lt;br /&gt;
*(b) The sum of squared residuals is minimized&lt;br /&gt;
*(c) The average x value and the average y value lie on the LSR Line&lt;br /&gt;
*(d) The sum of the residuals = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tom and Sue wanted to estimate the average self-esteem score. The true population average for self esteem score is 20. Tom estimates that average by taking a sample of size n and then constructing a confidence interval. What of the following is true?&lt;br /&gt;
I. The resulting interval will contain 20 II. The 95 percent confidence interval for n = 100 will generally be more narrow than the 95 percent confidence interval for n = 50. III. For n = 100, the 95 percent confidence interval will be wider than the 90 percent confidence interval.&lt;br /&gt;
*(a) II only&lt;br /&gt;
*(b) III only&lt;br /&gt;
*(c) I only&lt;br /&gt;
*(d) II and III&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A simple random sample of 1000 persons is taken to estimate the percentage of Democrats in a large population. It turns out that 543 of the people in the sample are Democrats. Is the following statement true or false? Explain (51%, 57.5%) is approximately a 95% confidence interval for the sample percentage of democrats.&lt;br /&gt;
*(a) False, that is the approximate confidence interval for p. There is no confidence interval for the sample proportion.&lt;br /&gt;
*(b) True, we did the computations and those are approximately the numbers for the confidence interval for p.&lt;br /&gt;
*(c) True, that is the confidence interval for the sample mean.&lt;br /&gt;
*(d) False, the confidence interval for the sample proportion should be smaller than that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the linear model to predict the height of a son whose father's height is 6 feet.&lt;br /&gt;
*(a) The son's height = 35 + 0.5(6) inches&lt;br /&gt;
*(b) The son's height = 35 + 0.5(72) inches&lt;br /&gt;
*(c) The &amp;quot;Regression Effect&amp;quot; states that the son will be a bit taller than his father&lt;br /&gt;
*(d) Cannot be determined without the data&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A statistician wants to predict Z from Y. He finds that r-squared is 5%.Which one of the following conclusions is correct?&lt;br /&gt;
*(a) The coefficient of correlation between Y and Z is 0.05&lt;br /&gt;
*(b) Y explains 5% of the variance in Z&lt;br /&gt;
*(c) Y is a good predictor of Z&lt;br /&gt;
*(d) Z is a good predictor of Y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
*[http://wiki.stat.ucla.edu/socr/index.php/Probability_and_statistics_EBook#Chapter_X:_Correlation_and_Regression  SOCR]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_SLR}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_Epidemiology&amp;diff=13561</id>
		<title>SMHS Epidemiology</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_Epidemiology&amp;diff=13561"/>
		<updated>2014-08-29T17:13:27Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /*  Scientific Methods for Health Sciences - Epidemiology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
==[[SMHS| Scientific Methods for Health Sciences]] - Epidemiology ==&lt;br /&gt;
&lt;br /&gt;
===Overview:===&lt;br /&gt;
&lt;br /&gt;
After a general introduction to the filed of Epidemiology, students can have a basic idea of the language of Epidemiology. In this course, we want to identify and describe the population patterns of health-related risk factors and health-related outcomes in terms of persons, place and time. We are interested in exploring current major public health issues and try to identify and evaluate the main determinants of such public health issues (e.g. demographic, genetic, infectious, behavioral, and social). With all the concepts and methodologies of analysis in Epidemiology, application would be the next step. Here we examine and apply analytical approaches to data from different epidemiologic study designs (e.g., cross-sectional, cohort, randomized studies) and to critically appraise epidemiological findings.&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Goals of this course:&lt;br /&gt;
&lt;br /&gt;
*To understand basic features of the human genome and the distribution of mutations among individuals. 	&lt;br /&gt;
*To understand the principles of segregation and linkage as they apply to human pedigree analysis and the identification of genetic variations associated with disease.&lt;br /&gt;
*To learn population and quantitative genetic concepts that are necessary in order to study the relationship between genetic variation and disease variation in populations.&lt;br /&gt;
*To learn about prototypical gene-disease relationships that are important to public health.&lt;br /&gt;
*To understand the key issues in genetic testing in populations.&lt;br /&gt;
*To understand the genetic complexity of common chronic disease.&lt;br /&gt;
*To have a basic understanding of the importance and biological basis of epigenetic mechanisms, gene-environment interactions, and gene-gene interactions.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
*'''Public Heath Genetics:'''some current and potential applications of genome research include:&lt;br /&gt;
**Molecular medicine: improved diagnosis of disease; earlier detection of genetic predispositions to disease; rational drug design; gene therapy and control systems for drugs; pharmacogenomics “custom drugs”.&lt;br /&gt;
**Microbial genomics: new energy sources (biofuels); environmental monitoring to detect pollutants; protection from biological and chemical warfare; safe, efficient toxic waste cleanup.&lt;br /&gt;
**Risk assessment: assess health damage and risks caused by radiation exposure, include low-dose exposures; assess health damage and risks caused by exposure to mutagenic chemicals and cancer causing toxins.&lt;br /&gt;
**Bio-archaeology, anthropology, evolution, and human migration: study evolution through germline mutations in lineages; study migration of different population groups based on X chromosome or Y chromosome; compare breakpoints in the evolution of mutations with ages of populations and historical events.&lt;br /&gt;
**DNA forensics (identification): identify potential suspects whose DNA may match evidence left at crime scenes; exonerate persons wrongly accused of crimes; identify crime and catastrophe victims; establish paternity and other family relationships; determine pedigree for seed or livestock breeds.&lt;br /&gt;
**Agriculture, livestock breeding, and bioprocessing: more nutritious produce; Biopesticides; healthier, more productive, disease-resistant farm animals; new environmental cleanup uses for plants like tobacco.&lt;br /&gt;
&lt;br /&gt;
*'''The Human Genome and Mutation'''&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS_Epidem_Fig_1.png |400px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Chromosomes are highly condensed DNA:&lt;br /&gt;
**Chromosomal banding pattern: condensed chromosomes can be stained to create the appearance of dark and light bands; dark bands represent regions rich in As and Ts; each band contains millions of DNA nucleotides; each chromosome has a unique banding pattern.&lt;br /&gt;
**A human karyotype: depicts the entire chromosomal constitutions of a person; normal karyotypes have 46 chromosomes; we get 23 chromosomes from each parent (22 autosomes and 1 sex chromosome).&lt;br /&gt;
**Chromatin: composed of DNA and proteins that are associated with the chromosomes. (1) Euchromatin: lightly condensed DNA; gene rich, often actively transcribed. (2) Heterochromatin: highly condensed DNA; often composed of repetitive DNA elements; centromeres and telomeres.&lt;br /&gt;
**Centromeres: large arrays of repeated DNA sequences; spindle fibers attach during mitosis to separate sister chromatids.&lt;br /&gt;
**Telomeres: arrays of repeated DNA sequences that are often thousands of bases in length; a “cap” at the end of chromosome to provide stability; due to the way that chromosomes replicated, telomeres, shorten with each cell division in human somatic cells.&lt;br /&gt;
**International system for human cytogenetic nomenclature: short arms of a chromosome are labeled; long arms are labeled; chromosome bands are labeled p11, p12, etc. like a zip code; the terminal ends of the chromosomes are labeled ter; where the arms meet in the middle is the centromere.&lt;br /&gt;
**Genes are located on chromosomes: there are 45 bands on chromosome 5; chromosome 5 contains 1633 genes; chromosome 5 ~ 181000000 bases long; genes are referred to by their chromosomal location.&lt;br /&gt;
**Chromosomal abnormalities: there are two types of abnormalities that can occur on a chromosomal level in humans: (1) structural abnormalities – missing, extra, or rearranged genetic material on one particular chromosome; (2) numerical abnormalities – deviations in the total number of chromosomes that an individual has.&lt;br /&gt;
&lt;br /&gt;
Changes in chromosome structure.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS_Epidemiology_Fig_2.png|400px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Deletion: 46, XY, del(6) (p16.3)    Terminal deletion with breakpoint at 6p16.3&lt;br /&gt;
Duplication: 46, XX, dup(1) (q22q25)  Duplication of chromosome 1 region q22 to q25&lt;br /&gt;
Insertion: 46, XY, ins(2;5) (p13;q21q31)  An insertion of chromosome 5q21-31 into chromosome 2p13&lt;br /&gt;
Translocation: 46, XX, t(2;6) (q35;p21.3)  A balanced reciprocal translocation with breakpoints in 2q35 and 6p21.3&lt;br /&gt;
Inversion: 46, XY, inv(11) (p11p15)  An inversion on chromosome 11 with breakpoints at p11 and p15&lt;br /&gt;
*Mutations: caused by changes in the DNA sequence; there are many different types of mutations; can happen in somatic cells or during development of gametes.&lt;br /&gt;
Types of mutations: (1) Nucleotide substitutions, involve an alteration in the sequence but not the number of nucleotides (DNA bases) in a gene; (2) Insertions &amp;amp; Deletions, involve an alteration in the number of nucleotides in a gene; (3) trinucleotide repeats, involves an alteration in the number of times that a certain sequence of three bases repeats itself; (4) Splice Site Variation, involve an alteration in the non-coding region of a gene, which affects the way that parts of the gene sequence are combined to make RNA.&lt;br /&gt;
Results of mutations: mutations in exons may result in – misspelling of protein (missense), truncation of the protein (nonsense), no effect; mutations in introns may result in – no effect, altered regulations of gene expression, splice site variation.&lt;br /&gt;
&lt;br /&gt;
*'''Genes in Population:'''&lt;br /&gt;
*Gene pool: all available genetic variation in a population; all potential mating combinations. &lt;br /&gt;
*Basic concepts: &lt;br /&gt;
**Alleles: the type of genetic variation seen at a particular location on a chromosome. (1) fictional form: big “A” allele, little “a” allele; (2) base pair form: T allele at basepair 71349562 on chromosome 2, C allele at basepair 71349562 on chromosome 2; (3) codon form: Arginine at codon 124, Glycine at codon 124.&lt;br /&gt;
**Genotypes: we inherit one allele from our mother and one allele from our father to form our genotype. Variation in a single gene like AA, Aa or aa.&lt;br /&gt;
**Haplotypes: it is the combination of alleles that an individual has at multiple sites along a chromosome.&lt;br /&gt;
**Allele frequencies: the prevalence of a particular allele in a given population. Allele frequency = $\frac {Number\, of\, alleles\,}{2*(number\, of\, people\,)}$.&lt;br /&gt;
*Genotype frequencies: prevalence of a particular genotype in a given population. &lt;br /&gt;
**Haplotype frequencies: frequency that a haplotype occurs in different ethnic groups.&lt;br /&gt;
**Hardy-Weinberg disequilibrium: when genotype frequencies in a population differ from what would be predicted based on allele frequencies.&lt;br /&gt;
**:Hardy-Weinberg Equilibrium (HWE): in a stable population with random mating, allelic frequencies typically predict genotype frequencies using the law of independent segregation. When allele frequencies can accurately be used to predict genotype frequencies in a population, the population is considered to be in a HWE.&lt;br /&gt;
**:HWE: suppose a SNP that can only be A or C $(p_{A}+p_{C}=1)$, and probability of having A allele is $p_{A}$, C allele is $p_{C}$, then under HWE, the probability of AA genotype = $p_{A}^{2}$, probability of having CC = $p_{C}^{2}$, the probability of having AC = $2p_{A}p_{C}$.&lt;br /&gt;
**:Steps to test HWE: (1) estimate allele frequencies; (2) calculate the expected relative genotype frequencies under HWE; (3) calculate the expected number of people with each genotype; (4) calculate the difference between observed and expected number of people with each genotype using $χ^2$ formula; (5) sum up the $χ^2$ components and compare the sum to statistical tables to see if there is significant deviation.&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:50%&amp;quot; Border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || Observed|| Expected ||  $X^{2}$ component&lt;br /&gt;
|-&lt;br /&gt;
|AA || $N_{AA}$ || $p^{2}(N_{Total})$ || $\frac{(O_{AA}- E_{AA})^{2}}{E_{AA}}$&lt;br /&gt;
|-&lt;br /&gt;
|Aa || $N_{AS}$ || $2pq^{2}(N_{Total})$ || $\frac{(O_{Aa}- E_{Aa})^{2}}{E_{Aa}}$&lt;br /&gt;
|-&lt;br /&gt;
|aa ||$N_{aa}$ || $q^{2}(N_{Total})$ || $\frac{(O_{aa}- E_{aa})^{2}}{E_{aa}}$&lt;br /&gt;
|- &lt;br /&gt;
| || $N_{Total}$ || $N_{Total}$ || Overall $X^{2}$ Statistics&lt;br /&gt;
|-&lt;br /&gt;
|}	&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$N_{AA}$ is the actual number of people in the population with AA genotype, $N_{Total}$ is the number of people in the population, $p^{2}(N_{Total})$ calculated expected number of people with AA genotype.&lt;br /&gt;
For $χ^{2}$, the null hypothesis $H_{0}$: the population is in HWE. For two alleles, if the overall $χ^{2}$ is less than or equal to 3.84, then p-value is greater than 0.05 and don’t reject $H_{0}$, population is in HWE; if $χ^{2}$ more than 3.84, p-value is less than 0.05, reject $H_{0}$, population is in HWD (disequilibrium).&lt;br /&gt;
&lt;br /&gt;
*'''Pedigree Analysis and Probability in Genetics'''&lt;br /&gt;
**Mendel’s Law of Segregation: organism carry two copies of each genetic factor; there is segregation of parental factors during gamete formation; each gamete receives one genetic factor from each parent.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:MSHS IntroEpi Fig 4 .png|400px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Human Pedigree Nomenclature:'''&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:MSHS IntroEpi Fig 5 .png|400px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Modes of Inheritance:''' &lt;br /&gt;
*Autosomal dominant: individuals that inherit the dominant disease allele, D will develop the disease. Homozygous (DD: affected), Heterozygous (Dd: affected), Homozygous (dd: normal).&lt;br /&gt;
'''Traits:''' every affected individuals has an affected parent; there is 50% chance that each affect parent will transmit the trait to any child; the trait is expressed in both males and females is roughly equal numbers; two affected individuals may have unaffected children; the phenotype is often more severe in homozygous affected individuals.&lt;br /&gt;
*Autosomal recessive: individuals that inherit two copies of the recessive disease allele, d, will develop the disease. Homozygous (DD: normal), Heterozygous (Dd: normal), Homozygous (dd: affected).&lt;br /&gt;
'''Traits:''' for rare traits, most affected individuals are the children of unaffected parents; all of the children of two affected individuals are affected; the risk of an affected child from a mating a two heterozygotes is 25%; the trait is expressed in both males and females; for rare traits, the unaffected parents of an affected individual may be related to each other.&lt;br /&gt;
*Sex-linked dominant (X-lined dominant): $X^{C} X^{C}$ affected female, $X^{C}$ Y affected male, $X^{C} X^{c}$ affected female, $X^{c}$ Y normal male, $X^{c} X^{c}$ normal female.&lt;br /&gt;
*Sex-linked recessive (X-linked recessive): female that carry a recessive mutation $X^{C}$ will have affected male children. $X^{C} X^{C}$ normal female, $X^{C}$ Y normal male, $X^{C} X^{c}$ carrier female, $X^{c}$ Y affected male, $X^{c}X^{c}$ affected female.&lt;br /&gt;
'''Traits:''' there is no male to male transmission; there is mother to son transmission; female can be homozygous and have the trait. Examples may be color blindness.&lt;br /&gt;
&lt;br /&gt;
*Probability in Pedigree Analysis: using Mendel’s Laws, we can estimate the probabilities of an offspring’s genotype if we know (or assume) a mode of inheritance; under Hardy-Weinberg, we can estimate genotype probabilities for parents.&lt;br /&gt;
**Steps: (1) choose a mode of inheritance; (2) establish the penetrance of each genotype under that mode of inheritance; (3) determine the potential genotypes of each person under that mode of inheritance; (4) determine the founder genotype probabilities (parent generation); (5) determine the transmission probabilities (offspring generation); (6) calculate the probabilities of each pedigree member given their phenotype, their genotype, and the penetrance of the disease ''P(member)=P(phenotype and genotype)=P(genotype)*P(phenotype|genotype);'' (7) calculate the total probability of the pedigree ''P(pedigree)''$=∏_{i=1}^{n}$''P(genotype)*P(phenotype|genotype)'', n is number of people in the pedigree.&lt;br /&gt;
&lt;br /&gt;
In step 2, there can be complete penetrance or incomplete penetrance. With complete penetrance, individuals’ phenotype will always match their genotype.&lt;br /&gt;
If a genotype has incomplete penetrance, some individuals with the ‘affected’ genotype will not exhibit the ‘affected’ phenotype. This happens often when the development of the phenotype is controlled by more than one gene or is modified by environmental factors.&lt;br /&gt;
&lt;br /&gt;
*Founder effect: in small populations, rare recessive alleles present in a member of the original group of settlers is transmitted through successive generations; population expands and remains geographically and culturally isolated. After ~10 generations, children with recessive disease begin to appear, inbreeding is not usually a significant feature of the population. &lt;br /&gt;
Consanguineous mating: inbreeding (consanguinity) = mating between genetically related individuals; degree of inbreeding based on the probability that an individual will inherit two alleles that came from a common ancestor; homozygousity due to inheritance of alleles that are “Identical by Descent” (IBD).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Linkage Analysis'''&lt;br /&gt;
*Linkage concepts: genetic linkage refers to the study of the order of genes on chromosomes; distance between genes (aka genetic distance).&lt;br /&gt;
*Recombination fraction: a measure of distance between genes; alleles that are physically very close to one another on a chromosome tend not be separated by recombination as often as alleles that are physically far from one another. The symbol $\theta$ is used to show the probability that the alleles of two genes will recombine during gamete formation, it equals to the proportion of gametes that are recombinant = probability of recombination = recombination fraction.&lt;br /&gt;
*When two loci are inherited independently of each other, recombinants and non-recombinants are found in equal proportions in the offspring: $\theta$=0.5.&lt;br /&gt;
*When two loci are inherited together because of chromosome location, there are more non-recombinants than recombinants in the offspring: $0\le\theta\le0.5$.&lt;br /&gt;
*$\theta=0.5$ implies no linkage; $\theta=0$ implies complete linkage; $0&amp;lt;\theta&amp;lt;0.5$ implies linkage. &lt;br /&gt;
&lt;br /&gt;
'''Parametric Linkage Analysis:''' requires to (1) collect pedigree data with many meiotic events (need multiple generations or many children); (2) make assumptions about how the disease is inherited (single locus vs. multilocus; dominant vs. recessive; penetrance; allele frequencies of disease susceptibility locus); (3) can be done with phase known (know how the alleles are distributed on parental chromosomes) or phase unknown (know which alleles come from which parent, but not how they are distributed on the chromosomes) pedigrees.&lt;br /&gt;
*For phase known pedigree: recombination fraction $\theta$=$\frac{\#\,recombinants}{\#\,informative\,meiosis'}$, where informative meiosis = parental gamete formation that provides information about recombination between two loci.&lt;br /&gt;
*For phase unknown pedigree: parent haplotypes are not known, $\theta$ cannot be estimated directly because there is no way to tell whether the offspring are recombinant or non-recombinant.&lt;br /&gt;
*Estimation of $\theta$ by the Maximum Likelihood Method: estimate $\theta$ for any pedigree by using MLE. This equation takes the data in the pedigree and asks the question, what $\theta$ would result in the largest L($\theta$) given the number of recombinant and non-recombinant gametes? L($\theta)=c(1-\theta)^{n-k}\theta^{k}$, where c is a constant, n is the number of informative meioses, k is the number of recombinant meioses, n-k is the number of non-recombinant&lt;br /&gt;
&lt;br /&gt;
*''lnL''($\theta$)=''lnc+(n-k'')  ln(1-$\theta$)+''kln$\theta$'', $\frac{∂lnL\theta}{∂\theta}=\frac {-n-k} {1-\theta}+\frac{k}{\theta}$=0,=$\hat {\theta}$ = $\frac{k}{n}$.&lt;br /&gt;
*Logarithm (base 10) Of Odds (LOD) score: The LOD score compares the likelihood of observing the test data if the two loci are indeed linked, to the likelihood of observing the same data purely by chance. LOD&amp;gt;0 indicate the presence of linkage, LOD&amp;lt;0 indicate that linkage is less likely.&lt;br /&gt;
&lt;br /&gt;
In linkage analysis, the two hypotheses are  $H_{0}$: no linkage, $\theta$=0.5; $H_{1}$linkage, $\theta=\hat{\theta}$.LOD score Z($\theta$)=$log_{10}\frac{L(\theta=\hat{\theta})}{L(\theta=\frac{1}{2})}$,where $L(\theta=\hat{\theta}$ is the likelihood equation when $\theta=\frac{1}{2}$.&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:50%&amp;quot; Border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|   $\theta$     || LOD score&lt;br /&gt;
|-&lt;br /&gt;
| $\theta&amp;gt;0$   || $Z (\theta) = nlog(2) + k * log(\theta) + (N - k)log (1-\theta)$&lt;br /&gt;
|-&lt;br /&gt;
| $\theta = 0$and k = 0  || $Z (\theta) = nlog(2)$&lt;br /&gt;
|-&lt;br /&gt;
| $\theta = 0$ and k &amp;gt; 0  || $Z(\theta) =-\infty$&lt;br /&gt;
|-&lt;br /&gt;
|}	&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test one hypothesis on multiple pedigrees, add the LOD scores of each individual pedigree to determine a final LOD score:&lt;br /&gt;
&lt;br /&gt;
$Z(\theta)=\sum Z_{i}(\theta)$ for i=1,…,''n'' pedigrees&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$\theta$ is the value of $\theta$ that maximizes L($\theta$) = MLE.&lt;br /&gt;
LOD scores correspond to the following odds:&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:50%&amp;quot; Border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|$Z(\theta)=-2$  || 100:1 odds against linkage, significantly in favor of no linkages&lt;br /&gt;
|-&lt;br /&gt;
|$Z(\theta)=-1$  ||  10:1 odds against linkage&lt;br /&gt;
|-&lt;br /&gt;
|$Z(\theta)=0$   || Not informative&lt;br /&gt;
|-&lt;br /&gt;
|$Z(\theta)=+1$  || 10:1 odds in favor of linkage&lt;br /&gt;
|-&lt;br /&gt;
|$Z(\theta)=+2$  || 100:1 odds in favor of linkage&lt;br /&gt;
|-&lt;br /&gt;
|$Z(\theta)=+3$  || 1000:1 odds in favor of linkage, significantly in favor of linkage&lt;br /&gt;
|}	&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-2 &amp;lt; LOD &amp;lt; 3 provides only weak (non-significant) evidence for or against linkage. LOD scores vary with $\theta$: calculate LOD scores for a range of $\theta's$, find one that maximizes Z($\theta$); vary with data: each pedigree gives different information; are additive across independent pedigrees: sum data from all pedigrees to get final Z score.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1:''' Suppose the father and mother are both Dd (dd is the recessive affected individual, Dd the heterozygous carrier individual, and DD the homozygous normal individual). The table below shows the Mendelian ration of $\frac{3}{4}$ normal to $\frac{1}{4}$ affected. For most ''autosomal recessive diseases'', the heterozygote cannot be distinguished from the normal homozygote. In the normal phenotype categories of offspring (Dd and DD produce the same normal phenotype), two of the three are heterozygotes (carriers); one of the three is homozygous normal&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:50%&amp;quot; Border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || '''Father'''&lt;br /&gt;
|-&lt;br /&gt;
|'''Mother''' || [[Image:SMHS_Epi_Figure_6.png|200px]]&lt;br /&gt;
|-&lt;br /&gt;
|}	&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS_Epi_Figure_7.png|400px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This pedigree example illustrates autosomal recessive inheritance. I-1 and I-2 are unrelated but produced an affected offspring (affected offspring have normal parents). By chance, they both must have been carriers. Even though II-2 is affected, she produced no affected offspring (i.e., the phenotype appears in siblings, not parents). As the probable genotype for an outside individual (II-1) is homozygous normal, III-1, III-2 and III-3 must be carriers (heterozygotes). They are not affected but could only have inherited the recessive gene from II-2. Next, II-3, II-5, and II-6 each have a $\frac{2}{3}$ chance of being a carrier and a $\frac{1}{3}$ chance of being homozygous normal. They are not affected, but they are carrier*carrier offsprings. Like I-1, II-4 and II-7 have a high probability of being homozygous normal as they are outside the family. III-4, III-5, III-6, III-7, III-8, and III-9 all have a $\frac{1}{3}$ chance of being carriers and a $\frac{2}{3}$ chance of being homozygous normal. One parent of each is probably homozygous normal, the other has a $\frac{2}{3}$ chance of being a carrier and a 1 in 2 chance of passing on the recessive allele if they were a carrier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' Linkage mapping using pedigrees is the disease linked to the marker given the pedigree below. (Dominant inheritance)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS_Epi_Figure_8.png|250px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Two problems: (1) we don’t know the phase, even if the genes are linked, we don’t know arrangement of alleles (cis or trans) on the chromosomes in Dad: D1 d2 or D2 d1. Solution: take the average of the likelihoods of linkage: L($\theta)=\frac{1}{2}L(\theta|phase 1)+\frac {1}{2}L(\theta|phase 2)$; (2) how can we compare the probability of linkage to the probability of no linkage. Solution: take the ratio (i.e. odds) of the likelihood of linkage [L($\theta$)=L(MLE of $\theta$)] versus the likelihood of no linkage [L($\theta$)=L($\theta$=0.5)].&lt;br /&gt;
&lt;br /&gt;
*Calculating LOD scores: (1) if the phase is D1 d2, then there are 4 non-recombinants and 1 recombinant, L($\theta$)=(1-$\theta)^{4}\theta$; (2) if the phase is D2 d1, then there are 4 recombinants and 1 non-recombinant, L($\theta)=\theta^{4}(1-\theta)$.&lt;br /&gt;
&lt;br /&gt;
For $\theta=0.1(10cm)$, phase $1,L(\theta)=(1-0.1)^{4}*0.1=0.9^{4}*0.1$, for phase 2,$\theta =0.1:L(θ)=0.1^{4} (1-0.1)=0.1^{4}*0.9.$ At $\theta=0.5, L (\theta)=0.5^{5}$, $Z(\theta)=log_{10}\frac{{[0.9^{4}0.1+0.1^{4}0.9]}{2}}{0.5^{5}} = 0.0217.$&lt;br /&gt;
&lt;br /&gt;
For other values of $\theta$, do the similar calculation: so the MLE of $\theta$, $\hat{\theta}= 0.20$.&lt;br /&gt;
&lt;br /&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:50%&amp;quot; Border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|$\theta$ || $L(\theta$) || $L=(\theta=0.5)$ || $Z(\theta)$&lt;br /&gt;
|-		&lt;br /&gt;
|0	||0	||0.03125|| $-\infty$&lt;br /&gt;
|-			&lt;br /&gt;
|0.05	||0.02037||	0.03125	||-0.18586&lt;br /&gt;
|-&lt;br /&gt;
|0.10	||0.03285||	0.03125||	0.02169&lt;br /&gt;
|-&lt;br /&gt;
|0.15	||0.03937	||0.03125	||0.10032&lt;br /&gt;
|-&lt;br /&gt;
|'''0.20'''	||'''0.0416'''	||'''0.03125'''	||'''0.12424'''&lt;br /&gt;
|-&lt;br /&gt;
|0.25||	0.04102	||0.03125|| 0.11815	&lt;br /&gt;
|-&lt;br /&gt;
|0.30	||0.0385||	0.03125	||0.09454&lt;br /&gt;
|-&lt;br /&gt;
|}	&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''Linkage Disequilibrium'''&lt;br /&gt;
**Linkage vs. Linkage Disequilibrium: linkage refers to the observation that two loci are inherited together (rather than be separated by recombination) in a single generation; linkage disequilibrium refers to the pattern of correlation between loci at the population level. &lt;br /&gt;
**Linkage and Association: linkage is the relationship between loci, and is examined within families; association is the relationship between alleles and is examined within populations. &lt;br /&gt;
**Linkage Disequilibrium (LD): describes the tendency of alleles to be inherited together more often than would be expected under random segregation. Extend of LD reflects the population’s history and the distance between markers. LD mapping is a promising approach for mapping genes, especially for complex-trait diseases. It is a population-based concept (not an individual or family-based concept); it has expected and observed values: looks at haplotypes instead of genotypes, observed frequencies are for haplotypes, expected haplotypes frequencies are calculated from allele frequencies. &lt;br /&gt;
***Forces affecting LD: (1) recombination: breaks up allelic association; (2) gene conversion: during recombination, DNA sequence information is transferred from one chromatid to another; (3) recurrent mutation: same mutation arises on different haplotype backgrounds; (4) natural selection: keeps pairs of genes/SNPs together; (5) demographic history: migration, non-random mating.&lt;br /&gt;
**Linkage equilibrium:$p_{ab}=p_{a} p_{b}=(1-p_{A})(1-p_{B})$ ; $p_{AB}=p_{A} p_{B}$; $p_{Ab}=p_{A} p_{b}=p_{A} (1-p_{B})$; $p_{aB}= p_{a}p_{B} = (1-p_{A})p_{B};$&lt;br /&gt;
**Linkage disequilibrium:$p_{ab}\not=p_{a} p_{b}=(1-p_{A})(1-p_{B})$ ; $p_{AB}=p_{A} p_{B}$; $p_{Ab}=p_{A} p_{b}=p_{A} (1-p_{B})$; $p_{aB}= p_{a}p_{B} = (1-p_{A})p_{B};$&lt;br /&gt;
**Measures of LD: fundamental measure: Disequilibrium coefficient (D); most commonly used measures: D’ and |D’|; $r^{2}$ or $\Delta^{2}$.&lt;br /&gt;
***$D_{AB}$ is the disequilibrium coefficient for locus A and locus B. D is hard to interpret.&lt;br /&gt;
&lt;br /&gt;
$D_{AB}=p_{AB}-p_{A} p_{B};$   $p_{AB}=p_{A} p_{B}+D_{AB};$  $D_{aB}=p_{a} p_{B}-D_{AB};$   $D_{ab}=p_{a} p_{b}+D_{AB};$&lt;br /&gt;
&lt;br /&gt;
$D'_{AB}=\begin{cases}\frac{D_{AB}}{min(p_{A} p_{B},p_{a} p_{b})},D_{AB} \\\frac{D_{AB}} {min(p_{A} p_{b},p_{a} p_{B})},D_{AB}&amp;gt;0,\end{cases}$&lt;br /&gt;
it ranges between -1 and +1, when allele frequencies are small, D' is more likely to take extreme values, D’ of -1 or +1 implies that least one potential haplotype was not observed (no evidence for recombination between markers).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$r^{2}$  or $\Delta^{2}=\frac{D_{AB}}{p_{A}(1-p_{A})p_{B}(1-p_{B})}$ it ranges between 0 and 1; $r^{2}=1$ when the markers provide identical information; $r^{2}= 0$ when the markers are in perfect equilibrium; not as strongly affected by extreme allele frequencies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information from measurements: when D’ is high and $r^{2}$  is high indicates the tendency toward presence of only 2 haplotypes, with similar allele frequencies of the 2 loci; when D’ is high and $r^{2}$ is low indicates the tendency toward presence of only 3 haplotypes (for example, a young SNP ancestrally), with large difference in allele frequencies of the 2 loci; when D’ is low and $r^{2}$ is low indicates the tendency toward presence of all 4 haplotypes and random coupling of alleles.&lt;br /&gt;
&lt;br /&gt;
*Disequilibrium will decay each generation in a large population, after t generations: $D_{t}=(1-\theta)^{t} D_{0}$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Genetic Testing Issues'''&lt;br /&gt;
**Genetic Test: analysis of chromosomes, genes and/or gene products (proteins) to determine whether there is an abnormality present that is causing or will cause a genetic condition/disorder.&lt;br /&gt;
**Proportion of Genes Shared: first degree relatives (50%): sibs, parents, children,  dizygotic twins; second degree relatives (25%): uncles, aunts, nieces, nephews, grandparents, grandchildren, half-sibs, double first cousins; third degree relatives (12.5%): first cousins, half-uncles/aunts, half-nieces/nephews.&lt;br /&gt;
**Genetic tests are different from other medical tests:&lt;br /&gt;
**Medical tests done to detect a current medical condition. It may be done on healthy individuals to determine future risk for a genetic condition (predictive tests).&lt;br /&gt;
**Genetic test may need to be performed on affected family member before patient can be tested.&lt;br /&gt;
**Genetic test results may have implications for healthcare and life decisions of other family members.&lt;br /&gt;
**Possible insurance implications and potential for stigmatization and discrimination.&lt;br /&gt;
**Genetic tests currently offered on a population level: newborn screening; multiple marker screening for pregnant women to screen for increased risk for chromosome abnormalities (e.g. Down syndrome) and neural tube defects (e.g. spina bifida); Cystoic fibrosis screening offered preconceptionally and to pregnant couples; carrier testing for Tay-Sachs disease, Sickle cell anemia; Prenatal testing offered to women 35 and older.&lt;br /&gt;
**Genetic testing is currently offered to individuals with symptoms consistent with a genetic condition to establish, confirm or rule out a diagnosis; family history of a genetic condition.&lt;br /&gt;
*Uses of Genetic Testing:&lt;br /&gt;
**Diagnostic Testing: used to establish or confirm a diagnosis in a patient who has symptoms suggestive of a genetic condition.&lt;br /&gt;
**Predictive testing: (1) presymptomatic, eventual development of symptoms is certain when the gene mutation is present; (2) predispositional (eventual development of symptoms is likely but not certain when the gene mutation is present, e.g., breast cancer.&lt;br /&gt;
**Carrier testing: offered to patients based on family history of a genetic condition or ethnicity.&lt;br /&gt;
**Prenatal testing: offered during pregnancy to assess fetal status when there is an increased risk of having a child with a genetic condition due to maternal age, family history, ethnicity, abnormal screening test or ultrasound evaluation.&lt;br /&gt;
**Preimplantation genetic diagnosis (PGD): used with IVF and involves genetic testing on early embryos prior to implantation to rule out a genetic condition.&lt;br /&gt;
**Newborn screening: screen for genetic disorders which can result in severe medical problems, metal retardation or even death in newborns. Some of the conditions can benefit form early treatment.&lt;br /&gt;
**Pharmacogenetic testing: to identify gene changes in metabolic pathways that determine drug response, both for therapeutic effects and adverse effects. Examples may be genetic testing for CYP450.&lt;br /&gt;
**Prognostic testing.&lt;br /&gt;
**Forensic testing.&lt;br /&gt;
**Identity testing: who is the parent.&lt;br /&gt;
&lt;br /&gt;
*Genetic Testing Challenges: &lt;br /&gt;
**Testing for many genetic conditions not yet standard of care. Few practice guidelines exist.&lt;br /&gt;
**Laboratories may offer different testing, even for the same genetic condition.&lt;br /&gt;
**Many genetic tests are costly, low detection rate.&lt;br /&gt;
**Genetic test results may be uninterpretable.&lt;br /&gt;
**Moving target; rapid evolution of information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''Genetic Association Studies:''' an observational study that tests for a statistically significant correlation between a genetic marker (the exposure) and a phenotype (the outcome).&lt;br /&gt;
*Genetic markers and phenotypes&lt;br /&gt;
**Genetic marker = any measurable genetic, polymorphism: varies across individuals, groups, or populations can occur in coding or non-coding regions of the genome.&lt;br /&gt;
**Phenotype = any measurable trait: quantitative (height, blood pressure, glucose levels); qualitative (heart disease, cancer, hair color).&lt;br /&gt;
*Genetic association studies can be planned and analyzed using the QMSSI framework: question, measure, sampling, statistics, and inferences.&lt;br /&gt;
*Study question: need to identify the population of interest (age, race, gender, geographic), the phenotype being studied and whether the study will look at specific genes with biological/positional relevance or agnostically search for new genomic regions of interest.&lt;br /&gt;
*Measures: methods for measuring both must be characterized (Valid? Reliable?); must be described (quantitative phenotypes such as normally distributed, mean, variance and qualitative phenotypes such as blood pressure vs. hypertensive).&lt;br /&gt;
*Sampling: family based (twin studies, heritability studies, linkage studies) vs. population based sampling&lt;br /&gt;
*Statistics: statistical tests for genetic association studies largely determined by type of sampling and type of outcome. &lt;br /&gt;
*Inferences: association is not sufficient to prove causation. A positive statistical finding does not definitively mean the polymorphism tested is causing the outcome. A statistical association may be a result of direct causal relationship between SNP and outcome; confounding (linkage disequilibrium; population stratification); spurious association, false positive result. &lt;br /&gt;
&lt;br /&gt;
*'''Gene-environment and Gene-gene Interactions'''&lt;br /&gt;
*Genes and Environment: almost all disease have a genetic component and an environmental component. How do these components interact? How to account for both effects?&lt;br /&gt;
*Model 1: Neither the genotype nor the environment along increase risk&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 9.png |400 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Model 2: The genotype exacerbates the effect of the risk factor&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 11.png| 500 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Model 3: The risk factor exacerbates the effect of the genotype.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 12.png| 500 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Model 4: The genotype and the risk factor each influence risk by themselves:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 13.png| 500 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*The study of gene-environment interactions, use epidemiologic techniques to identify both components (gene and environment):&lt;br /&gt;
**Case-control studies&lt;br /&gt;
**Cohort studies&lt;br /&gt;
**Case only studies&lt;br /&gt;
**Case-parental control&lt;br /&gt;
**Affected relative pair&lt;br /&gt;
**Twin studies&lt;br /&gt;
&lt;br /&gt;
To model Gene-Environment interactions:$ outcome = gene + environment + gene-environment\,interaction.  Y=G+E+GXE $&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
*[http://books.google.com/books?hl=en&amp;amp;lr=&amp;amp;id=ofQrN-fB3kkC&amp;amp;oi=fnd&amp;amp;pg=PA56&amp;amp;dq=epidemiology&amp;amp;ots=18YSP4iZg1&amp;amp;sig=82CUcLdJbPtNyypTfz-0_k6pTjE#v=onepage&amp;amp;q=epidemiology&amp;amp;f=false This article] titled The development epidemiology of anxiety disorders: phenomenology, prevalence, and comorbidity reviewed the prevalence and comorbidity of anxiety disorders in general, and where possible the specifics of separation anxiety disorder (SAD), generalizes anxiety disorder (GAD), specific phobias, panic, social phobia, and panic disorder and commented on the existing problems in current studies. It argues that as the quality of measures used to assess anxiety disorders in the child and adolescent population have improved in the past few years. Several of the instruments developed for epidemiologic research are now being used in clinical settings and further integration of research methods can be expected in the near future.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://www.jstor.org/discover/10.2307/3702080?uid=3739728&amp;amp;uid=2&amp;amp;uid=4&amp;amp;uid=3739256&amp;amp;sid=21103852741501 This article] focuses on the topic of dose-response and trend analysis in Epidemiology and it presents two classes of simple alternative that can be implemented with any regression software: fractional polynomial regression and spline regression which work especially when important nonlinearities are anticipated and software for more nonparametric regression approaches is not available. &lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
*[http://www.distributome.org/V3/calc/StudentCalculator.html Student Calculator]&lt;br /&gt;
*[http://socr.umich.edu/Applets/Normal_T_Chi2_F_Tables.html  Normal T Chi-Squared F tables]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
A rare recessive disease has recently been mapped to chromosome 11p15.5.  It is found in 2 per every 500,000 people.  All individuals with two copies of the recessive allele develop immediately apparent symptoms.&lt;br /&gt;
 &lt;br /&gt;
a. What is the frequency of the disease-causing allele in the population?&lt;br /&gt;
&lt;br /&gt;
b. What is the carrier frequency?&lt;br /&gt;
&lt;br /&gt;
c. In the U.S. population there are approximately 316 million people.  How many adults potentially carry the disease-causing allele (include only carriers, not homozygotes)?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consider the following scenarios:&lt;br /&gt;
1000 people from Population A and 1000 people from Population B were genotyped at a locus that has two alleles (C and T).These two populations are known to each be in HWE at this particular locus.  &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center;width:50%&amp;quot; Border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Population || Genotype frequency of CC&lt;br /&gt;
|-&lt;br /&gt;
|A||0.64&lt;br /&gt;
|-&lt;br /&gt;
|B||0.25&lt;br /&gt;
|-&lt;br /&gt;
|}	&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a.Based on the frequency of the CC genotype in the populations, what are the frequencies of the C and T alleles in each population?&lt;br /&gt;
&lt;br /&gt;
b.  What are the genotype frequencies of CT and of TT in population A? What are they in population B?&lt;br /&gt;
 &lt;br /&gt;
c.  In population A, how many people have the CC, CT, and TT genotypes? How many people have them in population B?&lt;br /&gt;
&lt;br /&gt;
d.  1000 people a new population, Population D, were genotyped at the same locus.  This population recently experienced a lot of migration, so we suspect that it may not be in HWE. There are 350 people with the CC genotype, 400 with CT, and 250 with TT. Based on the number of people with each genotype, what are the genotype frequencies of CC, CT, and TT in population D? &lt;br /&gt;
&lt;br /&gt;
e.  What are the allele frequencies of C and T in Population D?&lt;br /&gt;
&lt;br /&gt;
f.   After doing a test for HWE, you conclude that Population D is NOT in HWE. You suspect that non-random mating has occurred in this population. If Population D were to mate randomly for one generation, what would the allele frequencies be in the next generation?&lt;br /&gt;
&lt;br /&gt;
g.  What would the genotype frequencies be in Population D after one generation of random mating?&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
For the following case-control study, a total of 1200 cases and 1200 controls were recruited. The genotypes of the cases and the controls are given 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:50%&amp;quot; Border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| ||Cases || Controls&lt;br /&gt;
|-&lt;br /&gt;
|AA||374||445&lt;br /&gt;
|-&lt;br /&gt;
|AG||550||580&lt;br /&gt;
|-&lt;br /&gt;
|}	&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a. What are the allele frequencies in the cases?&lt;br /&gt;
&lt;br /&gt;
b. What are the allele frequencies in the controls?&lt;br /&gt;
&lt;br /&gt;
c. What are the expected genotype frequencies under Hardy-Weinberg equilibrium in the cases and in the controls?&lt;br /&gt;
&lt;br /&gt;
d. Is there evidence of Hardy-Weinberg disequilibrium in either the cases or controls?&lt;br /&gt;
e. What do the results of the HWE testing suggest in terms of which allele might be related to the disease?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You started a new job at the paternity testing lab, and your supervisor has asked you to look at the Southern blots of VNTRs to help determine paternity. For each of the three families below, you genotyped a single VNTR for the mother, the child, and two men who may potentially be the child’s father. Shown below are the Southern blots for each of the three families, with the number of repeats of the VNTR shown on the right- and left-hand sides of the blot. &lt;br /&gt;
&lt;br /&gt;
For each of the three families below, does analysis of the single VNTR provide information about whether either of the potential fathers may (or may not) be the true father of the child? Explain your answers, specifically stating the evidence (for example, “Potential Father 1 could be the true father if the child inherited the version with 3 repeats from the mother and version with 5 repeats from Potential Father 1”). &lt;br /&gt;
&lt;br /&gt;
a. Family #1&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 14.png| 200 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b. Family #2&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 15.png| 200 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c.  Family #3&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 16.png| 200 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Analyze the following pedigree under an autosomal recessive model.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 17.png| 200 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
a. Assuming complete penetrance, what is the penetrance function (probability of disease for each genotype) under the autosomal recessive model where ‘d’ is the recessive deleterious allele?&lt;br /&gt;
&lt;br /&gt;
P(disease|DD) = &lt;br /&gt;
&lt;br /&gt;
P(disease|Dd) = &lt;br /&gt;
&lt;br /&gt;
P(disease|dd) = &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
b. Fill in the potential genotypes of each person under an autosomal recessive model (using the information from part ‘a’ above).&lt;br /&gt;
&lt;br /&gt;
Possible Genotypes&lt;br /&gt;
I-1&lt;br /&gt;
&lt;br /&gt;
I-2&lt;br /&gt;
&lt;br /&gt;
II-1&lt;br /&gt;
&lt;br /&gt;
II-2&lt;br /&gt;
&lt;br /&gt;
II-3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
c. If the deleterious allele occurs at a frequency of 0.05 in the population, what are the probabilities of ANY two parents in the population having genotypes DD, Dd, or dd? (use founder probability concept).&lt;br /&gt;
&lt;br /&gt;
Possible Genotype	P(Genotype)&lt;br /&gt;
&lt;br /&gt;
I-1: 	DD&lt;br /&gt;
&lt;br /&gt;
	Dd   &lt;br /&gt;
&lt;br /&gt;
	dd   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I-2: 	DD&lt;br /&gt;
&lt;br /&gt;
	Dd&lt;br /&gt;
&lt;br /&gt;
	dd&lt;br /&gt;
&lt;br /&gt;
		&lt;br /&gt;
d. Using transmission probabilities, determine the probability of each offspring’s genotype assuming a Dd x dd mating. &lt;br /&gt;
&lt;br /&gt;
Possible Genotype	P(Genotype)&lt;br /&gt;
&lt;br /&gt;
II-1: 	DD&lt;br /&gt;
&lt;br /&gt;
	Dd&lt;br /&gt;
&lt;br /&gt;
	dd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
II-2: 	DD&lt;br /&gt;
&lt;br /&gt;
	Dd&lt;br /&gt;
	&lt;br /&gt;
	dd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
II-3: DD&lt;br /&gt;
&lt;br /&gt;
Dd&lt;br /&gt;
&lt;br /&gt;
dd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
e. Compare the penetrance for each member under two models: a completely penetrant autosomal recessive disease, and an incomplete penetrance model $(P(aff|dd)=.9; P(aff|Dd)=0.2; P(aff|DD)=0).$  What are the probabilities of each pedigree member phenotype, given the possible genotypes&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:50%&amp;quot; Border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Affected ||Possible|| Complete Penetrance|| Incomplete Penetrance&lt;br /&gt;
|-&lt;br /&gt;
|Not Affected||Genotype||P(phenotype/genotype)||P(phenotype/genotype)&lt;br /&gt;
|-&lt;br /&gt;
|I-1||Not||DD ||&lt;br /&gt;
|-&lt;br /&gt;
|  || Affected || Dd ||&lt;br /&gt;
|-&lt;br /&gt;
| || dd ||  ||&lt;br /&gt;
|-&lt;br /&gt;
|I-2||Affected||DD ||&lt;br /&gt;
|-&lt;br /&gt;
|  || Dd ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| || dd|| ||&lt;br /&gt;
|-&lt;br /&gt;
|II-1||Affected||DD ||&lt;br /&gt;
|-&lt;br /&gt;
|  || || Dd ||&lt;br /&gt;
|-&lt;br /&gt;
| || dd || ||&lt;br /&gt;
|-&lt;br /&gt;
|II-2||Affected||DD  ||&lt;br /&gt;
|-&lt;br /&gt;
|  || Dd || ||&lt;br /&gt;
|-&lt;br /&gt;
| || dd||  ||&lt;br /&gt;
|-&lt;br /&gt;
|II-3||Affected||DD||&lt;br /&gt;
|-&lt;br /&gt;
|  || Dd  || ||&lt;br /&gt;
|-&lt;br /&gt;
| || dd  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
|}	&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
f. Putting it all together, what is the probability of this pedigree under the complete penetrance model in the scenario below? What is the probability of this pedigree under the incomplete penetrance model?&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 18.png| 300 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Complete penetrance model, autosomal recessive:&lt;br /&gt;
&lt;br /&gt;
Incomplete penetrance model, autosomal recessive:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consider a woman who is a known heterozygous carrier of a mutation that causes the recessive disease PKU. She is shown in generation I. For the questions below, briefly explain how you got your answers. (You can assume that individuals entering the pedigree from outside the family are NOT carriers of the PKU-causing allele.)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 19.png| 300 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
a. What is the probability that her grandson, individual B, will be a heterozygous carrier of this PKU-causing allele?&lt;br /&gt;
&lt;br /&gt;
b. What is the probability that both of her granddaughters, individuals A and C, will both be heterozygous carriers of this PKU-causing allele?&lt;br /&gt;
&lt;br /&gt;
c. What is the probability that all three of her grandchildren will be heterozygous carriers of this PKU-causing allele?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cultures, nieces are encouraged to marry their uncles as shown in the pedigree below. Here, the niece is pedigree member III-1, and the uncle is designated II-3. &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 20.png| 300 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a. If these two individuals have a child, what is the probability that the child will have alleles that are identical by descent at any given locus? (Explain your reasoning / show your work)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
b. If the paternal common ancestor (designated I-1) is a carrier for an allele that will cause a recessive disease, what is the probability that the child will have the disease?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Analyze the following pedigree. Assume that the disease is autosomal dominant and fully penetrant.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:SMHS Epi Figure 21.png| 400 px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a.  Using “D” to represent the dominant allele and “d” to represent the recessive allele, what are the genotypes of each person in the pedigree?&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center;width:30%&amp;quot; Border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|I-1 ||&lt;br /&gt;
|-&lt;br /&gt;
|I-2 ||&lt;br /&gt;
|-&lt;br /&gt;
|II-1 ||&lt;br /&gt;
|-&lt;br /&gt;
|II-2 || &lt;br /&gt;
|-&lt;br /&gt;
|II-3 ||&lt;br /&gt;
|-&lt;br /&gt;
|II-4 ||&lt;br /&gt;
|-&lt;br /&gt;
|II-5 ||&lt;br /&gt;
|-&lt;br /&gt;
|II-6 ||&lt;br /&gt;
|-&lt;br /&gt;
|II-7 ||&lt;br /&gt;
|-&lt;br /&gt;
|}	&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
b. The number of repeats at a particular VNTR locus were measured on each person in the family, and are given in the table below. &lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center;width:30%&amp;quot; Border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Pedigree Member || Number of VNTR Repeats&lt;br /&gt;
|-&lt;br /&gt;
|I-1 || 125-137&lt;br /&gt;
|-&lt;br /&gt;
|I-2 || 129-141&lt;br /&gt;
|-&lt;br /&gt;
|II-1 || 137-/141&lt;br /&gt;
|-&lt;br /&gt;
|II-2 || 125/129&lt;br /&gt;
|-&lt;br /&gt;
|II-3 || 137/129&lt;br /&gt;
|-&lt;br /&gt;
|II-4 || 125/141&lt;br /&gt;
|-&lt;br /&gt;
|II-5 || 125/129&lt;br /&gt;
|-&lt;br /&gt;
|II-6 || 137/141&lt;br /&gt;
|-&lt;br /&gt;
|II-7 || 125/141&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
c. How many informative meioses are there in this pedigree? Did the informative meioses happen in the mother, the father, or both?&lt;br /&gt;
&lt;br /&gt;
What are the haplotypes of the offspring generation?&lt;br /&gt;
II-1&lt;br /&gt;
&lt;br /&gt;
II-2&lt;br /&gt;
&lt;br /&gt;
II-3&lt;br /&gt;
&lt;br /&gt;
II-4&lt;br /&gt;
&lt;br /&gt;
II-5&lt;br /&gt;
&lt;br /&gt;
II-6&lt;br /&gt;
&lt;br /&gt;
II-7&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
d. What are the potential haplotypes of the parental generation?&lt;br /&gt;
I-1	&lt;br /&gt;
I-2&lt;br /&gt;
	&lt;br /&gt;
e. How many recombinant offspring are there? Give a separate answer for each potential I-1 haplotype.&lt;br /&gt;
&lt;br /&gt;
f. Using the formula $\theta$=k/n, what is the maximum likelihood estimate of $\theta$? (give a separate answer for each potential I-1 haplotype).  For which I-1 haplotype does $\theta$ make intuitive sense?&lt;br /&gt;
&lt;br /&gt;
g. Although we can guess the phase of I-1, assume for the remainder of the question that it is unknown. What is the general form of L($\theta$) for this pedigree?&lt;br /&gt;
&lt;br /&gt;
h.  What is the general form of Z($\theta$) for this pedigree?&lt;br /&gt;
&lt;br /&gt;
i.  Calculate the LOD score (Z($\theta$)) for the family above at the following values of $\theta$&lt;br /&gt;
&lt;br /&gt;
$\theta	       \,\,\,\,\,\,\,\,\,$  LOD Score&lt;br /&gt;
&lt;br /&gt;
0	&lt;br /&gt;
&lt;br /&gt;
.05	&lt;br /&gt;
&lt;br /&gt;
.10&lt;br /&gt;
&lt;br /&gt;
.20	&lt;br /&gt;
&lt;br /&gt;
j.  What is the maximum likelihood estimate of $\theta$ from part (i)?&lt;br /&gt;
&lt;br /&gt;
k.  A larger collection of pedigrees were ascertained that have the disease; listed below are their LOD scores at the maximum likelihood estimate of $\theta$ that you calculated in part (j).  What do you conclude about linkage when you consider these pedigrees in addition to the one you have already been analyzing? Is there significant evidence for linkage?&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center;width:30%&amp;quot; Border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Pedigrees || Z$\theta$&lt;br /&gt;
|-&lt;br /&gt;
|1 || 0.22&lt;br /&gt;
|-&lt;br /&gt;
|2 || 0.34&lt;br /&gt;
|-&lt;br /&gt;
|3 || 1.06&lt;br /&gt;
|-&lt;br /&gt;
|4 ||-0.51&lt;br /&gt;
|-&lt;br /&gt;
|5 || 1.05&lt;br /&gt;
|-&lt;br /&gt;
|6 || 0.65&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
l. Now, imagine that there was an error in the lab, and individual II-5 actually has the VNTR alleles 137/129. Calculate the LOD score (Z($\theta$)) for the family above at the following values of $\theta$.&lt;br /&gt;
&lt;br /&gt;
$\theta	       \,\,\,\,\,\,\,\,\,$  LOD Score&lt;br /&gt;
&lt;br /&gt;
0	&lt;br /&gt;
&lt;br /&gt;
.05	&lt;br /&gt;
&lt;br /&gt;
.10&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
m.  Now, given this lab error, what do you conclude about linkage given this pedigree and the other pedigrees in part (k)? Use the same MLE that you calculated in part (j).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Epidemiology Epidemiology Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_Epidemiology}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_CorrectionMultipleTesting&amp;diff=13560</id>
		<title>SMHS CorrectionMultipleTesting</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_CorrectionMultipleTesting&amp;diff=13560"/>
		<updated>2014-08-29T17:02:38Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Correction for Multiple Testing ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Multiple testing refers to studies where simultaneous testing of several hypotheses is performed. This is very common in empirical research and additional methods besides the traditional rules needs to be applied in multiple testing in order to adjust the error rates for the multiple testing problems. Here, we introduce protocols for correction of multiple testing, discuss about the general problems with multiple testing, and present ways to deal with the multiple testing problems efficiently including Bonferroni, Tukey’s procedure, Family-Wise Error Rate (FWER), and FDR (false discovery rate).&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have learned how to do the hypothesis testing and parametric inference using statistical tests. However, the multiple testing problems will occur when one considers simultaneously a set of inference questions, or infers a subset of parameters selected based on the observed values. Consider a simple example where we run the same experiment 100 times, independently. If our a priori false-positive (type I error) rate is 0.05 (meaning one out of 20, or 5 out of 100) experiments are likely to generate significant result for any one experiment simply due to chance alone, then among the 100 experiments, we would expect to see about 5 (5 out of 100) experiments falsely generate positive results. Multiple-testing correction refers to modifying the inference protocol so that the true false-positive rate remains fixed (or is controlled) despite the fact that we test multiple hypotheses. Examples:&lt;br /&gt;
&lt;br /&gt;
* Suppose a treatment is a new way of teaching writing to students, and the control is the standard way of teaching writing. Students in the two groups can be compared in terms of grammar, spelling, organization, content, and so on. As more attributes are compared, it becomes more likely that the treatment and control groups will appear to differ on at least one attribute by random chance alone.&lt;br /&gt;
&lt;br /&gt;
* Consider the efficacy of a drug in terms of the reduction of any one of a number of disease symptoms. As more symptoms are considered, it becomes more likely that the drug will appear to be an improvement over existing drugs in terms of at least one symptom.&lt;br /&gt;
&lt;br /&gt;
* Suppose we investigate the safety of a drug in terms of the occurrences of different types of side effects. As more types of side effects are considered, it becomes more likely that the new drug will appear to be less safe than existing drugs in terms of at least one side effect.&lt;br /&gt;
&lt;br /&gt;
The number of comparisons increases in these examples which leads to conclusions that the groups being compared do differ in terms of at least one attribute. Our confidence that a result will generalize to independent data should generally be weaker if it is observed as part of an analysis that involves multiple comparisons, rather than an analysis that involves only a single comparison. If a test is performed at the \(\alpha=0.05\) level, there is only a 5% chance of incorrectly rejecting the null hypothesis if the null hypothesis is true. However, for 100 tests where all null hypotheses are true, the expected number of incorrect rejections is 5. If the tests are independent, the probability of at least one incorrect rejection is 99.4% (as \(P(\ge 1)=1-P(0) = 1-0.95^(100)=0.9940795\). These errors are called false positives or Type I errors.&lt;br /&gt;
&lt;br /&gt;
So what can we do to adjust for multiple testing? How can we keep the prescribed family wise error rate of α in an analysis involving more than one comparison? Apparently, the error rate for each comparison, it must be more stringent than α. Multiple testing correction would be the way to go and we are going to introduce some commonly used methods for adjusting for this type of error in multiple testing.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
====Family-Wise Error Rate (FWER)====&lt;br /&gt;
The probability of making the type I error among all the hypotheses when performing multiple hypothesis tests. FWER exerts a more stringent control over false discovery compared to false discovery rate controlling procedure. Suppose we did simultaneous tests on m hypotheses denoted by \(H_1,H_2,…,H_m\) with corresponding p-values \(p_1,p_2,…,p_m\). Let \(I_0\) be the subset of the true null hypotheses with \(m_0\). Our aim is to achieve an ''overall type I error rate of α'' from this cumulative multiple testing inference.  \(FWER=Pr⁡(V≥1)=1-Pr⁡(V=0)\). By assuming \(FWER≤α\), the probability of making even one type I error in the family is controlled at level α. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ||Null hypothesis is True||Alternative hypothesis is True||Total&lt;br /&gt;
|-&lt;br /&gt;
| Declared significant||V (number of false positives)||S(number of true positives)||R&lt;br /&gt;
|-&lt;br /&gt;
| Declared non-significant||U(number of true negatives)||T(number of false negatives)||m-R&lt;br /&gt;
|-&lt;br /&gt;
| Total	|| m_0(number of true null hypotheses)||m-m_0(number of true alternatives)||m&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A procedure controls the FWER in the weak sense if the FWER control at level α is guaranteed only when all hypotheses are true.&lt;br /&gt;
* A procedure controls the FWER in the strong sense if the FWER control at level α is guaranteed for any configuration of true and non-true null hypotheses.&lt;br /&gt;
&lt;br /&gt;
Controlling FWER: &lt;br /&gt;
* Bonferrroni: states that rejecting all \(p_i≤α/m\) will control that \(FWER≤α\) which is proved through Boole’s Inequality: \(FWER=Pr⁡(\Cup_i{p_i≤α/m}) \leq \sum_i{Pr⁡(p_i≤α/m)} ≤ m_0 α/m ≤ m α/m = α\). This is the simplest and most conservative method to control FWER though it can be (very) conservative if there are a large number of tests and/or the test statistics are positively correlated. It controls the probability of false positives only.&lt;br /&gt;
&lt;br /&gt;
* Tukey’s procedure is only applicable for pairwise comparisons. It assumes independence of the observations being tested as well as equal variance across observations. The procedure calculates for each pair the standardized range statistics: \( \frac{Y_A-Y_B}{SE}\), where \(Y_A\) is the larger of the two means being compared and \(Y_B\) is the smaller one and SE is the standard error of the data.&lt;br /&gt;
	&lt;br /&gt;
* The Sidak procedure works for independent tests where each hypothesis test has \(α_SID=1-(1-α)^{1/m}\). This is a more powerful method than Bonferroni but the gain is small. &lt;br /&gt;
&lt;br /&gt;
* Holm’s step-down procedure starts by ordering the p values from lowest to highest as  \(p_{(1)},p_{(2)},…,p_{(m)} \) with corresponding hypotheses  \(H_{(1)},H_{(2)},…,H_{(m)}\). Suppose R is the smallest k such that \(p_{(k)}&amp;gt;α/(m+1-k)\). Reject the null hypotheses \(H_{(1)},H_{(2)},…,H_{(m)}\), if \(R=1\) then none of the hypotheses are rejected. This method is uniformly better than Bonferroni’s and it is based on Bonferroni with no restriction on the joint distribution of the test statistics.&lt;br /&gt;
&lt;br /&gt;
* Hochberg’s step-up procedure: starts by ordering the p values from lowest to highest as  \(p_{(1)},p_{(2)},…,p_{(m)} \)  with corresponding hypotheses  \(H_{(1)},H_{(2)},…,H_{(m)}\). For a given α, let \(R\) be the largest k such that \(p_{(k)}≤α/(m+1-k)\). Reject the null hypotheses \(H_{(1)},H_{(2)},…,H_{(R)}\) only, and none of the \(H_{(R+1)},…,H_{(m)}\). It is more powerful than Holm’s, however, it is based on the Simes test so it holds only under independence (and also under some form of positive dependence).&lt;br /&gt;
&lt;br /&gt;
====FDR (false discovery rate)====&lt;br /&gt;
A statistical method used in multiple hypothesis testing to adjust for multiple comparisons. It is designed to control the expected proportion of incorrectly rejected null hypotheses. Compared to FWER, it exerts a less stringent control over false discovery and seeks to reduce the probability of even one false discovery as opposed to the expected proportion of false discoveries and enjoys greater power at the cost increased rate of type I errors. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ||Null hypothesis is True||Alternative hypothesis is True||Total&lt;br /&gt;
|-&lt;br /&gt;
| Declared significant||V (number of false positives)||S(number of true positives)||R&lt;br /&gt;
|-&lt;br /&gt;
| Declared non-significant||U(number of true negatives)||T(number of false negatives)||m-R&lt;br /&gt;
|-&lt;br /&gt;
| Total	|| $m_0$(number of true null hypotheses)||$m-m_0$ (number of true alternatives)||m&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Define $Q$ as the proportion of false discoveries among the discoveries $Q=\frac{V}{R}$, then FDR is defined as $FDR=Q_e=E[Q]=E[\frac{V}{V+S}]=E[\frac{V}{R}]$, where $\frac{V}{R} is defined to be 0 when R=0. Our aim is to keep FDR below the threshold α (or q). And q-value is defined as FDR analogue of the p-value, the q-value of individual hypothesis test is the minimum FDR at which the test may be called significant.&lt;br /&gt;
&lt;br /&gt;
Controlling procedures of FDR:&lt;br /&gt;
: With m null hypotheses \(H_1,H_2,…,H_m\) and \(p_1,p_2,…,p_m\) as their corresponding p-values. We order these p-values in increasing order and denote as \(p_{(1)},p_{(2)},…,p_{(m)}\).&lt;br /&gt;
&lt;br /&gt;
* Benjamini-Hochberg procedure controls the false discovery (at least α). For a given α, find the largest k such that \(p_((k))≤k/m α\); then reject all \(H_{(i)}\) for \(i=1,…,k\). This method works when the m tests are independent as well as with some cases of dependence: \(E(Q)≤\frac{m_0}{m}α≤α\).&lt;br /&gt;
&lt;br /&gt;
* Benjamini-Hochberg-Yekutieli procedure controls the FDR under positive dependence assumptions. It modifies the BH procedure: \(p_{(k)}≤\frac{k}{m*c(m)}α\), if the tests are independent or positively correlated we choose \(c(m)=1\) and choose \(c(m)=\sum_{i=1}^m{1/i}\) with arbitrary dependent tests, when the tests are negatively correlated, c(m) can be approximated with \(\sum_{i=1}^m{1/i} \approx ln(m)+ \gamma\), where \(\gamma\) is the [http://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant Euler-Mascheroni constant].&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
Suppose we have computed a vector of p-values \(p_1,p_2…,p_n\). Let’s compare the corrections using different strategies:&lt;br /&gt;
 # Given a set of p-values, returns p-values adjusted using one of several methods.&lt;br /&gt;
 # c(&amp;quot;holm&amp;quot;, &amp;quot;hochberg&amp;quot;, &amp;quot;hommel&amp;quot;, &amp;quot;bonferroni&amp;quot;, &amp;quot;fdr&amp;quot;, &amp;quot;BY&amp;quot;,&lt;br /&gt;
 #   &amp;quot;fdr&amp;quot;, &amp;quot;none&amp;quot;)&lt;br /&gt;
 &amp;gt; p.adjust(c(0.05,0.05,0.1),&amp;quot;bonferroni&amp;quot;)&lt;br /&gt;
 [1] 0.15 0.15 0.30&lt;br /&gt;
 &amp;gt; p.adjust(c(0.05,0.05,0.1),&amp;quot;fdr&amp;quot;)&lt;br /&gt;
 [1] 0.075 0.075 0.100&lt;br /&gt;
 &amp;gt; p.adjust(c(0.05,0.05,0.1),&amp;quot;fdr&amp;quot;)&lt;br /&gt;
 [1] 0.075 0.075 0.100&lt;br /&gt;
 &amp;gt; p.adjust(c(0.05,0.05,0.1),&amp;quot;holm&amp;quot;)&lt;br /&gt;
 [1] 0.15 0.15 0.15&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
* [[SOCR_EduMaterials_AnalysesCommandLineFDR_Correction|This article]] presents information on how to use the SOCR analyses library for the purpose of computing the False Discovery Rate (FDR) correction for multiple testing in volumetric and shape-based analyses. It provides the specific procedure to compute FDR using SOCR in multiple testing and illustrates with examples and supplementary information about FDR.&lt;br /&gt;
&lt;br /&gt;
* [http://home.uchicago.edu/amshaikh/webfiles/palgrave.pdf This article] is a comprehensive introduction to multiple testing. It describes the problem of multiple testing more formally and discusses methods, which account for the multiplicity issue. In particular, the recent developments based on resampling results in an improved ability to reject false hypotheses compared to classical methods such as Bonferroni. &lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
* [http://bioinformatics.oxfordjournals.org/content/21/12/2921.full BioInfo Paper]&lt;br /&gt;
* [http://socr.ucla.edu/htmls/SOCR_Analyses.html SOCR Analysis]&lt;br /&gt;
* [http://graphpad.com/quickcalcs/PValue1.cfm GraphPad]&lt;br /&gt;
* [[SOCR_EduMaterials_AnalysesCommandLineFDR_Correction| SOCR FDR]]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
# Suppose the research is conducted to test a new drug and there are 10 hypotheses being tested simultaneously. Calculate the significance level of each individual test using Bonferroni correction if we want to maintain an overall type I error of 5% and the probability of observing at least one significant result when using the correction you chose? &lt;br /&gt;
# Consider we are working with a study on test of a new drug for cancer where we have three treatments: the new medicine, the old medicine and the combination of the two. We are doing a pairwise test on these three treatments and want to maintain a Type I error rate of 5%. Consider the Tukey’s correction and describe how you are going to apply this method here.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiple_comparisons_problem  Multiple Comparison Problem Wikipedia]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Familywise_error_rate  FWER Wikipedia]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/False_discovery_rate   FDR Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_CorrectionMultipleTesting}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ClinicalStatSignificance&amp;diff=13559</id>
		<title>SMHS ClinicalStatSignificance</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ClinicalStatSignificance&amp;diff=13559"/>
		<updated>2014-08-29T17:01:51Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Clinical vs. Statistical Significance ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Statistical significance is related to the question of whether or not the results of a statistical test meet an accepted criterion. The criterion can be arbitrary and the same statistical test may give different results based on different criterion of significance. Usually, statistical significance is expressed in terms of probability (say p value, which is the probability of obtaining a test statistic result at least as extreme as the one that was actually observed assuming the null hypothesis is true). Clinical significance is the difference between new and old therapy found in the study large enough to alter the practice. This section presents a general introduction to the field of statistical significance with important concepts of tests for statistical significance and measurements of significance of tests as well as the application of statistical test in clinical and the comparison between clinical and statistical significance.&lt;br /&gt;
	 &lt;br /&gt;
===Motivation===&lt;br /&gt;
Significance is one of the most commonly used measurements in statistical tests from various fields. However, most researchers and students misinterpret statistical significance and non-significance. Few people know the exact indication of p value, which in some sense defines statistical significance. So the question would be, how can we define statistical significance? Is there any other ways to define statistical significance besides p value? What is missing in the ways to make inferences in clinical vs. statistical significance?  This lecture aims to help students have a thorough understanding of clinical and statistical significance.&lt;br /&gt;
	 &lt;br /&gt;
=== Theory===&lt;br /&gt;
	&lt;br /&gt;
*Statistical significance: the low probability at which an observed effect would have occurred due to chance. It is an integral part of statistical hypothesis testing where it plays a vital role to decide if a null hypothesis can be rejected. The criterion level is typically the value of p&amp;lt;0.05, which is chosen to minimize the possibility of a Type I error, finding a significant difference when one does not exist. It does not protect us from Type II error, which is defined as failure to find a difference when the difference does exist.&lt;br /&gt;
**Statistical significance involves important factors like (1) magnitude of the effect; (2) the sample size; (3) the reliability of the effect (i.e., the treatment equally effective for all participants); (4) the reliability of the measurement instrument.&lt;br /&gt;
**Problems with p value and statistical significance: (1) failure to reject the null hypothesis doesn’t mean we accept the null; (2) in any cases, the true effects in real life are never zero and things can be disproved only in pure math not in real life; (3) it’s not logical to assume that the effects are zero until disproved; (4) the significant level is arbitrary.&lt;br /&gt;
**p value: probability of obtaining a test statistic result at least as extreme as the one that was actually observed when the null hypothesis is actually true. It is used in the context of null hypothesis testing in order to quantify the idea of statistical significance of evidence. A researcher will often reject the null when p value turns out to be less than a predetermined significance level, say 0.05. If the p value is very small, usually less than or equal to a threshold value previously chosen (significance level), it suggests that the observed data is inconsistent with the assumption that the null hypothesis is true and thus the hypothesis must be rejected. The smaller the p value, the larger the significance because it informs that the hypothesis under consideration may not adequately explain the observation.&lt;br /&gt;
**Definition of p value: $Pr⁡(X \ge x|H_0)$ for right tail event; $Pr⁡(X \le x|H_0)$ for left tail event; $2*min⁡(Pr⁡(X \ge x│H_0 ),Pr⁡(X \ge x│H_0 ))$ for double tail event.&lt;br /&gt;
**The hypothesis $H_{0}$ is rejected if any of these probabilities is less than or equal to a small, fixed but arbitrarily predefined threshold α (level of significance), which only depends on the consensus of the research community that the investigator is working on. $\alpha =Pr⁡(reject H_0│H_0  is true)=Pr⁡(p \le \alpha)$.&lt;br /&gt;
**Interpretation of p value: p≤0.01 very strong presumption against null hypothesis; 0.01&amp;lt;p≤0.05 strong presumption against null hypothesis; 0.05&amp;lt;p≤0.1 low presumption against null hypothesis; p&amp;gt;0.1 no presumption against the null hypothesis.&lt;br /&gt;
**Criticism about p value: (1) p value does not in itself allow reasoning about the probabilities of hypotheses, which requires multiple hypotheses or a range of hypotheses with a prior distribution of likelihoods between them; (2) it refers only to a single hypothesis (null hypothesis) and does not make reference to or allow conclusions about any other hypotheses such as alternative hypothesis; (3) the criterion is based on arbitrary choice of level; (4) p value is incompatible with the likelihood principle and the p value depends on the experiment design or equivalently on the test statistic in question; (5) it is an informal measure of evidence against the null hypothesis.&lt;br /&gt;
**Several common misunderstandings about p values: (1) it is not the probability that the null hypothesis is true, nor is it the probability that the alternative probability is false, it is not concerned with either of them; (2) it is not the probability that a finding is merely by chance; (3) it is not the probability of falsely rejecting the null hypothesis; (4) it is not the probability that replicating the experiment would yield the same conclusion; (5) the significance level is not determined by p value; (6) p value does not indicate the size or importance of the observed effect.&lt;br /&gt;
*Clinical significance: in medicine and psychology, clinical significance is the practical importance of a treatment effect of whether it has a real genuine, noticeable effect on daily life. It yields information on whether a treatment is effective enough to change a patient’s diagnostic label and answers question of whether the treatment effective enough to cause the patient to be normal in clinical treatment studies. It is also a consideration when interpreting the result of a psychological assessment of an individual. Frequently, there will be a difference of scores that is statistically significant, unlikely to have occurred purely by chance.&lt;br /&gt;
**A clear demonstration of clinical significance would be to take a group of clients who score, say, beyond +2 SDs of the normative group prior to treatment and move them to within 1 SD from the mean of that group. The research implication of this definition is that you want to select people who are clearly disturbed to be in the clinical outcome study. If the mean of your untreated group is at, say, +1.2 SDs above the mean the change due to treatment probably is not going to be viewed as clinically significant.&lt;br /&gt;
**Clinical significance is defined by the smallest clinically beneficial and harmful values of the effect. These values are usually equal and opposite in sign. Because there is always a leap of faith in applying the results of a study to your patients (who, after all, were not in the study), perhaps a small improvement in the new therapy is not sufficient to cause you to alter your clinical approach. Note that you would almost certainly not alter your approach if the study results were not statistically significant (i.e. could well have been due to chance). But when is the difference between two therapies large enough for you to alter your practice?&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:Value of Effect Statistic.jpg]]&amp;lt;/center&amp;gt;&lt;br /&gt;
**Statistics cannot fully answer this question. It is one of clinical judgment, considering the magnitude of benefit of each treatment, the respective profiles of side effects of the two treatments, their relative costs, your comfort with prescribing a new therapy, the patient's preferences, and so on. But we can provide different ways of illustrating the benefit of treatments, in terms of the number needed to treat. If a study is very large, its result may be statistically significant (unlikely to be due to chance), and yet the deviation from the null hypothesis may be too small to be of any clinical interest.  Conversely, the result may not be statistically significant because the study was so small (or &amp;quot;under powered&amp;quot;), but the difference is large and would seem potentially important from a clinical point of view.  You will then be wise to do another, perhaps larger, study.&lt;br /&gt;
**The smallest clinically beneficial and harmful values help define probabilities that the true effect could be clinically beneficial, trivial, or harmful $p_{beneficial}, p_{trivial}, p_{harmful}$ and these P’s make an effort easier to assess and to publish.&lt;br /&gt;
	&lt;br /&gt;
'''Ways to calculate clinical significance:'''&lt;br /&gt;
*Jacobson-Truax: common method of calculating clinical significance. It involves calculating a Reliability Change Index (RCI). RCI equals the difference between a participant’s pre-test and post-test scores, divided by the standard error of the difference.&lt;br /&gt;
	&lt;br /&gt;
*Gulliksen-Lord-Novick: it is similar to Jacobson-Truax except that it takes into account regression to the mean. It is done by subtracting the pre-test and post-test scores from a population mean, and divided by the standard deviation of the population.&lt;br /&gt;
	&lt;br /&gt;
*Edwards-Nunnally: more stringent alternative to calculate clinical significance compared to Jacobson-Truax method. Reliability scores are used to bring the pre-test scores closer to the mean, and then a confidence interval is developed for this adjusted pre-test score.&lt;br /&gt;
	&lt;br /&gt;
*Hageman-Arrindel: involves indices of group change and individual change. The reliability of change indicates whether a patient has improved, stayed the same, or deteriorated. A second index, the clinical significance of change, indicates four categories similar to those used by Jacobson-Truax: deteriorated, not reliably changed, improved but not recovered, and recovered.&lt;br /&gt;
	&lt;br /&gt;
*Hierarchical Linear Modeling (HLM): involves growth curve analysis instead of pre-test post-test comparisons, so three data points are needed from each patient, instead of only two data points (pre-test and post-test).&lt;br /&gt;
	&lt;br /&gt;
One example illustrating the use of spreadsheet and the clinical importance of p=0.2.&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;
|rowspan=2|p value||rowspan=2|Value of statistic||rowspan=2|Confidence level (%)||rowspan=2|Degree of freedom||colspan=2|Confidence limits||colspan=2|Threshold for clinical chances&lt;br /&gt;
|-	&lt;br /&gt;
|lower||upper||positive||negative&lt;br /&gt;
|-	&lt;br /&gt;
|0.03||1.5||90||18||0.4||2.6||1||-1&lt;br /&gt;
|-&lt;br /&gt;
|0.2||2.4||90||18||-0.7||5.5||1||-1&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:75%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|Clinically positive||colspan=2|Clinically trivial||colspan=2|Clinically negative&lt;br /&gt;
|-	&lt;br /&gt;
|prob (%)||odds|| prob (%)||odds ||prob (%) ||odds&lt;br /&gt;
|-	&lt;br /&gt;
|78||3:1||22||1:3||0||1:2.2071&lt;br /&gt;
|-	&lt;br /&gt;
|colspan=2|Likely, probable||colspan=2|Unlikely, probably not ||colspan=2|(almost certainly) not&lt;br /&gt;
|-	&lt;br /&gt;
|78||3:1||19||1:4||4||1:25&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|Likely, probable||colspan=2|Unlikely, probably not||colspan=2|Very unlikely&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	 &lt;br /&gt;
And when reporting the research, one need to show the observed magnitude of the effect; attend to precision of estimation by showing 90% confidence limits of the true value; show the p value when necessary; attend to clinical, practical or mechanistic significance by stating the smallest worthwhile value when showing the probabilities that the true effect is beneficial, trivial, and/or harmful; make a qualitative statement about the clinical or practical significance of the effect with terms like likely, unlikely.&lt;br /&gt;
	 &lt;br /&gt;
One example would be: Clinically trivial, statistically significant and publishable rare outcome that can arise from a large sample size and usually misinterpreted as a worthwhile effect: (1) the observed effect of the treatment is 1.1 units (90% likely limits 0.4 to 1.8 units and p=0.007), (2) the chances that the true effect is practically beneficial/trivial/harmful are 1/99/0%.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
	&lt;br /&gt;
*[http://archpsyc.jamanetwork.com/article.aspx?articleid=206036 This article] titled Revised Prevalence Estimates of Mental Disorders In The United States responses to question on life interference from telling a professional about, or using medication for symptoms to ascertain the prevalence of clinically significant mental disorders in each survey. It made a revised national prevalence estimate by selecting the lower estimate of the 2 surveys for each diagnostic category accounting for comorbidity and combining categories. It concluded that establishing the clinical significance of disorders in the community is crucial for estimating treatment need and that more work should be done in defining and operationalizing clinical significance, and characterizing the utility of clinically significant symptoms in determining treatment need even when some criteria of the disorder are not met.&lt;br /&gt;
	 &lt;br /&gt;
*[http://jama.jamanetwork.com/article.aspx?articleid=187180 This article ] aims to evaluate whether the time to completion and the time to publication of randomized phase 2 and phase 3 trials are affected by the statistical significance of results and to describe the natural history of such trial and conducted a prospective cohort of randomized efficacy trials conducted by 2 trialist groups from 1986 to 1996. It finally concluded that among randomized efficacy trials, there is a time lag in the publication of negative findings that occurs mostly after the completion of the trial follow-up.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
* [http://graphpad.com/quickcalcs/PValue1.cfm GraphPad]&lt;br /&gt;
* [http://www.surveysystem.com/sscalc.htm SSCalc]&lt;br /&gt;
* [http://vassarstats.net/vsclin.html Vassarstats]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
Suppose we are playing one roll of a pair of dice and we roll a pair of dice once and assumes a null hypothesis that the dice are fair. The test statistic is &amp;quot;the sum of the rolled numbers&amp;quot; and is one-tailed. Suppose we observe both dice show 6, which yield a test statistic of 12. The p-value of this outcome is about 0.028 (1/36) (the highest test statistic out of 6×6 = 36 possible outcomes). If the researcher assumed a significance level of 0.05, what would be the conclusion from this experiment? What would be a potential problem with experiment to run the conclusion you proposed?&lt;br /&gt;
&lt;br /&gt;
Suppose a researcher flips a coin some arbitrary number of times (n) and assumes a null hypothesis that the coin is fair. The test statistic is the total number of heads. Suppose the researcher observes heads for each flip, yielding a test statistic of n and a p-value of 2/2n. If the coin was flipped only 5 times, the p-value would be 2/32 = 0.0625, which is not significant at the 0.05 level. But if the coin was flipped 10 times, the p-value would be 2/1024 ≈ 0.002, which is significant at the 0.05 level. What would be the problem here?&lt;br /&gt;
&lt;br /&gt;
Suppose a researcher flips a coin two times and assumes a null hypothesis that the coin is unfair: it has two heads and no tails. The test statistic is the total number of heads (one-tailed). The researcher observes one head and one tail (HT), yielding a test statistic of 1 and a p-value of 0. In this case the data is inconsistent with the hypothesis–for a two-headed coin, a tail can never come up. In this case the outcome is not simply unlikely in the null hypothesis, but in fact impossible, and the null hypothesis can be definitely rejected as false. In practice such experiments almost never occur, as all data that could be observed would be possible in the null hypothesis (albeit unlikely). What if the null hypothesis were instead that the coin came up heads 99% of the time (otherwise the same setup)?&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Statistical_significance   Statistical Significance Wikipedia ]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/P-value  P value WIkipedia]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Clinical_significance  Clinical Significance WIkipedia]&lt;br /&gt;
*[http://www.med.uottawa.ca/sim/data/Statistical_significance_importance_e.htm  Statistical Significance and Clinical Importance]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_ClinicalStatSignificance}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_RateOfChange&amp;diff=13558</id>
		<title>SMHS RateOfChange</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_RateOfChange&amp;diff=13558"/>
		<updated>2014-08-29T17:00:35Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Rate of Change ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Rate of change is a simple technical analysis indicator describing the rate in which one quantity changes in relation to another quantity:&lt;br /&gt;
&amp;lt;center&amp;gt; &lt;br /&gt;
$rate\, of\, change\,=\frac{change\, in\, y}{change\, in\, x\,}$&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The rate of change can be positive or negative indicating an increase or decrease in y between two data points when x increases by a unit. When a quantity does not change over time, it implies a zero rate of change. Momentum is the absolute difference between two data points, which will correspond to the change in y. Here, we introduce the concept of rate of change and show application of rate of change in technical analysis.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
Suppose we are studying on the changes in stock prices over a certain period and we know that the closing price on June 1, June 15, December 1, December 15 are 36, 38, 62, and 64 respectively. It is easily calculated that the absolute change in closing price of this stock from June 1 to June 15 is 38-36=2 which is the same as the absolute change in closing price of the stock from December 1 to December 15, which is also 64-62=2. However, is it enough to conclude that the price change is absolutely the same between these two time periods. For example, is it enough to reflect the same level of optimization for this stock in the market. The answer would be NO. Rate of change in the first half of June =(38-36)/36=0.0556, indicating that the stock price increased by 5.56% in the first half of June which is bigger compared to the rate of change in December (64-62)/62=0.0323. In order to make comparisons more comprehensively, we need to explore the properties of rate of change.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
====Slope====&lt;br /&gt;
To get a more visualized understanding of rate of change, we can think of slope as the simplest case of rate of change: &lt;br /&gt;
&amp;lt;center&amp;gt; &lt;br /&gt;
$rate\, of\, change\,=\frac{change\, in\, y}{change\, in\, x\,}$&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
which is the slope of the line located by the two data points. Zero rate of change will be illustrated with a horizontal line. &lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_SMHS_RateOfChange_Fig1.png|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Rate of change in a quadratic function====&lt;br /&gt;
The rate of change at the point, which is located on the curve is indicated by the red line in the chart. The essence of this is that even the pattern of a point does not follow a linear pattern, the rate of change is can still be calculated at that specific time point where the change in x is almost zero, so the rate of change would be the instant change in y at that point.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_SMHS_RateOfChange_Fig2.png|200px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
* [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&amp;amp;arnumber=4112036&amp;amp;url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D4112036 This article] claimed that new applications which can utilize the process power available within the substation with substation computer systems dedicated to protection, control and data logging function in a substation. This paper cited the microcomputer based symmetrical component distance relay (SCDR), which facilitate real-time monitoring of positive sequence voltage phasor at the local power system bus. This paper describes the theoretical basis of regression analysis on frequency and rate-of-change of the frequency at the bus and presents the results of the experiments performed in AEP power system simulation laboratory. It also pointed out the plans for future field tests on the AEP system.&lt;br /&gt;
&lt;br /&gt;
* [http://www.nature.com/ki/journal/v11/n1/abs/ki19778a.html This article] conducted a linear regression analysis using the logarithm or the reciprocal of the serum creatinline concentration versus time to examine the rate of change of the serum creatinline concentration in 63 patients with chronic progressive renal disease of varied etiology. The relationship of 53 patients out of the total of 63 can be described by a single straight line and 5 patients had an accelerated rate of nephron destruction terminally (two slopes) regardless of the mathematical analysis. The remaining four patients had course changes either due to apparent spontaneous remissions or temporally related to therapy. The paper concluded that these data suggest that (functional) nephron loss in chronic progress disease is orderly and mathematically definable and the theoretical implications are that functional nephron loss is either exponential or constant. &lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
* [http://www.montereyinstitute.org/courses/Algebra1/COURSE_TEXT_RESOURCE/U04_L1_T1_text_final.html  Math-based rate of change]&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
In R: ratechange ''&amp;lt;- function (x) ((last(x)-first(x))/first(x))*100''&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
* Use the table to find the rate of change. Then graph it.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! x: Time Driving (h)|| y: Distance Driven (mi)&lt;br /&gt;
|-&lt;br /&gt;
|2|| 80&lt;br /&gt;
|-&lt;br /&gt;
|4|| 160&lt;br /&gt;
|-&lt;br /&gt;
|6|| 240&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [http://www.regentsprep.org/regents/math/algebra/ac1/rate.htm  Slope and Rate of Change]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Slope  Slope WIkipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_RateOfChange}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_RateOfChange&amp;diff=13557</id>
		<title>SMHS RateOfChange</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_RateOfChange&amp;diff=13557"/>
		<updated>2014-08-29T17:00:23Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Rate of Change ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Rate of change is a simple technical analysis indicator describing the rate in which one quantity changes in relation to another quantity:&lt;br /&gt;
&amp;lt;center&amp;gt; &lt;br /&gt;
$rate\, of\, change\,=\frac{change\, in\, y}{change\, in\, x\,}$&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The rate of change can be positive or negative indicating an increase or decrease in y between two data points when x increases by a unit. When a quantity does not change over time, it implies a zero rate of change. Momentum is the absolute difference between two data points, which will correspond to the change in y. Here, we introduce the concept of rate of change and show application of rate of change in technical analysis.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
Suppose we are studying on the changes in stock prices over a certain period and we know that the closing price on June 1, June 15, December 1, December 15 are 36, 38, 62, and 64 respectively. It is easily calculated that the absolute change in closing price of this stock from June 1 to June 15 is 38-36=2 which is the same as the absolute change in closing price of the stock from December 1 to December 15, which is also 64-62=2. However, is it enough to conclude that the price change is absolutely the same between these two time periods. For example, is it enough to reflect the same level of optimization for this stock in the market. The answer would be NO. Rate of change in the first half of June =(38-36)/36=0.0556, indicating that the stock price increased by 5.56% in the first half of June which is bigger compared to the rate of change in December (64-62)/62=0.0323. In order to make comparisons more comprehensively, we need to explore the properties of rate of change.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
====Slope====&lt;br /&gt;
To get a more visualized understanding of rate of change, we can think of slope as the simplest case of rate of change: &lt;br /&gt;
&amp;lt;center&amp;gt; &lt;br /&gt;
$rate\, of\, change\,=\frac{change\, in\, y}{change\, in\, x\,}$&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
which is the slope of the line located by the two data points. Zero rate of change will be illustrated with a horizontal line. &lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_SMHS_RateOfChange_Fig1.png|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Rate of change in a quadratic function====&lt;br /&gt;
The rate of change at the point, which is located on the curve is indicated by the red line in the chart. The essence of this is that even the pattern of a point does not follow a linear pattern, the rate of change is can still be calculated at that specific time point where the change in x is almost zero, so the rate of change would be the instant change in y at that point.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_SMHS_RateOfChange_Fig2.png|200px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
* [http://ieeexplore.ieee.org/xpl/login.jsp?tp=&amp;amp;arnumber=4112036&amp;amp;url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D4112036 This article] claimed that new applications which can utilize the process power available within the substation with substation computer systems dedicated to protection, control and data logging function in a substation. This paper cited the microcomputer based symmetrical component distance relay (SCDR), which facilitate real-time monitoring of positive sequence voltage phasor at the local power system bus. This paper describes the theoretical basis of regression analysis on frequency and rate-of-change of the frequency at the bus and presents the results of the experiments performed in AEP power system simulation laboratory. It also pointed out the plans for future field tests on the AEP system.&lt;br /&gt;
&lt;br /&gt;
* [http://www.nature.com/ki/journal/v11/n1/abs/ki19778a.html This article] conducted a linear regression analysis using the logarithm or the reciprocal of the serum creatinline concentration versus time to examine the rate of change of the serum creatinline concentration in 63 patients with chronic progressive renal disease of varied etiology. The relationship of 53 patients out of the total of 63 can be described by a single straight line and 5 patients had an accelerated rate of nephron destruction terminally (two slopes) regardless of the mathematical analysis. The remaining four patients had course changes either due to apparent spontaneous remissions or temporally related to therapy. The paper concluded that these data suggest that (functional) nephron loss in chronic progress disease is orderly and mathematically definable and the theoretical implications are that functional nephron loss is either exponential or constant. &lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
* [http://www.montereyinstitute.org/courses/Algebra1/COURSE_TEXT_RESOURCE/U04_L1_T1_text_final.html  Math-based rate of change]&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
In R: ratechange ''&amp;lt;- function (x) ((last(x)-first(x))/first(x))*100''&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
* Use the table to find the rate of change. Then graph it.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! x: Time Driving (h)|| y: Distance Driven (mi)&lt;br /&gt;
|-&lt;br /&gt;
|2|| 80&lt;br /&gt;
|-&lt;br /&gt;
|4|| 160&lt;br /&gt;
|-&lt;br /&gt;
|6|| 240&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [http://www.regentsprep.org/regents/math/algebra/ac1/rate.htm  Slope and Rate of Change, online resource]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Slope  Slope WIkipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_RateOfChange}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_AssociationCausality&amp;diff=13556</id>
		<title>SMHS AssociationCausality</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_AssociationCausality&amp;diff=13556"/>
		<updated>2014-08-29T16:59:36Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Association and Causality ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
An association is any relationship between two measured quantities that renders them statistically dependent, meaning that the occurrence of one does affect the probability of the other as indicated in the probability theory. While causality is the relation between an event (the cause) and a second event (the effect), where the second event is understood as a consequence of the first. Generally speaking, association is a much broader relationship compared to causality. If we see two subjects has the causality relationship that assumes that they must be associated, however, an association relationship alone is not enough to address a causal relationship. There are many statistical measures of association that can be used to infer the presence or absence of association in a sample of data. Such as odds ratio (OR), risk ratio (RR) and absolute risk reduction (ARR). Yet, the proof of causality is much more rigid process. &lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
Suppose we study Lung Cancer in the context of heavy smokers. The table below illustrates some (simulated) data. One clear healthcare question in this case-study could be: “Is heavy smoking associated with higher incidence of lung cancer?”  and “Is heavy smoking the causation of lung cancer?” To address this question, we can look at the relative risk of tobacco usage.&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|Lung cancer (LC)|| rowspan=2|Total&lt;br /&gt;
|-&lt;br /&gt;
|Yes (A)||No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2|Heavy Smokers(HS)||Yes||18||80||98 (B)&lt;br /&gt;
|-&lt;br /&gt;
|No||7||95||102 (C)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=2|Total||25||175||200&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
Computing the (conditional!) probabilities (P) of lung cancer (LC) given either heavy smokers, P1, Non-heavy smokers, P2, we can form their ratio to determine if the relative risk of lung cancer (LC) is higher in heavy smokers (HS), relative to non-heavy smokers (NHS).&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
$P_{1}= P(LC|HS) =  \frac {18} {98}= 0.184$&lt;br /&gt;
&lt;br /&gt;
$P_{2}= P(LC|NHS) =  \frac {7} {102}  = 0.069$&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the [[SMHS_OR_RR#Motivation |formulas for the odds ration (OR) and relative risk (RR)]], we can compute that the relative risk (of lung cancer associated with heavy smoking) is:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
$RR=\frac {0.184}{0.069}  = 2.67.$&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The risk of having lung cancer is more than 2.5 times greater for heavy smokers when compared to non-heavy smokers. Hence RR can also be used as proof of association between heavy smoking and lung cancer. &lt;br /&gt;
For the same example, the odds ratio (OR) of lung cancer relative to heavy smoker is:&lt;br /&gt;
&lt;br /&gt;
$$ OR =  \frac{\frac{P \left( A \mid B \right)}{1 - P \left( A \mid B \right)}}{\frac{P \left( A \mid C \right)}{1 - P \left( A \mid C \right)}} &lt;br /&gt;
=  \frac{\frac{\frac{18}{98}}{1 - \frac{18}{98}}} {\frac{\frac{7}{102}}{1 - \frac{7}{102}}} =\frac{\frac{0.184}{0.816}}{\frac{0.069}{0.931}} = \frac{0.225}{0.074}= 3.04 $$&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the odds of having lung cancer is about 3 times greater for heavy smokers when compared to non-heavy smokers. Hence OR can also be used as proof of association between heavy smoking and lung cancer. &lt;br /&gt;
&lt;br /&gt;
However, this is not sufficient for the proof of causality between lung cancer and heavy smoking. To address causality, we need to refer to [[SMHS_AssociationCausality#Hill.E2.80.99s_criteria_for_causality| Hill’s criteria for causation]], which are a group of minimal conditions necessary to provide adequate evidence of a causal relationship between an incidence and a consequence, established by the English epidemiologist Sir Austin Bradford Hill in 1965. The list of criteria includes: strength; consistency; specificity; temporality; biological gradient; plausibility; coherence; experiment; analogy. (The specificity of each criteria is introduced in the theory part below).&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
====Association====&lt;br /&gt;
Statistical measures as RR and OR can be calculated as proof of association between events.&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|Factor 1|| rowspan=2|Total&lt;br /&gt;
|-&lt;br /&gt;
|Yes||No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2|Factor 2||Yes||$n_{1,1}$||$n_{1,2}$||$n_{1,1} + n_{1,2}$&lt;br /&gt;
|-&lt;br /&gt;
|No||$n_{2,1}$||$n_{2,2}$||$n_{2,1} + n_{2,2}$&lt;br /&gt;
|-&lt;br /&gt;
| colspan=2|Total||$n_{1,1} + n_{2,1}$||$n_{2,1} + n_{1,2}$||$N=n_{1,1} + n_{1,2} + n_{2,1} + n_{2,2}$&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$$RR=\frac{\frac{n_{1,1}}{n_{1,1}+ n_{1,2}}}{\frac{n_{2,1}}{n_{2,1}+n_{2,2}}}.$$&lt;br /&gt;
&lt;br /&gt;
$$OR = \frac{n_{1,1} × n_{2,2}}{n_{1,2}× n_{2,1}}.$$&lt;br /&gt;
&lt;br /&gt;
The odds of having factor 1 is OR times greater for people with factor 2 compared to people without factor 2.&lt;br /&gt;
&lt;br /&gt;
The risk of having factor 1 with people with factor 2 is RR times that risk of having factor 1 with people without factor 2.&lt;br /&gt;
&lt;br /&gt;
When OR or RR is not significantly different from 1, we can see that factor 1 and factor 2 are positively associated (&amp;gt;1) or negatively associated (&amp;lt;1).&lt;br /&gt;
&lt;br /&gt;
====Halpern-Pearl’s Definition of Causality====&lt;br /&gt;
In [http://bjps.oxfordjournals.org/content/56/4/843.short Causes and Explanations: A Structural-Model Approach], Halpern and Pearl gave a definition of actual causality based on the language of structural equations.&lt;br /&gt;
&lt;br /&gt;
Definition of '''Actual Cause (AC)''': $\overrightarrow {X} =\overrightarrow{x}$ is an actual cause of $\phi$ in $(M,\overrightarrow{u})$ if the following three conditions hold:&lt;br /&gt;
*AC1. $(M,\overrightarrow{u})⊨(\bar {X} ,\bar{x})\Lambda\phi$. That is, both $\overrightarrow{X}=\overrightarrow{x}$ and $\phi$ are true in the actual world.&lt;br /&gt;
&lt;br /&gt;
*AC2. There exists a partition $(\overrightarrow{Z},\overrightarrow{x})$ of $ν$ with $\overrightarrow{X} ⊆ \overrightarrow{ Z}$ and some settings $(\overrightarrow{x},\overrightarrow{ω})$ of the variable with $(\overrightarrow{X},\overrightarrow{W})$ such that if $(\overrightarrow{X},\overrightarrow{u})⊨Z=z^*$ for $Z \in \overrightarrow{Z}$, then&lt;br /&gt;
:: (a) $(M,\overrightarrow{u})⊨[\overrightarrow{X} ← \overrightarrow{x},\overrightarrow{W} ← \overrightarrow{ω},\overrightarrow{Z'} ← \overrightarrow{z^*}]¬φ$. In words, changing $(\overrightarrow{X},\overrightarrow{W})$ from $(x,ω)$ to $(\overrightarrow{x'},\overrightarrow{ω'})$ changes $φ$ from the true to false.&lt;br /&gt;
:: (b) $(M,\overrightarrow{u})⊨[\overrightarrow{X} ← \overrightarrow{x},\overrightarrow{W} ← \overrightarrow{ω},\overrightarrow{Z'} ← \overrightarrow{z^*}]φ$ for all subsets $\overrightarrow{Z'}$ of $\overrightarrow{Z}$. In words, setting $\overrightarrow{W}$ to $\overrightarrow{ω}$ should have no effect on $φ$ as long as $\overrightarrow{X}$ is kept at its current value $\overrightarrow{x}$, even if all the variables in an arbitrary subset of $\overrightarrow{Z}$ are set to their original values in the context $\overrightarrow{u}$.&lt;br /&gt;
&lt;br /&gt;
*AC3. $\overrightarrow{X}$ is minimal; no subset of $\overrightarrow{X}$ satisfies conditions AC1 and AC2. Minimality ensures that only those elements of the conjunction $\overrightarrow{X}=\overrightarrow{x}$ that are essential for changing $φ$ in AC2(a) are considered part of a cause; inessential elements are pruned. The types of events that we allow as actual causes are ones of the form $X_1=x_1 ⋀ … ⋀X_k = x_k$, that is, conjunctions of primitive events; this is abbreviated as $X=\overrightarrow{x}$.&lt;br /&gt;
&lt;br /&gt;
*Example: Suppose that there was a heavy rain in April and electrical storms in the following two months; and in June the lightning took hold. If it hadn’t been for the heavy rain in April, the forest would have caught fire in May. The question is whether the April rains caused the forest fire. According to a naive counterfactual analysis, they do, since if it hadn’t rained, there wouldn’t have been a forest fire in June. &lt;br /&gt;
&lt;br /&gt;
: This is unacceptable. A good enough story of events and of causation might give us reason to accept some things that seem intuitively to be false, but no theory should persuade us that delaying a forest’s burning for a month (or indeed a minute) is causing a forest fire.&lt;br /&gt;
&lt;br /&gt;
: In our framework, as we now show, it is indeed false to say that the April rains caused the fire, but they were a cause of there being a fire in June, as opposed to May. This seems to us intuitively right. To capture the situation, it suffices to use a simple model with three endogenous random variables:&lt;br /&gt;
&lt;br /&gt;
*AS for “April showers”, with two values—0 standing for did not rain heavily in April and 1 standing for rained heavily in April;&lt;br /&gt;
&lt;br /&gt;
*ES for “electric storms”, with four possible values: (0,0) (no electric storms in either May or June), (1,0) (electric storms in May but not June), (0,1) (storms in June but not May), and (1,1) (storms in April and May);&lt;br /&gt;
&lt;br /&gt;
*And F for “fire”, with three possible values: 0 (no fire at all), 1 (fire in May), or 2 (fire in June).&lt;br /&gt;
&lt;br /&gt;
: We do not describe the context explicitly, either here or in the other examples. Assume its value is such that it ensures that there is a shower in April, there are electric storms in both May and June, there is sufficient oxygen, there are no other potential causes of fire (like dropped matches), no other inhibitors of fire (alert campers setting up a bucket brigade), and so on. That is, we choose so as to allow us to focus on the issue at hand and to ensure that the right things happened (there was both fire and rain).&lt;br /&gt;
&lt;br /&gt;
: Avoiding writing out the details of the structural equations—they should be obvious, given the story (at least, for the context $\overrightarrow{u}$; this is also the case for all the other examples in this section. The causal network is simple: there are edges from AS to F and from ES to F. It is easy to check that each of the following hold.&lt;br /&gt;
&lt;br /&gt;
*AS = 1 is a cause of the June fire (F = 2) (taking $\overrightarrow{W}={ES}$ and $\overrightarrow{Z}={AS,F}$) but not of fire ($F=2 ⋁ F=1$).&lt;br /&gt;
&lt;br /&gt;
*ES = (1,1) is a cause of the both $F=2$ and ($F=1 ⋁ F=2$). Having electric storms in both May and June caused there to be a fire.&lt;br /&gt;
*$AS=1∧ES=(1,1)$ is not a cause of $F=2$, because it violates the minimality requirement of AC3; each conjunct alone is a cause of $F=2$. Similarly, $AS=1∧ES=(1,1)$ is not a cause of (F=1⋁F=2).&lt;br /&gt;
&lt;br /&gt;
: The distinction between April showers being a cause of the fire (which they are not, according to our analysis) and April showers being a cause of a fire in June (which they are) is one that seems not to have been made in the discussion of this problem; nevertheless, it seems to us an important distinction.&lt;br /&gt;
&lt;br /&gt;
====[http://en.wikipedia.org/wiki/Bradford_Hill_criteria Hill’s criteria for causality]====&lt;br /&gt;
*''Strength:'' A small association does not mean that there is not a causal effect, though the larger the association, the more likely that is causal.&lt;br /&gt;
*''Consistency:'' Consistent findings observed by different persons in different places with different sample strengthen the likelihood of an effect.&lt;br /&gt;
*''Specificity:'' Causation is likely if a very specific population at a specific site and disease with no other likely explanation. The more specific an association between a factor and an effect is, the bigger the probability of a causal relationship.&lt;br /&gt;
*''Temporality:'' The effect has to occur after the cause (and if there is an expected delay between the cause and expected effect, then the effect must occur after that delay).&lt;br /&gt;
*''Biological gradient:'' Greater exposure should generally lead to greater incidence of the effect. However, in some cases, the mere presence of the factor can trigger the effect. In other cases, an inverse proportion is observed: greater exposure leads to lower incidence.&lt;br /&gt;
*''Plausibility:'' A plausible mechanism between cause and effect is helpful (but Hill noted that knowledge of mechanism is limited by current knowledge).&lt;br /&gt;
*''Coherence:'' Coherence between epidemiological and laboratory findings increases the likelihood of an effect. However Hill noted that lack of such laboratory evidence cannot nullify the epidemiological effect on associations.&lt;br /&gt;
*Experiment: Occasionally it is possible to appeal to experimental evidence.&lt;br /&gt;
*''Analogy:'' The effect of similar factors may be considered.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
*[http://www.sciencedirect.com/science/article/pii/S1631069107001072  This article] reviews, from some important examples, the classical methodological approach for discussing causality in epidemiology. Coronary hear disease (CHD) prevention has largely benefited in the past from the development of epidemiological research, however, the opposition association-causation is currently raised from observational data. The easy identification of DNA polymorphisms has prompted new CHD etiological research in the past 10 years. Causality of the associations present some special characteristics when genes are involved: necessity of replication, Mendelian randomization, which might prove to be important in future research.&lt;br /&gt;
&lt;br /&gt;
*[http://www.edwardtufte.com/tufte/hill This article] is by Hill, Austin Bradford and it talked about reasoning about causal evidence in analytical thinking and it gave a thorough explanation on each of the Hill’s criteria and also the implication of these criteria in combined thinking and real life conditions of passing from association to causation. This article is very insightful and worth reading.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
*[http://www.distributome.org/V3/calc/StudentCalculator.html  Student Calculator]&lt;br /&gt;
*[http://socr.umich.edu/Applets/Normal_T_Chi2_F_Tables.html Normal T Chi Squared F Tables]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
After visiting your parents, your mother notes that you have been drinking a lot of black tea. She tells you that you should cut back to no more than one cup a day since caffeine is “bad for your health”.  To prove her wrong (and justify your love of hot beverages), you do a literature review of the epidemiology and find evidence that tea drinkers have lower risk of type 2 diabetes.  Before you go back to your mother with your findings, you decide to think carefully about the various lines of evidence to see if the data really seem causal.&lt;br /&gt;
&lt;br /&gt;
Compose a plausible biological argument as to why coffee and/or tea would be protective against type 2 diabetes. (You might want to use online resources or be creative.)&lt;br /&gt;
&lt;br /&gt;
You first identify a published ecological study that compared prevalent diabetes and black tea consumption in 50 countries. Their Figure 3 (shown below) illustrates their key finding, which suggests that there is lower type 2 diabetes prevalence with greater tea consumption. Comment on how strong of an argument this study makes for causality. Be sure to explain your reasoning and note which, if any, of Hill’s criteria are met with this study.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:SMHSAssociationCausalityFig3.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:SMHSAssociationCausalityfig1.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
Next, you find a study of type 2 diabetes and tea consumption that was conducted using information from the Women’s Health Study, a large prospective randomized controlled trial evaluating the impacts of low-dose aspirin and vitamin E on cardiovascular disease. In the Women’s Health Study, self-reported tea consumption collected at baseline and type 2 diabetes was self-reported over the follow-up period. Personal information was also collected about other individual risk factors for type 2 diabetes.  List three characteristics of this study that make it a stronger design to assess causality than the previous study.&lt;br /&gt;
&lt;br /&gt;
The following table illustrates the study findings with respect to tea. Comment on their findings.  Looking at the point estimates, comment if there is compelling evidence of a relationship between tea consumption and incident diabetes. If there is a relationship, could it be due to chance?  &lt;br /&gt;
&lt;br /&gt;
Table 3. Relative Risks(RRs) and 95% CIs of Type 2 Diabetes according to Categories of Various Flavonoid-Rich Food Groups among 38018 Women in the Women’s Health Study.&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|Variable||colspan=4|Category of intake&lt;br /&gt;
|-&lt;br /&gt;
|1st(lowest)||2nd||3rd||4th(highest)&lt;br /&gt;
|-&lt;br /&gt;
|Tea||None||&amp;lt;1 cup/d||1-3 cups/d||≥4 cups/d&lt;br /&gt;
|-&lt;br /&gt;
|No of cases/Total||496/12279||686/15633||363/8344||48/1201&lt;br /&gt;
|-&lt;br /&gt;
|Adjusted for age and energy||1.00||1.08(0.96-1.21)||1.03(0.90-1.19)||0.92(0.68-1.26)&lt;br /&gt;
|-&lt;br /&gt;
|Multivariate Model2||1.00||1.07(0.95-1.20)||1.04(0.90-1.20)||0.73(0.52-1.01)&lt;br /&gt;
|-&lt;br /&gt;
|Multivariate Model3||1.00||1.07(0.95-1.21)||1.05(0.91-1.21)||0.72(0.52-1.01)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' &lt;br /&gt;
''1. Test for trend based on ordinal variable containing median value for each quantile.''&lt;br /&gt;
''2. Multivariate model: adjusted for age (continuous), BMI (continuous), total energy intake (continuous), smoking (current, past and never), exercise (rarely/ never, &amp;lt;1 time/wk, 1-3 times/wk, and ≥ 4 times/wk), alcohol use (rarely/ never, 1-3 drinks/mo, 1-6 drinks/wk, and ≥ 1 drink/d), history of hypertension (yes/no), history of high cholesterol (yes/no), and family history of diabetes (yes/no).''&lt;br /&gt;
''3. Further adjustment for dietary intakes of fiber intake (quintiles), glycemic load (quintiles), magnesium (quintiles), and total fat (quintiles).''&lt;br /&gt;
&lt;br /&gt;
Looking more carefully at the table, you note that the authors report associations controlling for various factors in their statistical models.  (This approach, like stratification, is used to control for confounding by including the factors in a multivariable regression model.)  Reviewing the table, do you see evidence of confounding of the “crude” (age and energy adjusted model) relationship for persons drinking &amp;gt;4 cups of tea a day? &lt;br /&gt;
&lt;br /&gt;
The associations with &amp;gt;4 cups of tea shown in Table 3 becomes stronger (further away from the null) after adjustment for BMI, exercise, and fiber. Given that tea drinkers have lower BMI, better exercise patterns, and healthier diets, why does this finding seem surprising? &lt;br /&gt;
&lt;br /&gt;
The authors also examined associations between an antioxidant contained in tea and two subclinical markers of diabetes (HbA1C &amp;amp; insulin) but found no relationship.  How does this information influence your assessment of the causal relationship between tea and type 2 diabetes?&lt;br /&gt;
&lt;br /&gt;
Another European study explored incident type 2 diabetes and tea consumption. The following table presents the associations for consuming &amp;gt;0 to &amp;lt;1, 1 to &amp;lt;4, &amp;gt;4 cups of tea per day as compared to consuming no tea per day (categories in the column on the far left).  What feature of their findings makes the association seem more likely to be causal?&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=4| ||colspan=2|Crude||colspan=2|Model 1||colspan=2|Model 2||colspan=2|Model 3||colspan=2|Model 4&lt;br /&gt;
|-&lt;br /&gt;
| ||N total||Cases||Median||HR||95% CI||HR||95% CI||HR||95% CI||HR||95% CI||HR||95% CI&lt;br /&gt;
|-&lt;br /&gt;
|0||9499||4389||0||1|| ||1|| ||1|| ||1|| ||1||&lt;br /&gt;
|-&lt;br /&gt;
|0 – 1||7060||3197||0.23||0.89||(0.80, 0.99)||0.96||(0.81, 1.07)||0.96||(0.84, 1.01)||0.97||(0.85, 1.01)||1.03||(0.91, 1.16)&lt;br /&gt;
|-&lt;br /&gt;
|1 – 4||5751||2437||2.00||0.771||(0.66, 0.90)||0.85||(0.69, 0.99)||0.85||(0.71, 1.01)||0.84||(0.72, 0.98)||0.93||(0.81, 1.05)&lt;br /&gt;
|-&lt;br /&gt;
|≥4||3729||1518||6.84||0.63||(0.50, 0.80)||0.72||(0.52, 0.90)||0.72||(0.53, 0.96)||0.70||(0.53, 0.90)||0.84||(0.71, 1.00)&lt;br /&gt;
|-&lt;br /&gt;
|p-trend|| || || ||&amp;lt;0.01|| ||&amp;lt;0.01|| ||&amp;lt;0.01|| ||&amp;lt;0.01|| ||0.04|| |	&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:''&lt;br /&gt;
''HR and 95% CI were derived from the modified Cox proportional hazard model by age at baseline and are based on pooled estimates from country specified analyses using a random effects meta-analysis.''&lt;br /&gt;
&lt;br /&gt;
''Model 1: sex, smoking status physical activity level and education level.''&lt;br /&gt;
''Model 2: additional to model 1: intake of energy, protein, carbohydrates, saturated fatty acids, mono-unsaturated fatty acids, poly-unsaturated fatty acids, alcohol, and fiber.''&lt;br /&gt;
''Model 3: additional to model 2: intake of coffee, juices, soft drinks, and milk.''&lt;br /&gt;
''Model 4: additional to model 3: body mass index.''&lt;br /&gt;
 &lt;br /&gt;
In both of the final two papers that you reviewed, individuals who failed to answer questions about their intake of tea and persons without BMI information were excluded. Discuss a situation in which this could introduce bias to your study.&lt;br /&gt;
&lt;br /&gt;
Observing the data from these three different papers that you reviewed, comment on if you believe the relationship between tea consumption and type 2 diabetes to be causal.  &lt;br /&gt;
&lt;br /&gt;
What study might you purpose to do next to prove causality based on the Hill’s criteria?&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Association_(statistics)  Association (statistics) Wikipedia]&lt;br /&gt;
* [http://ftp.cs.ucla.edu/pub/stat_ser/R266-part1.pdf   Causes and Explanations: A Structural-Model Approach-Part I: Causes]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Bradford_Hill_criteria   Bradford Hill Criteria Wikipedia]&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_BiasPrecision&amp;diff=13555</id>
		<title>SMHS BiasPrecision</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_BiasPrecision&amp;diff=13555"/>
		<updated>2014-08-29T16:58:42Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Bias and Precision ==&lt;br /&gt;
&lt;br /&gt;
===Overview:===&lt;br /&gt;
&lt;br /&gt;
The figure below describes the fact that bias should not be the only criterion for estimator efficacy. So, which is more important and how should we choose between an average shot fall somewhere near the target with broad scatter, or trading a small offset for being close most of the time? In order to better understand bias and precision and the trade-off between these two as well as their significance in choosing a better model or test, we are going to present a general introduction to bias and precision and varieties of ways to measure these two important criteria. We are also going to discuss the relationship between these two and how we are going to choose a model based on performance in these two areas.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_BIAS_Precision_Fig_1_cg_07282014.png|400px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Which is more important, a unbiased result or result with higher precision? There is no easy answer. Consider the example of MLE, which is often biased, meaning that the long-run expected value of the estimator differs from the true value with some small bias. Often the bias can be corrected, for example, in the familiar denominator of the unbiased estimator for the standard deviation of a normal density with n-1 as a replacement of n in the denominator.&lt;br /&gt;
Unbiased is often misunderstood as superior. However, this is not always true. In fact, this statement is only true when an unbiased estimator has superior precision too. But biased estimators often have smaller overall error than unbiased ones. So clearly, both criteria must be considered for an estimator to be judged superior to another. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
====Bias====&lt;br /&gt;
Bias is a systematic error that contributes to the difference between the mean of a large number of test results and an accepted reference value. It is the average difference between the estimator and the true value. It describes the bias and the methods utilized to provide corrected test results. If the bias is unknown but the direction or bounds of the bias can be estimated, this information should be included in the bias statement.&lt;br /&gt;
*Internal validity is the ability of a test or experiment to proof what is actually happening with the sample data. Bias can make it appear as if there is an association when there is non (bias away from the null) or mask an association when there is really one (bias towards the null). &lt;br /&gt;
*Types of bias: &lt;br /&gt;
:(1) selection bias: who is selected or retained in a study distorts your estimates the truth; &lt;br /&gt;
:(2) information bias: the quality of your information distorts your estimate of the truth; &lt;br /&gt;
:(3) confounding bias: differences between cases and controls or exposed and unexposed distorts your estimates of the truth. &lt;br /&gt;
*Also, the internal validity of a test may also be violated because of pure chance, the luck of the draw gets you a study sample that is not representative of the larger population. If a test is not internal valid, it is not external valid and cannot be generalized to any one.&lt;br /&gt;
&lt;br /&gt;
====Precision====&lt;br /&gt;
Precision is the closeness of agreement among test results obtained under prescribed conditions. It is the standard deviation of the estimator. It allows potential users of the test method to assess, in general terms, its usefulness in proposed application. It is not intended to contain values that can be duplicated in every user’s laboratory. The statement offers guidelines regarding the type of variability that can be expected among test results when the method is used in one or more reasonable competent laboratories. &lt;br /&gt;
*Two measurements to express precision: &lt;br /&gt;
:(1) repeatability. It addresses variability between independent test results gathered from within a single laboratory (intra-laboratory testing) and tends to produce nominal variability; &lt;br /&gt;
:(2) reproducibility. It addresses variability among single test results gathered from different laboratories (inter-laboratory testing) and tends to produce appreciable variability.&lt;br /&gt;
*One measure of the overall variability is the Mean Square Error (MSE), which is the average of the individual squared errors. $ MSE=(precision)^2 + (bias)^2 $  so the overall variability, in the same units as the parameter being estimated is the Root Mean Square Error, $ RMSE=\sqrt{MSE} $. Often the overall variability of a biased estimator is smaller than that for an unbiased estimator, as illustrated in the figure in the overall section, in which case the biased estimator is superior to the unbiased one. &lt;br /&gt;
&lt;br /&gt;
*Which is better?&lt;br /&gt;
To choose between tests or models based on bias and precision is really a trade-off between these two and the choice should be made based on the objective of the model. An unbiased and precise estimator would of course be the best choice. To choose between an unbiased and imprecise estimator and a biased and precise estimator, we need to be more careful. If it aims to find an estimator, which is on average more close to the true value, then unbiased estimator would weight more than precision. If precision and small variations are our top priority, then the later would be better than the former. However, this is on the basis that the difference is comparable between these two measurements.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
====Application I: Beta Estimate Experiment====&lt;br /&gt;
*[[SOCR_EduMaterials_Activities_BetaEstimateExperiment|  SOCR Activities]]&lt;br /&gt;
**Description: using the properties of Beta distribution, the beta estimate experiment illustrates the effects of bias and precision in parameter estimation. The beta distribution consist of continuous probability distributions defined on an interval differing in the values of the two parameters, a and 1. This experiment is to generate a random sample $ X_1,X_2,…,X_n $ of size n from the beta distribution. On each update, the distribution density if shown in blue and the sample density is shown in red in the graph. Below the graph, the following information is recorded: $ U=\frac {M}{1-M}$ where $M =\frac {X_{1}+X_{2}+⋯+X_{n}}{nV} $ $=\frac{-n} {\ln{X_1}+\ln{X_2}+ ... + \ln{X_n}}.$&lt;br /&gt;
&lt;br /&gt;
: In the second table, the empirical bias and mean square error of each estimator are recorded as the experiment continues to run. Statistics U and V are point estimators, which are functions of the sample data that are used to estimate the unknown population parameter. It is referred to as an estimate of the actual application of the set of data. The parameter a and n can be varied with scroll bars.&lt;br /&gt;
*Goal: to provide an accessible simulation to explore the function of beta distribution and its point estimators of a parameter. In order to estimate a parameter of interest, the point estimator of the parameter must be calculated from a random sample from the population. The variability is then calculated and associated with the parameter of interest.&lt;br /&gt;
*Experiment: the article provides specific steps of doing the Beta Estimate Experiment using the SOCR experiment tool&lt;br /&gt;
*[http://socr.umich.edu/html/exp/ SOCR Experiments]&lt;br /&gt;
*The Beta Estimate Experiment illustrates the bias and precision when sampling from a large population with a varying parameter. The following are examples of using this simulation:&lt;br /&gt;
&lt;br /&gt;
: Students want to know the probability of being randomly selected by the professor in the lecture hall. With the initial value of a, the experiment may represent an equal probability of selecting any student within the lecture hall, but with a large value of a, the experiment shows a bias in which students sitting in the first three rows may have a higher change of being selected.&lt;br /&gt;
&lt;br /&gt;
====Application II: Uniform θ-Estimate Experiment====&lt;br /&gt;
* [[SOCR_EduMaterials_Activities_Uniform_E_EstimateExperiment |SOCR Experiments - Uniform e-Estimate Experiment]]&lt;br /&gt;
*Description: This experiment is used to estimate the value of the natural number using simulation.&lt;br /&gt;
&lt;br /&gt;
The $ θ $-estimate experiment allows us to generate a random sample $ X_1,X_2,…,X_n $ of size $ n$ from the uniform distribution on (0,1). The distribution density is shown in blue in the graph, and on each update, the sample density is shown in red. On each update, the following statistic is recorded:&lt;br /&gt;
$ U=minimum\, n\, for\, which\, the\, sum S=X_1+X_2+⋯+X_n&amp;gt;1. $  That is,$ U=argmin_n (X_1+X_2+⋯+X_n&amp;gt;1) $, note that all $X_i≥0 $ so such n exists.&lt;br /&gt;
&lt;br /&gt;
*Goal: The purpose of the Uniform E-Estimate Experiment is to provide an interactive computer demonstration illustrating a simple idea behind a stochastic simulation for estimating the natural number e. If U = minimum n for which the sum $ S=X_1+X_2+⋯+X_n&amp;gt;1 $, then the expected value of $ U,E(U) $, is approximately equal to the natural number $ e~2.7182.... $&lt;br /&gt;
&lt;br /&gt;
*Application: Estimation of the natural number $ e $ is very important in many science and technology developments and studies. There are deterministic algorithms as well as stochastic methods for estimating the value of $ e $ . Many of these provide up to 10-billion decimal place accuracy for $ e $ .&lt;br /&gt;
&lt;br /&gt;
This experiment demonstrates an easy to understand, demonstrate and utilize protocol for a stochastic estimation of $ e $ . The algorithm may be significantly improved in terms of both speed of convergence and accuracy, relative to sample size $ (n) $.However, the emphasis in this experiment is simplicity and simulation of a transcendental number in real-time using basic tools (sampling from uniform distribution).&lt;br /&gt;
&lt;br /&gt;
*[http://link.springer.com/article/10.1023/A:1009982611386 This article] compared bias and precision statistics in regression analysis when measurement techniques are compared, it also compared the inconsistencies occurred in reporting the results of this form of analysis in cardiac output measurement. It performed a MEDLINE search dating from 1986 and surveyed studies comparing techniques of cardiac output measurement using bias and precision statistics. This paper constructed an error-gram from the percentage error in the test and reference methods and used the error-gram to determine acceptable limits of agreement between methods. It came to the conclusion that when using bias and precision statistics, cardiac output, bias, limits of agreement, and percentage error should be presented and argued that acceptance of a new technique should rely on limits of agreement of up to ± 30% using current reference methods.&lt;br /&gt;
&lt;br /&gt;
*[http://aje.oxfordjournals.org/content/150/10/1117.short This article] reported on a randomized controlled trial to investigate the effects of variations in the orientation and type of scale on bias and precision in cross-sectional and longitudinal analyses. It analyzed differences between scales by comparing variances (Levene’s test) and means (variance-covariance analysis for repeated measures) and showed scale characteristics to influence the proportion of zero and low values (floor effect), but not mean scores. It argued in conclusion that the characteristic of VAS seem to be important in cross-sectional studies, particularly when symptoms of low or high intensity are being measured and that researchers should try to reach a consensus on what type of VAS to use if studies are to be compared.&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
*[http://www.distributome.org/V3/calc/StudentCalculator.html Student Calculator]&lt;br /&gt;
*[http://socr.umich.edu/Applets/Normal_T_Chi2_F_Tables.html Normal T Chi-Squared F Tables]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
Selection bias can occur in a case-control study when controls are _______ to be included in the study if they have been exposed.&lt;br /&gt;
:(a) more likely&lt;br /&gt;
:(b) less likely&lt;br /&gt;
:(c) equally likely&lt;br /&gt;
:(d) both A and B&lt;br /&gt;
:(e) all of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which of the following are ways to minimize selection bias in the design of a study?&lt;br /&gt;
:(a) Utilize population lists that are as inclusive as possible&lt;br /&gt;
:(b) obtain only convenient participant records&lt;br /&gt;
:(c) use separate criteria for the selection of cases and controls&lt;br /&gt;
:(d) all of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Parents of children who were born with birth defects may be more likely to remember any drugs or exposures that occurred during pregnancy than parents of children born without birth defects. This is an example of what type of bias?&lt;br /&gt;
:(a) interviewer bias&lt;br /&gt;
:(b) recall bias&lt;br /&gt;
:(c) loss to follow up&lt;br /&gt;
:(d) non-differential misclassification&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The true odds ratio of a study was calculated from the table below to be 2.33.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:45%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  '''TRUTH''' || ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| || Case|| Control || Total&lt;br /&gt;
|-&lt;br /&gt;
| Exposed ||25 || 15 || 40 &lt;br /&gt;
|-&lt;br /&gt;
|Unexposed || 25 ||35 ||60&lt;br /&gt;
|-&lt;br /&gt;
|Total || 50 || 50 ||100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
According to the table below, what direction is the bias in the observed results below? (Hint: Calculate OR)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:45%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  '''Observed''' || ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| || Case|| Control || Total&lt;br /&gt;
|-&lt;br /&gt;
| Exposed ||42 || 25 || 67 &lt;br /&gt;
|-&lt;br /&gt;
|Unexposed || 8 ||25 || 33&lt;br /&gt;
|-&lt;br /&gt;
|Total || 50 || 50 ||100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
:(a) bias away from the null&lt;br /&gt;
:(b) bias towards the null&lt;br /&gt;
:(c) unbiased&lt;br /&gt;
:(d) cannot be determined from the information above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Individuals who are exposed are more likely to be lost to follow-up and have their outcome be unobserved. This is an example of selection bias.&lt;br /&gt;
:(a) True&lt;br /&gt;
:(b) False&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prove that sample variance is an unbiased estimator of the population variance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
*[http://www.astm.org/ILS/precisionbias.html  Precision and Bias] &lt;br /&gt;
*[http://www.astm.org/SNEWS/MARCH_2000/P&amp;amp;B_mar00.html  Facts vs. Fiction: The Truth About Precision and Bias / Pat Picariello]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_BiasPrecision}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_BiasPrecision&amp;diff=13554</id>
		<title>SMHS BiasPrecision</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_BiasPrecision&amp;diff=13554"/>
		<updated>2014-08-29T16:58:23Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Bias and Precision ==&lt;br /&gt;
&lt;br /&gt;
===Overview:===&lt;br /&gt;
&lt;br /&gt;
The figure below describes the fact that bias should not be the only criterion for estimator efficacy. So, which is more important and how should we choose between an average shot fall somewhere near the target with broad scatter, or trading a small offset for being close most of the time? In order to better understand bias and precision and the trade-off between these two as well as their significance in choosing a better model or test, we are going to present a general introduction to bias and precision and varieties of ways to measure these two important criteria. We are also going to discuss the relationship between these two and how we are going to choose a model based on performance in these two areas.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_BIAS_Precision_Fig_1_cg_07282014.png|400px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Which is more important, a unbiased result or result with higher precision? There is no easy answer. Consider the example of MLE, which is often biased, meaning that the long-run expected value of the estimator differs from the true value with some small bias. Often the bias can be corrected, for example, in the familiar denominator of the unbiased estimator for the standard deviation of a normal density with n-1 as a replacement of n in the denominator.&lt;br /&gt;
Unbiased is often misunderstood as superior. However, this is not always true. In fact, this statement is only true when an unbiased estimator has superior precision too. But biased estimators often have smaller overall error than unbiased ones. So clearly, both criteria must be considered for an estimator to be judged superior to another. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
====Bias====&lt;br /&gt;
Bias is a systematic error that contributes to the difference between the mean of a large number of test results and an accepted reference value. It is the average difference between the estimator and the true value. It describes the bias and the methods utilized to provide corrected test results. If the bias is unknown but the direction or bounds of the bias can be estimated, this information should be included in the bias statement.&lt;br /&gt;
*Internal validity is the ability of a test or experiment to proof what is actually happening with the sample data. Bias can make it appear as if there is an association when there is non (bias away from the null) or mask an association when there is really one (bias towards the null). &lt;br /&gt;
*Types of bias: &lt;br /&gt;
:(1) selection bias: who is selected or retained in a study distorts your estimates the truth; &lt;br /&gt;
:(2) information bias: the quality of your information distorts your estimate of the truth; &lt;br /&gt;
:(3) confounding bias: differences between cases and controls or exposed and unexposed distorts your estimates of the truth. &lt;br /&gt;
*Also, the internal validity of a test may also be violated because of pure chance, the luck of the draw gets you a study sample that is not representative of the larger population. If a test is not internal valid, it is not external valid and cannot be generalized to any one.&lt;br /&gt;
&lt;br /&gt;
====Precision====&lt;br /&gt;
Precision is the closeness of agreement among test results obtained under prescribed conditions. It is the standard deviation of the estimator. It allows potential users of the test method to assess, in general terms, its usefulness in proposed application. It is not intended to contain values that can be duplicated in every user’s laboratory. The statement offers guidelines regarding the type of variability that can be expected among test results when the method is used in one or more reasonable competent laboratories. &lt;br /&gt;
*Two measurements to express precision: &lt;br /&gt;
:(1) repeatability. It addresses variability between independent test results gathered from within a single laboratory (intra-laboratory testing) and tends to produce nominal variability; &lt;br /&gt;
:(2) reproducibility. It addresses variability among single test results gathered from different laboratories (inter-laboratory testing) and tends to produce appreciable variability.&lt;br /&gt;
*One measure of the overall variability is the Mean Square Error (MSE), which is the average of the individual squared errors. $ MSE=(precision)^2 + (bias)^2 $  so the overall variability, in the same units as the parameter being estimated is the Root Mean Square Error, $ RMSE=\sqrt{MSE} $. Often the overall variability of a biased estimator is smaller than that for an unbiased estimator, as illustrated in the figure in the overall section, in which case the biased estimator is superior to the unbiased one. &lt;br /&gt;
&lt;br /&gt;
*Which is better?&lt;br /&gt;
To choose between tests or models based on bias and precision is really a trade-off between these two and the choice should be made based on the objective of the model. An unbiased and precise estimator would of course be the best choice. To choose between an unbiased and imprecise estimator and a biased and precise estimator, we need to be more careful. If it aims to find an estimator, which is on average more close to the true value, then unbiased estimator would weight more than precision. If precision and small variations are our top priority, then the later would be better than the former. However, this is on the basis that the difference is comparable between these two measurements.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
&lt;br /&gt;
====Application I: Beta Estimate Experiment====&lt;br /&gt;
*[[SOCR_EduMaterials_Activities_BetaEstimateExperiment|  SOCR Activities]]&lt;br /&gt;
**Description: using the properties of Beta distribution, the beta estimate experiment illustrates the effects of bias and precision in parameter estimation. The beta distribution consist of continuous probability distributions defined on an interval differing in the values of the two parameters, a and 1. This experiment is to generate a random sample $ X_1,X_2,…,X_n $ of size n from the beta distribution. On each update, the distribution density if shown in blue and the sample density is shown in red in the graph. Below the graph, the following information is recorded: $ U=\frac {M}{1-M}$ where $M =\frac {X_{1}+X_{2}+⋯+X_{n}}{nV} $ $=\frac{-n} {\ln{X_1}+\ln{X_2}+ ... + \ln{X_n}}.$&lt;br /&gt;
&lt;br /&gt;
: In the second table, the empirical bias and mean square error of each estimator are recorded as the experiment continues to run. Statistics U and V are point estimators, which are functions of the sample data that are used to estimate the unknown population parameter. It is referred to as an estimate of the actual application of the set of data. The parameter a and n can be varied with scroll bars.&lt;br /&gt;
*Goal: to provide an accessible simulation to explore the function of beta distribution and its point estimators of a parameter. In order to estimate a parameter of interest, the point estimator of the parameter must be calculated from a random sample from the population. The variability is then calculated and associated with the parameter of interest.&lt;br /&gt;
*Experiment: the article provides specific steps of doing the Beta Estimate Experiment using the SOCR experiment tool&lt;br /&gt;
*[http://socr.umich.edu/html/exp/ SOCR Experiments]&lt;br /&gt;
*The Beta Estimate Experiment illustrates the bias and precision when sampling from a large population with a varying parameter. The following are examples of using this simulation:&lt;br /&gt;
&lt;br /&gt;
: Students want to know the probability of being randomly selected by the professor in the lecture hall. With the initial value of a, the experiment may represent an equal probability of selecting any student within the lecture hall, but with a large value of a, the experiment shows a bias in which students sitting in the first three rows may have a higher change of being selected.&lt;br /&gt;
&lt;br /&gt;
====Application II: Uniform θ-Estimate Experiment====&lt;br /&gt;
* [[SOCR_EduMaterials_Activities_Uniform_E_EstimateExperiment |SOCR Experiments - Uniform e-Estimate Experiment]]&lt;br /&gt;
*Description: This experiment is used to estimate the value of the natural number using simulation.&lt;br /&gt;
&lt;br /&gt;
The $ θ $-estimate experiment allows us to generate a random sample $ X_1,X_2,…,X_n $ of size $ n$ from the uniform distribution on (0,1). The distribution density is shown in blue in the graph, and on each update, the sample density is shown in red. On each update, the following statistic is recorded:&lt;br /&gt;
$ U=minimum\, n\, for\, which\, the\, sum S=X_1+X_2+⋯+X_n&amp;gt;1. $  That is,$ U=argmin_n (X_1+X_2+⋯+X_n&amp;gt;1) $, note that all $X_i≥0 $ so such n exists.&lt;br /&gt;
&lt;br /&gt;
*Goal: The purpose of the Uniform E-Estimate Experiment is to provide an interactive computer demonstration illustrating a simple idea behind a stochastic simulation for estimating the natural number e. If U = minimum n for which the sum $ S=X_1+X_2+⋯+X_n&amp;gt;1 $, then the expected value of $ U,E(U) $, is approximately equal to the natural number $ e~2.7182.... $&lt;br /&gt;
&lt;br /&gt;
*Application: Estimation of the natural number $ e $ is very important in many science and technology developments and studies. There are deterministic algorithms as well as stochastic methods for estimating the value of $ e $ . Many of these provide up to 10-billion decimal place accuracy for $ e $ .&lt;br /&gt;
&lt;br /&gt;
This experiment demonstrates an easy to understand, demonstrate and utilize protocol for a stochastic estimation of $ e $ . The algorithm may be significantly improved in terms of both speed of convergence and accuracy, relative to sample size $ (n) $.However, the emphasis in this experiment is simplicity and simulation of a transcendental number in real-time using basic tools (sampling from uniform distribution).&lt;br /&gt;
&lt;br /&gt;
*[http://link.springer.com/article/10.1023/A:1009982611386 This article] compared bias and precision statistics in regression analysis when measurement techniques are compared, it also compared the inconsistencies occurred in reporting the results of this form of analysis in cardiac output measurement. It performed a MEDLINE search dating from 1986 and surveyed studies comparing techniques of cardiac output measurement using bias and precision statistics. This paper constructed an error-gram from the percentage error in the test and reference methods and used the error-gram to determine acceptable limits of agreement between methods. It came to the conclusion that when using bias and precision statistics, cardiac output, bias, limits of agreement, and percentage error should be presented and argued that acceptance of a new technique should rely on limits of agreement of up to ± 30% using current reference methods.&lt;br /&gt;
&lt;br /&gt;
*[http://aje.oxfordjournals.org/content/150/10/1117.short This article] reported on a randomized controlled trial to investigate the effects of variations in the orientation and type of scale on bias and precision in cross-sectional and longitudinal analyses. It analyzed differences between scales by comparing variances (Levene’s test) and means (variance-covariance analysis for repeated measures) and showed scale characteristics to influence the proportion of zero and low values (floor effect), but not mean scores. It argued in conclusion that the characteristic of VAS seem to be important in cross-sectional studies, particularly when symptoms of low or high intensity are being measured and that researchers should try to reach a consensus on what type of VAS to use if studies are to be compared.&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
*[http://www.distributome.org/V3/calc/StudentCalculator.html Student Calculator]&lt;br /&gt;
*[http://socr.umich.edu/Applets/Normal_T_Chi2_F_Tables.html Normal T Chi-Squared F Tables]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
Selection bias can occur in a case-control study when controls are _______ to be included in the study if they have been exposed.&lt;br /&gt;
:(a) more likely&lt;br /&gt;
:(b) less likely&lt;br /&gt;
:(c) equally likely&lt;br /&gt;
:(d) both A and B&lt;br /&gt;
:(e) all of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which of the following are ways to minimize selection bias in the design of a study?&lt;br /&gt;
:(a) Utilize population lists that are as inclusive as possible&lt;br /&gt;
:(b) obtain only convenient participant records&lt;br /&gt;
:(c) use separate criteria for the selection of cases and controls&lt;br /&gt;
:(d) all of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Parents of children who were born with birth defects may be more likely to remember any drugs or exposures that occurred during pregnancy than parents of children born without birth defects. This is an example of what type of bias?&lt;br /&gt;
:(a) interviewer bias&lt;br /&gt;
:(b) recall bias&lt;br /&gt;
:(c) loss to follow up&lt;br /&gt;
:(d) non-differential misclassification&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The true odds ratio of a study was calculated from the table below to be 2.33.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:45%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  '''TRUTH''' || ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| || Case|| Control || Total&lt;br /&gt;
|-&lt;br /&gt;
| Exposed ||25 || 15 || 40 &lt;br /&gt;
|-&lt;br /&gt;
|Unexposed || 25 ||35 ||60&lt;br /&gt;
|-&lt;br /&gt;
|Total || 50 || 50 ||100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
According to the table below, what direction is the bias in the observed results below? (Hint: Calculate OR)&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center; width:45%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  '''Observed''' || ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| || Case|| Control || Total&lt;br /&gt;
|-&lt;br /&gt;
| Exposed ||42 || 25 || 67 &lt;br /&gt;
|-&lt;br /&gt;
|Unexposed || 8 ||25 || 33&lt;br /&gt;
|-&lt;br /&gt;
|Total || 50 || 50 ||100&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
:(a) bias away from the null&lt;br /&gt;
:(b) bias towards the null&lt;br /&gt;
:(c) unbiased&lt;br /&gt;
:(d) cannot be determined from the information above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Individuals who are exposed are more likely to be lost to follow-up and have their outcome be unobserved. This is an example of selection bias.&lt;br /&gt;
:(a) True&lt;br /&gt;
:(b) False&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prove that sample variance is an unbiased estimator of the population variance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
*[http://www.astm.org/ILS/precisionbias.html  Precision and Bias] &lt;br /&gt;
*[http://www.astm.org/SNEWS/MARCH_2000/P&amp;amp;B_mar00.html  Facts vs. Fiction: The Truth About Precision and Bias, by Pat Picariello]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_BiasPrecision}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=13553</id>
		<title>SMHS DataManagement</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=13553"/>
		<updated>2014-08-29T16:57:17Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* 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;
'''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;
'''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 |500px]]&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|500px]]&lt;br /&gt;
&lt;br /&gt;
'''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;
'''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;
'''DBs:'''&lt;br /&gt;
&lt;br /&gt;
A 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;
&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. &lt;br /&gt;
*[http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#IDA Building a Workflow User-Guide]&lt;br /&gt;
*[https://ida.loni.usc.edu/login.jsp This article] 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;
'''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=\begin{bmatrix}&lt;br /&gt;
        2 &amp;amp;  3 &amp;amp;  0\\ &lt;br /&gt;
        6 &amp;amp;  4 &amp;amp;  5\\              &lt;br /&gt;
        5 &amp;amp;  3 &amp;amp;  1\\  &lt;br /&gt;
      \end{bmatrix}$&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;
'''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;
&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;
'''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;
*[http://en.wikibooks.org/wiki/OpenClinica_User_Manual This article] 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;
*[http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#XNAT This article] 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;
*[http://onlinepubs.trb.org/onlinepubs/nchrp/cd-22/manual/v2chapter2.pdf This article] 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;
*[http://www.sciencedirect.com/science/article/pii/S0167819102000947 This article] 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;
*[http://cran.r-project.org/doc/manuals/r-devel/R-data.html Data Import/Export in R]&lt;br /&gt;
*[http://cran.r-project.org/web/packages/rmongodb/ Package ‘rmongodb’ in R (provides an interface to the NoSQL MongoDB database)] &lt;br /&gt;
&lt;br /&gt;
===Problems===&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;
 &lt;br /&gt;
 &amp;gt; p &amp;lt;- get_points(dsd, n=5)&lt;br /&gt;
 &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;
 &lt;br /&gt;
 &amp;gt; p &amp;lt;- get_points(dsd, n=100, assignment=TRUE)&lt;br /&gt;
 &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;
 &lt;br /&gt;
 &amp;gt; plot(dsd, n=500)&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;center&amp;gt; [[File:DataManagementFig4.png]] &amp;lt;/center&amp;gt;&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;
**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;
 &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;
 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;
     &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;
*[http://en.wikipedia.org/wiki/Table_(information)  Table (Information) Wikipedia] &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Stream_(computing)  Stream (Computing) Wikipedia] &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Cloud_storage  Cloud Storage Wikipedia]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_warehouse  Data Warehouse Wikipedia]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Database  Database Wikipedia]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Array_data_structure  Array Data Structure Wikipedia]  &lt;br /&gt;
*[http://ori.hhs.gov/education/products/n_illinois_u/datamanagement/dhtopic.html  Data Handling, Responsible Conduct in Data Management]&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=13552</id>
		<title>SMHS DataManagement</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_DataManagement&amp;diff=13552"/>
		<updated>2014-08-29T16:56:59Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* 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;
'''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;
'''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 |500px]]&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|500px]]&lt;br /&gt;
&lt;br /&gt;
'''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;
'''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;
'''DBs:'''&lt;br /&gt;
&lt;br /&gt;
A 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;
&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. &lt;br /&gt;
*[http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#IDA Building a Workflow User-Guide]&lt;br /&gt;
*[https://ida.loni.usc.edu/login.jsp This article] 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;
'''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=\begin{bmatrix}&lt;br /&gt;
        2 &amp;amp;  3 &amp;amp;  0\\ &lt;br /&gt;
        6 &amp;amp;  4 &amp;amp;  5\\              &lt;br /&gt;
        5 &amp;amp;  3 &amp;amp;  1\\  &lt;br /&gt;
      \end{bmatrix}$&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;
'''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;
&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;
'''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;
*[http://en.wikibooks.org/wiki/OpenClinica_User_Manual This article] 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;
*[http://pipeline.loni.usc.edu/learn/user-guide/building-a-workflow/#XNAT This article] 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;
*[http://onlinepubs.trb.org/onlinepubs/nchrp/cd-22/manual/v2chapter2.pdf This article] 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;
*[http://www.sciencedirect.com/science/article/pii/S0167819102000947 This article] 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;
*[http://cran.r-project.org/doc/manuals/r-devel/R-data.html Data Import/Export in R]&lt;br /&gt;
*[http://cran.r-project.org/web/packages/rmongodb/ Package ‘rmongodb’ in R (provides an interface to the NoSQL MongoDB database)] &lt;br /&gt;
&lt;br /&gt;
===Problems===&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;
 &lt;br /&gt;
 &amp;gt; p &amp;lt;- get_points(dsd, n=5)&lt;br /&gt;
 &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;
 &lt;br /&gt;
 &amp;gt; p &amp;lt;- get_points(dsd, n=100, assignment=TRUE)&lt;br /&gt;
 &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;
 &lt;br /&gt;
 &amp;gt; plot(dsd, n=500)&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;center&amp;gt; [[File:DataManagementFig4.png]] &amp;lt;/center&amp;gt;&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;
**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;
 &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;
 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;
     &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;
*[http://en.wikipedia.org/wiki/Table_(information)  Table (Information) Wikipedia] &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Stream_(computing)  Stream (Computing) Wikipedia] &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Cloud_storage  Cloud Storage Wikipedia]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_warehouse  Data Warehouse Wikipedia]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Database  Database Wikipedia]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Array_data_structure  Array Data Structure Wikipedia]  &lt;br /&gt;
*[http://ori.hhs.gov/education/products/n_illinois_u/datamanagement/dhtopic.html  Data Handling, Responsible Conduct in Data Management, online resource]&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_PowerSensitivitySpecificity&amp;diff=13551</id>
		<title>SMHS PowerSensitivitySpecificity</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_PowerSensitivitySpecificity&amp;diff=13551"/>
		<updated>2014-08-29T16:54:58Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Statistical Power, Sample-Size, Sensitivity and Specificity ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview:===&lt;br /&gt;
&lt;br /&gt;
In the statistics, we have many ways to value and choose a test or model. In this lecture, we are going to introduce some commonly used methods, which describes the characteristics of a test: power, sample size, effect size, sensitivity and specificity. Those measures and characteristics of a test would help us in our statistical test or experiments. This lecture will present introduction to the background knowledge of those concepts and illustrate their power and application through examples.&lt;br /&gt;
&lt;br /&gt;
===Motivation:===&lt;br /&gt;
&lt;br /&gt;
Experiments, models and tests are significant fundamentals to the filed of statistics and we all experienced the question of how to set up the right test and how to choose a better model. We are interested in studying on some of the most commonly used methods including power, effect size, sensitivity and specificity, which will greatly help us in understanding and choosing the model. So, what would be a reasonable sample size to reach a balance in the trade off between cost and efficiency? What would be the probability that the test will reject a false null hypothesis? What is the test’s ability to correctly accept a true null hypothesis or reject a false alternative hypothesis? &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
====Type I Error, Type II Error and Power====&lt;br /&gt;
*Type I error: the false positive (Type I) error of rejecting the null hypothesis given that it is actually true; e.g., the purses are detected to containing the radioactive material while they actually do not.&lt;br /&gt;
*Type II error:  the false negative (Type II) error of failing to reject the null hypothesis given that the alternative hypothesis is actually true; e.g., the purses are detected to not containing the radioactive material while they actually do.&lt;br /&gt;
*Statistical power: the probability that the test will reject a false null hypothesis (that it will not make a Type II error). When power increases, the chances of a Type II error decrease. &lt;br /&gt;
*Test specificity (ability of a test to correctly accept the null hypothesis $ =\frac{d}{b+d}$.&lt;br /&gt;
*Test sensitivity (ability of a test to correctly reject the alternative hypothesis $=\frac{a}{a+c}$.&lt;br /&gt;
&lt;br /&gt;
*The table below gives an example of calculating specificity, sensitivity, False positive rate $\alpha$, False Negative Rate $\beta$ and power given the information of ''TN'' and ''FN''.&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: 25%&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;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specificity $=\frac{TN}{TN + FP}$, Sensitivity $=\dfrac{TP}{TP+FN}$, $\alpha=\dfrac {FP}{FP+TN}$, $\beta=\frac{FN}{FN+TP}$, power$=1-\beta.$&lt;br /&gt;
&lt;br /&gt;
====Sample size==== &lt;br /&gt;
The number of observations or replicates included in a statistical sample. It is an important feature of any empirical study, which aims to make inference about a population. In complicated studies, there may be several different sample sizes involved in the study: for example, in a survey sampling involving stratified sampling, there may be different sizes of samples for each population.&lt;br /&gt;
&lt;br /&gt;
*Factors influence sample size: expense of data collection; need to have sufficient statistical power.&lt;br /&gt;
&lt;br /&gt;
*Ways to choose sample sizes: (1) expedience. Consider a simple experiment where the sample data is readily available or convenient to collect, yet the size of sample is crucial in avoiding wide confidence intervals or risks of errors in statistical hypothesis testing. (2) using a target variance for an estimate to be derived from the sample eventually obtained; (3) using a target for the power of a statistical test to be applied once the sample is collected.&lt;br /&gt;
&lt;br /&gt;
*Intuitively, larger sample size generally lead to increased precision in estimating unknown parameters. However, in some situations, the increase in accuracy for larger sample size is minimal, or even doesn’t exist. This can result from the presence of systematic error or strong dependence in the data, or if the data follow a heavy-tailed distribution. Sample size is judged based on the quality of the resulting estimates. For example, if a proportion is being estimated, one may wish to have the 95% confidence interval be less than 0.06 units wide. Alternatively, sample size may be assessed based on the power of a hypothesis test.&lt;br /&gt;
 &lt;br /&gt;
*Choose the sample size based on our expectation of other measures.&lt;br /&gt;
*Suppose the simple experiment of flipping a coin, where estimator of a proportion is $\hat{p}=\frac{X}{n}$, where $X$ is the number of heads out of n experiments. The estimator follows a binomial distribution and when n is sufficiently large, the distribution will be closely approximated by a normal distribution. With approximation, it can be shown that around $95\%$of this distribution’s probability lies within 2 standard deviations of the mean. Use Wald method for the binomial distribution, an interval of the form $(\hat{p} -2\sqrt{\frac{0.25}{n}}, \hat{p} + 2\sqrt{\frac{.25}{n}}) $  will form a 95% CI for the true proportion. If this interval needs to be no more than $W$ units wide, then we have $4\sqrt{\frac{0.25}{n}}=W$, solved for $n$, we have $ n=\frac{4}{W^2}=\frac{1}{B^2}$  where $B$ is the error bound on the estimate, i.e., the estimate is usually given as within $\pm B$. Hence, if $B=10$, then $n=100$; and if $B=0.05$ (5%), then $n=400$.&lt;br /&gt;
&lt;br /&gt;
*A proportion is a special case of mean. When estimating the population mean using an independent and identically distributed sample of size n, where each data has variance $ \sigma ^{2}$, the standard error of the sample mean is $\frac{\sigma}{\sqrt{n}}$. With [[SMHS_CLT_LLN|CLT]], the 95% CI is $(\bar x - \frac {2\sigma}{\sqrt n},\bar x +\frac{2\sigma}{\sqrt n})$. If we wish to have a confidence interval with W units in width, then solve for n, we have $n=\frac{16\sigma^2}{W^2}$.&lt;br /&gt;
&lt;br /&gt;
*Sample size for hypothesis tests: Let $X_i,i=1,2,…,n$ be independent observations taken from a normal distribution with unknown mean μ and known variance $\sigma^2$. The null hypothesis vs. alternative hypothesis: $H_0:\mu=0$ vs.$H_a:\mu=\mu^*$. If we wish to (1) reject $H_0$ with a probability of at least $1-\beta$ when $H_a$ is true, (2) reject $H_0$ with probability $\alpha$ when $H_0$ is true, we need: $P(\bar x &amp;gt;\frac{z_{\alpha}\sigma}{\sqrt n}|H_0 \text{ true})=\alpha $, and so reject $H_0$ if our sample average is more than $\frac{z_\alpha\sigma} {\sqrt n}$ is a decision rule which satisfies (2). $z_\alpha$ is the upper percentage point of the standard normal distribution. If we wish this to happen with a probability $1-\beta$ when $H_a$ is true. In this case, our sample average will come from a normal distribution with mean $μ^*$. &lt;br /&gt;
&lt;br /&gt;
: Therefore, require  $P (\bar x &amp;gt;\frac {z_{\alpha}\sigma}{\sqrt n}|H_0 \text{ true})\le 1-\beta $. Solve for n, we have $n \ge ( \frac{z_{\alpha}-\Phi^{-1}(1-\beta)}{\frac{\mu^{*}}{\sigma}})^{2}$, where $\Phi$ is the [[SMHS_ProbabilityDistributions#Normal_distribution|normal cumulative distribution function]].&lt;br /&gt;
&lt;br /&gt;
====Effect size====&lt;br /&gt;
Effect size is a descriptive statistic that conveys the estimated magnitude of a relationship without making any statement about whether the apparent relationship in the data reflects a true relationship in the population. It complements inferential statistics such as p-value and plays an important role in statistical studies. The term effect size can refer to a statistic calculated from a sample of data, or to a parameter of a hypothetical statistical population.  These effect sizes estimate the amount of the variance within an experiment that is &amp;quot;explained&amp;quot; or &amp;quot;accounted for&amp;quot; by the experiment's model.&lt;br /&gt;
&lt;br /&gt;
====Other common measures====&lt;br /&gt;
*Pearson $r$ (correlation): an effect size when paired quantitative data are available, for instance if one were studying the relationship between birth weight and longevity. It varies from -1 to 1, 1 indicating a perfect negative linear relation, 1 indicating a perfect positive linear relation and 0 indicating no linear relation between two variables.&lt;br /&gt;
&lt;br /&gt;
*Correlation coefficient, $ r^2 $: a coefficient determination calculated as the square of Pearson correlation r. It varies from 0 to 1 and is always nonnegative. For example, if $r=0.2$ then $r^2=0.04$ meaning that $4\%$ of the variance of either variable is shared with the other variable.&lt;br /&gt;
&lt;br /&gt;
*Eta-squared, $ \eta^2 $, describes the ratio of variance explained in the dependent variable by a predictor while controlling for other predictors, making it analogous to the  $ r^2 $. It is a biased estimator of the variance explained by the model in the population. $ \eta^2=\frac{SS_{treatment}} {SS_{total}} $ .&lt;br /&gt;
&lt;br /&gt;
*Omega-squared, $\omega^2$: a less biased estimator of the variance explained in the population. $\omega^2 =/frac{SS_{treatment}-df_{treatment}*MS_{error}}{SS_{total}+MS_error}$. Given it is less biased, $\omega^2$ is preferable to $\eta^2$, however, it can be more inconvenient to calculate for complex analyses. &lt;br /&gt;
&lt;br /&gt;
* Cohen’s $ f^2 $: one of several effect size measures to use in the context of an F test for ANOVA or multiple regression. Its amount of bias depends on the bias of its underlying measurement of variance explained. $f^2=\frac{R^2}{1-R^2}$,$R^2 $ is the squared multiple correlation.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
*[http://www.sciencedirect.com/science/article/pii/0197245681900015 This article]titled Introduction To Sample Size Determination And Power Analysis For Clinical Trials reviewed the importance of sample size in clinical trials and presented a general method from which specific equations are derived for sample size determination and analysis of power for a wide variety of statistical procedures. This paper discussed the method in details with illustration in relation to the t test, test for proportions, test for survival time and tests for correlations that commonly occurred in clinical trials. &lt;br /&gt;
&lt;br /&gt;
*[http://http://onlinelibrary.wiley.com/doi/10.1111/j.1469-185X.2007.00027.x/pdf This article] presents measures of the magnitude of effects (i.e., effect size statistics) and their confidence intervals in all biological journals. It illustrated the combined use of an effect size and its confidence interval, which enables one to assess the relationships within data more effectively than the use of p values, regardless of statistical significance. It focused on standardized effect size statistics and extensively discussed two dimensionless classes of effect size statistics: d statistics (standardized mean difference) and r statistics (correlation coefficient), because these can be calculated from almost all study designs and also because their calculations are essential for meta-analysis. The paper provided potential solutions for four main technical problems researchers may encounter when calculating effect size and CIs: (1) when covariates exist, (2) when bias in estimating effect size is possible, (3) when data have non-normal error structure and/or variances, and (4) when data are non-independent.&lt;br /&gt;
&lt;br /&gt;
*[http://www.sciencedirect.com/science/article/pii/019724569090005M This article]reviewed methods of sample size and power calculation for most commonly study designs. It presents two generic formulae for sample size and power calculation, from which the commonly used methods are derived. It also illustrates the calculation with a computer program, which can be used for studies with dichotomous, continuous, or survival response measures.&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
*[http://www.distributome.org/V3/calc/StudentCalculator.html Student Calculator]&lt;br /&gt;
*[http://socr.umich.edu/Applets/Normal_T_Chi2_F_Tables.html Normal T Chi-Squared F Tables]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
Other things being equal, which of the following actions will reduce the power of a hypothesis test?&lt;br /&gt;
&lt;br /&gt;
I. Increasing sample size.  II. Increasing significance level.  III. Increasing beta, the probability of a Type II error.&lt;br /&gt;
&lt;br /&gt;
:(A) I only &lt;br /&gt;
:(B) II only  &lt;br /&gt;
:(C) III only&lt;br /&gt;
:(D) All of the above&lt;br /&gt;
:(E) None of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose a researcher conducts an experiment to test a hypothesis. If she doubles her sample size, which of the following will increase?&lt;br /&gt;
&lt;br /&gt;
I. The power of the hypothesis test.  II. The effect size of the hypothesis test.  III. The probability of making a Type II error.&lt;br /&gt;
&lt;br /&gt;
:(A) I only&lt;br /&gt;
:(B) II only &lt;br /&gt;
:(C) III only&lt;br /&gt;
:(D) All of the above&lt;br /&gt;
:(E) None of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose we have the following measurements taken. Calculate the corresponding power, specificity and sensitivity.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center;width: 25%&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$)''' ||  0.983 || 0.0025&lt;br /&gt;
|-&lt;br /&gt;
| '''Positive (reject $H_0$)''' || 0.0085 ||0.0055&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose we are running a test on a simple experiment where the population standard deviation is $ 0.06$. $H_0: \mu=0$ vs. $H_a: \mu=0.5$. With type I error of 5%, what would be a reasonable sample size if we want to achieve at least 98% power.&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
*[http://wiki.stat.ucla.edu/socr/index.php/AP_Statistics_Curriculum_2007_Hypothesis_Basics  SOCR]&lt;br /&gt;
 &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Sample_size_determination  Sample Size Determination Wikipedia]&lt;br /&gt;
 &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Effect_size  Effect Size Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_PowerSensitivitySpecificity}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_HypothesisTesting&amp;diff=13550</id>
		<title>SMHS HypothesisTesting</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_HypothesisTesting&amp;diff=13550"/>
		<updated>2014-08-29T16:53:58Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Hypothesis Testing ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Hypothesis testing is a statistical technique for decision-making regarding populations or processes based on experimental data. It quantitatively answers the probability that chance along might be responsible for the observed discrepancies between a theoretical model and the empirical observations. In this class, we are going to introduce the fundamental terminologies we are going to discuss in Hypothesis Testing include null and alternative hypotheses, Type I and Type II errors, sensitivity, specificity and statistical power and we are going to discuss about hypothesis testing of mean, proportion and mean under various assumptions and hope to prepare students with enough background information of Hypothesis testing in real data analysis.&lt;br /&gt;
&lt;br /&gt;
Important parts included in Hypothesis testing: &lt;br /&gt;
*decision (significance or no significance)&lt;br /&gt;
*parameter of interest; variable of interest&lt;br /&gt;
*population under study; p-value.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In statistical data analysis, we are often encountered with the problem of making statistical decisions about populations or processes based on experimental data. And hypothesis testing will be the direct answer to questions like how well the findings fit he possibility that the chance along might be responsible for the observed discrepancy between theoretical model and empirical observations or what is the likelihood of the observed summary statistics if the data did come from the distribution specified by the null hypothesis? And what if it follows the distribution stated in the alternative hypothesis? In fact, one use of hypothesis testing is to decide whether experimental results contain enough information to cast doubt on conventional wisdom. &lt;br /&gt;
Consider an example of testing whether the new production purse from a factory contains radioactive material. The null hypothesis is that there is no radioactive material in the purse and that all measured counts are due to ambient radioactivity typical of the surrounding air and harmless objects in the purse. We can then calculate how likely it is that the null hypothesis produce 10 count per minute. If it is likely, for example if the null hypothesis predicts on average 9 counts per minute, we say the purse is compatible with the null hypothesis, on the other hand, if the null hypothesis predicts for example 3 count per minute, then the purse is not compatible with the null hypothesis and there must be other factors responsible to produce the increased radioactive counts.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&lt;br /&gt;
====Fundamentals of Hypothesis testing (statistical significance testing)====&lt;br /&gt;
Null and alternative hypothesis: a null hypothesis a thesis set up to be nullified or refuted in order to support an Alternate (research) Hypothesis. The null hypothesis is presumed true until statistical evidence, in the form of a hypothesis test, indicates otherwise. In science, the null hypothesis is used to test differences between treatment and control groups, and the assumption at the outset of the experiment is that no difference exists between the two groups for the variable of interest (e.g., population means). The null hypothesis proposes something initially presumed true, and it is rejected only when it becomes evidently false. That is, when a researcher has a certain degree of confidence, usually 95% to 99%, that the data do not support the null hypothesis. In the example of testing radioactive purse above, the null hypothesis is there is no radioactive material in the purse and that all measured counts are due to ambient radioactivity typical of the surrounding air and harmless objects in the purse. Formulation of the null hypothesis is a vital step in testing statistical significance. Having formulated such a hypothesis, one can establish the probability of observing the obtained data from the prediction of the null hypothesis, if the null hypothesis is true. That probability is what commonly called the significance level of the results.&lt;br /&gt;
&lt;br /&gt;
In many scientific experimental designs we predict that a particular factor will produce an effect on our dependent variable — this is our alternative hypothesis. We then consider how often we would expect to observe our experimental results, or results even more extreme, if we were to take many samples from a population where there was no effect (i.e. we test against our null hypothesis). If we find that this happens rarely (up to, say, 5% of the time), we can conclude that our results support our experimental prediction — we reject our null hypothesis.&lt;br /&gt;
&lt;br /&gt;
====Type I Error, Type II Error and Power====&lt;br /&gt;
*Type I error: the false positive (Type I) error of rejecting the null hypothesis given that it is actually true; e.g., the purses are detected to containing the radioactive material while they actually do not.&lt;br /&gt;
*Type II error:  the false negative (Type II) error of failing to reject the null hypothesis given that the alternative hypothesis is actually true; e.g., the purses are detected to not containing the radioactive material while they actually do.&lt;br /&gt;
*Statistical power: the probability that the test will reject a false null hypothesis (that it will not make a Type II error). When power increases, the chances of a Type II error decrease. &lt;br /&gt;
The table below gives an example of calculating specificity, sensitivity, False positive rate $ α$, False Negative Rate $ β $ and power given the information of TN and FN.&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: 25%&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''' ($\beta$)&lt;br /&gt;
|-&lt;br /&gt;
| '''Positive (reject $H_{0})$''' || Condition absent + Positive result = False Positive ('''FP''', 0.00995)'''Type I error''' ($\alpha$) || 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''':$\frac{TN}{(TN+FP)}=\frac{0.98505}{(0.98505+ 0.00995)}= 0.99$ ||'''Sensitivity''':$\frac {TP} {(TP+FN)} = \frac {0.00475} {(0.00475+ 0.00025)}= 0.95$&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$ Specificity = \frac{TN}{TN + FP}$, $Sensitivity= \frac {TP} {TP+FN}$, $\alpha= \frac {FP}{FP+TN},\beta=\frac {FN} {FN+TP}$ ,$power=1-\beta $&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Testing a claim about a mean with large sample size====&lt;br /&gt;
&lt;br /&gt;
Recall the random sample $ {X_1,X_2,…,X_n} $ of the process where the population mean is estimated by the sample average $ \bar{X}_{n}=\frac{1}{n}∑_{i=1}^{n}X_{i}$. For a given small significant level say $ \alpha=0.025 $, the $(1-\alpha)100\% $ confidence interval for the mean is constructed by $ CI(\alpha)$:$\bar x\pm z_\frac{\alpha}{2}E$, where the margin of error ''E'' is defined as &lt;br /&gt;
&lt;br /&gt;
: $$E = \begin{cases}{\sigma\over\sqrt{n}},&amp;amp; \texttt{for-known}-\sigma,\\&lt;br /&gt;
{{1\over \sqrt{n}} \sqrt{\sum_{i=1}^n{(x_i-\overline{x})^2\over n-1}}},&amp;amp; \texttt{for-unknown}-\sigma.\end{cases}$$&lt;br /&gt;
: and $z_{\frac{\alpha}{2}}$ is the [[AP_Statistics_Curriculum_2007_Normal_Critical | critical value]] for a [[AP_Statistics_Curriculum_2007_Normal_Std |Standard Normal]] distribution at $\frac{\alpha}{2}.$&lt;br /&gt;
&lt;br /&gt;
*Hypothesis testing about a mean: large samples&lt;br /&gt;
&lt;br /&gt;
: $ H_{0}: \mu=\mu_{0}$ (e.g.,$\mu_{0}=0)$; one sided $H_{1}:\mu&amp;gt;\mu_{0}$  or $ \mu&amp;lt;\mu_{0} $ ;two sided $H_{1}:\mu≠\mu_{0} $.&lt;br /&gt;
:Test statistics:  &lt;br /&gt;
::(1) with known variance: $Z_0=\frac{\bar x -\mu_{0}} {\frac{\sigma}{\sqrt n}}$ $ \thicksim N (0,1)$  &lt;br /&gt;
&lt;br /&gt;
::(2) with unknown variance $T_{0}=\frac{\bar x -\mu_{0}} {SE(\bar x)}=\frac{\bar x -\mu_{0}} {{\frac{1} {\sqrt n}  \sqrt {\displaystyle \sum_{i=1}^{n} \frac{(x_{i}-\bar x)^{2}}{n-1}}}}$ $ \thicksim T_{df}=n-1$&lt;br /&gt;
&lt;br /&gt;
*Example: consider we are testing if the population mean equal to 20 at $\alpha$=0.05 using a double sided alternative test. $H_{0}$:$\mu=20$ vs.$H_{1}:\mu≠20$. The sample data is given: 16, 9, 14, 11, 17, 12, 99, 18, 13, 12, 5, 9, 17, 6, 11, 17, 18, 20, 6, 14, 7, 11, 12, 5, 18, 6, 4, 13, 11, and 12. Population variance not given.&lt;br /&gt;
&lt;br /&gt;
: $T_{0}=\frac{\bar x -\mu_{0}} {SE(\bar x)}=\frac{\bar x -\mu_{0}} {{\frac{1} {\sqrt n}  \sqrt {\displaystyle \sum_{i=1}^{n} \frac{(x_{i}-\bar x)^{2}}{n-1}}}}$ $\frac{22.1-12}{{\frac{1} {\sqrt 10} \sqrt {\displaystyle \sum_{i=1}^{10} \frac{(x_{i}-22.1)^{2}}{10-1}}}}$ $= 1.176$&lt;br /&gt;
&lt;br /&gt;
:: From the sample we have $\bar x=14.77, s=16.54$.&lt;br /&gt;
&lt;br /&gt;
: $T_{0}=\frac{\bar x -\mu_{0}} {SE(\bar x)}=\frac{\bar x -\mu_{0}} {{\frac{1} {\sqrt n}  \sqrt {\displaystyle \sum_{i=1}^{n} \frac{(x_{i}-\bar x)^{2}}{n-1}}}}$ $\frac{14.77-20}{{\frac{1} {\sqrt 30} \sqrt {\displaystyle \sum_{i=1}^{30} \frac{(x_{i}-14.77)^{2}}{30-1}}}}$ $= 1.176$&lt;br /&gt;
&lt;br /&gt;
: $P(T_{df=29}&amp;lt;T_{0}=-1.733)=0.047$, hence we have p-value $=2*0.047=0.094$, we can’t reject the null hypothesis at $\alpha=0.05$ level of significance.&lt;br /&gt;
&lt;br /&gt;
====Testing a claim about a mean with small sample size====&lt;br /&gt;
&lt;br /&gt;
Recall the random sample ${X_1,X_2,…,X_n}$ of the process where the population mean is estimated by the sample average $\bar X_{n}=\frac{1}{n}\sum_{i=1}^{n} X_{i}$. For a given small significant level say $\alpha=0.025$, the $(1-\alpha)100\%$ confidence interval for the mean is constructed by $ CI(\alpha)$:$\bar x\pm t_{df}=n-1$,$\frac{\alpha}{2} \frac{1}{\sqrt n} \sqrt \displaystyle \sum_{i=1}^{n} \frac{(x_{i}-\bar x)^{2}}{n-1} $, where E is the margin of error $E$ and $t_{df=n-1,\frac{\alpha} {2}}$ is the critical value of T distribution of df=sample size-1 at $\frac{\alpha}{2}$.&lt;br /&gt;
&lt;br /&gt;
*Hypothesis testing about a mean: small samples&lt;br /&gt;
&lt;br /&gt;
: $H_{0}:\mu=\mu_{0}$(e.g.,$\mu_{0}=0$); one sided $H_{1}:\mu&amp;gt;\mu_{0}$ or $\mu&amp;lt;\mu_{0}$;two sided $H_{1}:\mu≠\mu_{0}$.&lt;br /&gt;
&lt;br /&gt;
: Test statistics: &lt;br /&gt;
:: (1) with known variance: $Z_0=\frac{\bar x -\mu_{0}} {\frac{\sigma}{\sqrt n}}$ $ \thicksim N (0,1)$  &lt;br /&gt;
&lt;br /&gt;
::(2) with unknown variance $T_{0}=\frac{\bar x -\mu_{0}} {SE(\bar x)}=\frac{\bar x -\mu_{0}} {{\frac{1} {\sqrt n}  \sqrt {\displaystyle \sum_{i=1}^{n} \frac{(x_{i}-\bar x)^{2}}{n-1}}}}$ $ \thicksim T_{df}=n-1)$&lt;br /&gt;
&lt;br /&gt;
: Example: consider we are testing if the population mean equal to 20 at α=0.01 using a one sided alternative test. $H_{0}: \mu=12$ vs.$H_{1}:\mu&amp;gt;12$. The sample data is given: 16, 9, 14, 11, 17, 12, 99, 18, 13, and 12. Population variance is not given.&lt;br /&gt;
&lt;br /&gt;
: From the sample we have $\bar x=22.1,s=27.164$&lt;br /&gt;
: $T_{0}=\frac{\bar x -\mu_{0}} {SE(\bar x)}=\frac{\bar x -\mu_{0}} {{\frac{1} {\sqrt n}  \sqrt {\displaystyle \sum_{i=1}^{n} \frac{(x_{i}-\bar x)^{2}}{n-1}}}}$ $\frac{22.1-12}{{\frac{1} {\sqrt 10} \sqrt {\displaystyle \sum_{i=1}^{10} \frac{(x_{i}-22.1)^{2}}{10-1}}}}$ $= 1.176 $&lt;br /&gt;
&lt;br /&gt;
: $p-value=P(T_{df=29}&amp;gt;T_{0}=1.176)=0.13488$, hence we can’t reject the null hypothesis at $\alpha=0.01$ level of significance.&lt;br /&gt;
&lt;br /&gt;
====Testing a claim about a proportion====&lt;br /&gt;
&lt;br /&gt;
Recall that for large samples, the sample distribution of the sample proportion $ \hat p $ is approximately normal by CLT, as the sample proportion may be presented as a sample average or Bernoulli random variables. When sample size is small, the normal approximation is inadequate. The accommodate this, we modify the sample proportion  $\hat p $ slightly and obtain the corrected-sample-proportion $\tilde p$.&lt;br /&gt;
&lt;br /&gt;
$$\hat{p}={y\over n} \longrightarrow \tilde{p}={y+0.5z_{\alpha \over 2}^2 \over n+z_{\alpha \over 2}^2},$$&lt;br /&gt;
where $z_\frac{\alpha}{2}$ is the [[AP_Statistics_Curriculum_2007_Normal_Critical | critical value of a standard normal distribution]] at $\alpha/2$.&lt;br /&gt;
&lt;br /&gt;
: The standard error of &amp;lt;math&amp;gt;\hat{p}&amp;lt;/math&amp;gt; also needs a slight modification&lt;br /&gt;
$$SE_{\hat{p}} =  \sqrt{\hat{p}(1-\hat{p})\over n} \longrightarrow SE_{\tilde{p}} =  \sqrt{\tilde{p}(1-\tilde{p})\over n+z_{\alpha \over 2}^2}.$$&lt;br /&gt;
&lt;br /&gt;
*Hypothesis testing about a single sample proportion:&lt;br /&gt;
: Null Hypothesis: $H_o: p=p_o$ (e.g., $p_o=\frac{1}{2}$), where $p$ is the population proportion of interest.&lt;br /&gt;
: Alternative Research Hypotheses:&lt;br /&gt;
:: One sided (uni-directional): $H_1: p &amp;gt;p_o$, or $H_1: p&amp;lt;p_o$&lt;br /&gt;
:: Double sided: $H_1: p \not= p_o.$&lt;br /&gt;
: Test Statistics: $Z_o={\tilde{p} -p_o \over SE_{\tilde{p}}} \sim N(0,1).$&lt;br /&gt;
&lt;br /&gt;
* Example: consider we are testing the effect of some medicine. 500 patients are randomly recruited with evidence of early this disease and were scheduled to take one pill daily for two years. At the end two years, only 17 patients had the disease. Use $\alpha=0.05$ to formulate a test a research hypothesis that the proportion of patient on this treatment that have the disease within 2 years of treatment is $p_0=0.04$.&lt;br /&gt;
: $\tilde{p} = {17+0.5z_{0.025}^2\over 500+z_{0.025}^2}== {17+1.92\over 500+3.84}=0.038$ &lt;br /&gt;
: $SE_{\tilde{p}}= \sqrt{0.038(1-0.038)\over 500+3.84}=0.0085$&lt;br /&gt;
&lt;br /&gt;
: And the corresponding test statistics is&lt;br /&gt;
:: $Z_o={\tilde{p} - 0.04 \over SE_{\tilde{p}}}={0.002 \over 0.0085}=0.2353$&lt;br /&gt;
&lt;br /&gt;
: The p-value of this test is clearly insignificant and we can’t reject the null hypothesis at $\alpha=0.05$ level of significance.&lt;br /&gt;
&lt;br /&gt;
====Testing a claim about variance (or standard deviation)====&lt;br /&gt;
*Recall that the sample variance \(s^2\) is an unbiased point estimate for the population variance /(σ^2\), similarly for the standard deviation. The sample variance is roughly chi-square distributed: $\chi_0^2=\frac{(n-1) s^2}{\sigma_0^2} \sim \chi_{df=n-1}^2.$&lt;br /&gt;
**Hypothesis testing about variance&lt;br /&gt;
:: \(H_0: σ^2=σ_0^2   vs.H_1:σ^2≠σ_0^2\). Given that the chi-square distribution is not symmetric, there are two critical values \(χ_L^2\)  and \(χ_R^2.\)&lt;br /&gt;
*Test statistics: $\chi_0^2 =\frac{(n-1) s^2}{\sigma_0^2} \sim \chi_{df=n-1}^2$&lt;br /&gt;
**Example: we have a random sample of 30 objects drawn form a normal distribution with sample variance \(s^2=5.\) Test at \(α=0.05\) level of significance if this is consistent with \(H_0: \sigma^2=20\).&lt;br /&gt;
:: $\chi_0^2=\frac{(n-1) s^2}{\sigma_0^2} =(29*5)/2=72.5$, $\chi_L^2=16.047$ and $\chi_R^2=45.722$, since we have \(\chi_0^2 &amp;gt; \chi_R^2\), we reject the null hypothesis at 5% level of significance.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
*[http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_AnalysisActivities_OneT This article] illustrates SOCR analyses example on one sample t-test. It presents the background information for one sample t-test and demonstrate the process of doing one sample t-test in the SOCR one sample t-test applet. &lt;br /&gt;
*[http://socr.umich.edu/html/SOCR_ChoiceOfStatisticalTest.html This article] titled Choosing the Right Test presents the procedure to select a statistical test. It starts with getting the right hypotheses and then develops the topic based on the choice and characteristics of data. It offers a broad sense of what type of test to choose based on the hypothesis and the data. The article is also accompanied with several exercise for students to practice on their own.&lt;br /&gt;
*[http://wiki.stat.ucla.edu/socr/uploads/3/32/Thomson_SOCR_ECON261_HypothesisDifferenceMeans_VIII.pdf This article] titled The Hypothesis Testing For Difference Of Population Parameters presents a comprehensive introduction to the hypothesis testing of difference of population parameters with the background information as well as the application. It also presents the steps to apply hypothesis testing using SOCR analyses.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
*[http://socr.ucla.edu/htmls/SOCR_Analyses.html| SOCR Analysis]&lt;br /&gt;
*[http://www.socr.ucla.edu/htmls/ana/OneSampleTTest_Analysis.html One Sample T Test Analysis]&lt;br /&gt;
*[http://socr.ucla.edu/htmls/SOCR_Charts.html| SOCR Charts]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
USA Today's AD Track examined the effectiveness of the new ads involving the Pets.com Sock Puppet (which is now extinct). In particular, they conducted a nationwide poll of 428 adults who had seen the Pets.com ads and asked for their opinions. They found that 36% of the respondents said they liked the ads. Suppose you increased the sample size for this poll to 1000, but you had the same sample percentage who like the ads (36%). How would this change the p-value of the hypothesis test you want to conduct?&lt;br /&gt;
:(a) No way to tell&lt;br /&gt;
:(b) The new p-value would be the same as before&lt;br /&gt;
:(c) The new p-value would be smaller than before&lt;br /&gt;
:(d) The new p-value would be larger than before&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If we want to estimate the mean difference in scores on a pre-test and post-test for a sample of students, how should we proceed?&lt;br /&gt;
:(a) We should construct a confidence interval or conduct a hypothesis test&lt;br /&gt;
:(b) We should collect one sample, two samples, or conduct a paired data procedure&lt;br /&gt;
:(c) We should calculate a z or a t statistic&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The paint used to make lines on roads must reflect enough light to be clearly visible at night. Let mu denote the true average reflectometer reading for a new type of paint under consideration. A test of the null hypothesis that mu = 20 versus the alternative hypothesis that mu &amp;gt; 20 will be based on a random sample of size n from a normal population distribution. In which of the following scenarios is there significant evidence that mu is larger than 20?&lt;br /&gt;
&lt;br /&gt;
*(i) n=15, t=3.2, alpha=0.05&lt;br /&gt;
*(ii) n=9, t=1.8, alpha=0.01&lt;br /&gt;
*(iii) n=24, t=-0.2, alpha=0.01&lt;br /&gt;
&lt;br /&gt;
:(a) (ii) and (iii)&lt;br /&gt;
:(b) (i)&lt;br /&gt;
:(c) (iii)&lt;br /&gt;
:(d) (ii)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We observe the math self-esteem scores from a random sample of 25 female students. How should we determine the probable values of the population mean score for this group?&lt;br /&gt;
:(a) Test the difference in means between two paired or dependent samples.&lt;br /&gt;
:(b) Test that a correlation coefficient is not equal to 0 (correlation analysis).&lt;br /&gt;
:(c) Test the difference between two means (independent samples).&lt;br /&gt;
:(d) Test for a difference in more than two means (one way ANOVA).&lt;br /&gt;
:(e) Construct a confidence interval.&lt;br /&gt;
:(f) Test one mean against a hypothesized constant.&lt;br /&gt;
:(g) Use a chi-squared test of association.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Food inspectors inspect samples of food products to see if they are safe. This can be thought of as a hypothesis test where H0: the food is safe, and H1: the food is not A. If you are a consumer, which type of error would be the worst one for the inspector to make, the type I or type II error?&lt;br /&gt;
:(a) Type I&lt;br /&gt;
:(b) Type II&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A college admissions officer is concerned that their admission criteria might not treat men and women with equal weight. To test this, the college took a random sample of male and female high school seniors from a very large local school district and determined the percent of males and females who would be eligible for admission at the college. Which of the following is a suitable null hypothesis for this test?&lt;br /&gt;
:(a) p = 0.5&lt;br /&gt;
:(b) The proportion of all eligible men in the district will not equal the proportion of all eligible women in the district.&lt;br /&gt;
:(c) The proportion of all eligible men in the school district should be equal to the proportion of all eligible women in the school district.&lt;br /&gt;
:(d) The proportion of eligible men sampled should equal the proportion of eligible women sampled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We want to determine if college GPAs differ for male athletes in major sports (e.g., football), minor sports (e.g., swimming), and intramural sports. What statistical method is most likely to be used to answer this question? Assume that all necessary assumptions have been met for using this procedure.&lt;br /&gt;
:(a) Test one mean against a hypothesized constant&lt;br /&gt;
:(b) Test the difference in means between two paired or dependent samples&lt;br /&gt;
:(c) test for a difference in more than two means (one way ANOVA)&lt;br /&gt;
:(d) Test that a correlation coefficient is not equal to 0, correlation analysis&lt;br /&gt;
:(e) Test the difference between two means (independent samples)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistics show that the average level of a mother's education for a city of 300,000 people is 14 years with a standard deviation of 1.5 years. A major state university is located in this town. The administrators in this university think that the average level of a mother's education for the freshmen who are admitted to this school is higher than 14 years. The average education level of mothers for a random sample of 100 freshmen who were admitted to this university within the last two years was 14.7 years.&lt;br /&gt;
We want to test the null at the level of alpha = 0.001. What is the best answer?&lt;br /&gt;
:(a) We reject the alternative and believe that the level of a mother's education for university freshmen is not higher than the overall population average.&lt;br /&gt;
:(b) We reject the null at 0.001 and conclude that the average level of a mother's education is higher for university freshmen.&lt;br /&gt;
:(c) We fail to reject the null and conclude that the level of a mother's education for university freshmen is not higher than the overall population average.&lt;br /&gt;
:(d) In order to be certain about the conclusion we reach, a larger sample size is needed to increase the power of the test and the margin of error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The average length of time required to complete a certain aptitude test is claimed to be 80 minutes. A random sample of 25 students yielded an average of 86.5 minutes and a standard deviation of 15.4 minutes. If we assume normality of the population distribution, is there evidence to reject the claim? Choose at least one answer.&lt;br /&gt;
:(a) Yes, because the observed 86.5 did not happen by chance&lt;br /&gt;
:(b) Yes, because the t-test statistic is 2.11&lt;br /&gt;
:(c) Yes, because the observed 86.5 happened by chance&lt;br /&gt;
:(d) No, because the probability that the null is true is &amp;gt; 0.05&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Based on past experience, a bank believes that 4% of the people who receive loans will not make payments on time. The bank has recently approved 300 loans. What is the probability that over 6% of these clients will not make timely payments?&lt;br /&gt;
:(a) 0.096&lt;br /&gt;
:(b) 0.038&lt;br /&gt;
:(c) 0.962&lt;br /&gt;
:(d) 0.904&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Many people sleep in on the weekends to make up for short nights during the work week. The Better Sleep Council reports that 61% of us get more than 7 hours of sleep per night on the weekend. A random sample of 350 adults found that 235 had more than seven hours each night last weekend. At the 0.05 level of significance, does this evidence show that more than 61% of us get seven or more hours off sleep per night on the weekend?&lt;br /&gt;
:(a) That cannot be determined without more information&lt;br /&gt;
:(b) No&lt;br /&gt;
:(c) Yes&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
*[http://wiki.stat.ucla.edu/socr/index.php/Probability_and_statistics_EBook#Chapter_VIII:_Hypothesis_Testing  SOCR]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Statistical_hypothesis_testing   Statistical Hypothesis Testing Wikipedia]&lt;br /&gt;
*[http://stattrek.com/hypothesis-test/power-of-test.aspx?tutorial=ap   Stat Trek Tutorials]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_HypothesisTesting}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_Estimation&amp;diff=13549</id>
		<title>SMHS Estimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_Estimation&amp;diff=13549"/>
		<updated>2014-08-29T16:52:59Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Parameter Estimation ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Estimation is an important concept in the field of statistics and application of estimation is widely applied in various areas. It deals with estimating values of parameters of the population based on the sample data. And the parameters describe an underlying physical setting and their value would affect the distribution of the measured data. Two major approaches are commonly used in estimation: (1) the probabilistic approach assumes that the measured data is random with probability distribution dependent on the parameters; (2) the set-membership approach assumes that the measured data vector belongs to a set which depends on the parameter vector. The purpose of estimation is to find an estimator that is interpretable, accurate and exhibits some form of optimality. Indicators like minimum variance unbiased estimator is usually applied to measure estimator optimality, although it is possible that an optimal estimator don’t always exist. Here we present the fundamentals of estimation theory and illustrate how to apply estimation in real studies.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
To obtain a desired estimator, or estimation, we need to first determine a probability distribution with parameters of interest based on the data. After deciding the probabilistic model, we need to find the theoretically achievable precision available to any estimator based on the model and then develop an estimator based on this model. There are variety of methods and criteria to develop and choose between estimators based on their performance: maximum likelihood estimators, Bayes estimators, method of moments estimators, minimum mean square error estimators, minimum variance unbiased estimator, best linear unbiased estimator, etc. Experiment or simulations can also be run to test estimators’ performance.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
An estimate of a population parameter may be expressed in two ways:&lt;br /&gt;
*Point estimate: a single value of estimate. For example, sample mean is a point estimate of the population mean.&lt;br /&gt;
*Interval estimate: an interval estimate is defined by two numbers, between which a population parameter is said to lie.&lt;br /&gt;
&lt;br /&gt;
====Confidence Intervals (CIs)====&lt;br /&gt;
CIs describe the uncertainty of a sampling method and contains a confidence level, a statistic and a margin of error. The statistic and the margin of error define an interval estimate, which represent the precision of the method. Confidence Interval is expressed as sample statistic ± margin of error.&lt;br /&gt;
Interpretation of a confidence interval at 95% confidence level is that we have 95% confidence that the parameter will fall within the margin of the interval.&lt;br /&gt;
&lt;br /&gt;
* Confidence level: the probability part of a confidence interval. It describes the likelihood that a particular sampling method will produce a confidence interval that includes the true population parameter. &lt;br /&gt;
&lt;br /&gt;
* Margin of error: range of the values above and below the sample statistic in confidence interval. ''margin of error=critical value*standard deviation of the statistic''.&lt;br /&gt;
&lt;br /&gt;
* Critical value: The central limit theorem states that the sampling distribution of a statistic will be normal or nearly normal and the critical value can be expressed as a t score or as a z score, if ANY of the following conditions apply:&lt;br /&gt;
**The population distribution is normal;&lt;br /&gt;
**The sampling distribution is symmetric, unimodal, without outliers, and the sample size is 15 or less;&lt;br /&gt;
**The sampling distribution is moderately skewed, unimodal, without outliers, and the sample size is between 16 and 40;&lt;br /&gt;
**The sample size is greater than 40, without outliers.&lt;br /&gt;
&lt;br /&gt;
To find the critical value, follow these steps.&lt;br /&gt;
*Compute alpha $(\alpha): \alpha = 1 - (confidence\ level / 100)$&lt;br /&gt;
*Find the critical probability $(p^*): p^* = 1 -\frac {\alpha} {2}$&lt;br /&gt;
*To express the critical value as a $z$ score, find the $z$ score having a cumulative probability equal to the critical probability $(p^*)$.&lt;br /&gt;
*To express the critical value as a t score, follow these steps. Find the degree of freedom (DF): when estimating a mean score or a proportion from a single sample, DF is equal to the sample size minus one. For other applications, the degrees of freedom may be calculated differently. We will describe those computations as they come up.&lt;br /&gt;
&lt;br /&gt;
The critical t score $(t^*)$ is the t score having degrees of freedom equal to DF and a cumulative probability equal to the critical probability $(p^*)$.&lt;br /&gt;
&lt;br /&gt;
Should you express the critical value as a t score or as a z score? As a practical matter, when the sample size is large (greater than 40), it doesn't make much difference. Both approaches yield similar results. Strictly speaking, when the population standard deviation is unknown or when the sample size is small, the t score is preferred. Nevertheless, many introductory statistics texts use the z score exclusively. &lt;br /&gt;
&lt;br /&gt;
* Standard error: an estimate of the standard deviation of a statistic. When the values of population parameters are unknown, it is valuable to compute the standard error as an unbiased estimate of the standard deviation of a statistic. It is computed form known sample statistic. The table below shows how to compute the standard error for simple random samples assuming that the population size is at least 10 times larger than the sample size.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center;width:25%&amp;quot;border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Statistic ||	Standard error&lt;br /&gt;
|-&lt;br /&gt;
|Sample mean, $\bar{x}$ || $SE_{\bar{x}}=s/\sqrt(n)$&lt;br /&gt;
|-&lt;br /&gt;
|Sample proportion, $p$ || $SE_{p}=\sqrt{\frac{p(1-p)}{n}}$&lt;br /&gt;
|-&lt;br /&gt;
|Difference between means,$\bar{x}_{1} -\bar{x}_{2}$  ||  $ SE_{\bar{x}_1 -\bar{x}_2} = \sqrt{\frac{s_{1}^{2}}{n_{1}}+\frac{s_{2}^{2}}{n_{2}}}$&lt;br /&gt;
|-&lt;br /&gt;
|Difference between proportions, $\bar{p}_{1} - \bar{p}_{2}$ || $SE_{\bar{p}_{1} - \bar{p}_{2}} = \sqrt{ \frac{p_1 (1-p_1)}{n_1} +\frac{(p_{2}(1-p_{2})}{n_{2}}}$&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Degrees of freedom: the number of independent pieces of information on which the estimate is based&lt;br /&gt;
&lt;br /&gt;
In general, the degrees of freedom for an estimate is equal to the number of values minus the number of parameters estimated to the estimate in question. Suppose we have sampled 20 data points then our estimate of the variance has 20 – 1 = 19 degree of freedom.&lt;br /&gt;
&lt;br /&gt;
====Characteristics of Estimators====&lt;br /&gt;
* Bias: refers to whether an estimator tends to either overestimate or underestimate the parameter. We say an estimator is biased if the mean of the sampling distribution of the statistic is not equal to the parameter. For example, $σ^{2}=\frac{(x-μ)^{2}} {N}$ is a biased estimator of the population variance and sample variance $s^{2}=\frac{(x-\overline x ̅ )^{2}} {N-1 }$ is unbiased estimate of the population variance.&lt;br /&gt;
&lt;br /&gt;
*Sampling variability: refers to how much the estimate varies from sample to sample. It is usually measured by its standard error: the smaller the standard error, the less the sampling variability. For example, the standard error of the mean is $σ_M=σ/√N$. So the larger the sample size $(N)$, the smaller the standard error of the mean, hence the smaller the sample variability.&lt;br /&gt;
&lt;br /&gt;
*Unbiased estimate: $\eta (X_{1},X_{2},…,X_{n})=E[\delta(X_{1},X_{2},…,X_{n})|T]$ then $\delta(X_{1},X_{2},…,X_{n} )$ is unbiased estimate for $g(\theta)$ and $T$ is a complete sufficient statistic for the family of densities. &lt;br /&gt;
&lt;br /&gt;
*(Uniformly) Minimum-variance unbiased estimator (UMVUE, or MVUE) is an unbiased estimator that has lower variance than any other unbiased estimator for all possible values of the parameter.  It may not exist.Consider estimation of $g(\theta)$ based on data $X_{1},X_{2},…,X_{n}$ independent and identically distributed from some member of a family with density $p_\theta, \theta \in \Omega $, an unbiased estimator $\delta(X_{1},X_{2},…,X_{n})$ of $g(\theta)$ is UMVUE if $∀ \theta \in \Omega$, $var(\delta(X_{1},X_{2},…,X_{n})) \leq var(\tilde{\delta} (X_{1},X_{2},…,X_{n}))$ for any other unbiased estimator $\tilde{\delta}$. &lt;br /&gt;
&lt;br /&gt;
: $MSE(\delta)=var(\delta)+(bias(\delta))^{2}$. The MVUE minimizes MSE among unbiased estimators. In some cases biased estimators have lower MSE because they have a smaller variance than does any unbiased estimator.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
* [[AP_Statistics_Curriculum_2007_Estim_MOM_MLE|This article]] presents the MOM and MLE methods of estimation. It illustrates the MOM method in detailed examples and attached several exercise for students to practice. MOM, which is short for Method Of Moments, is one of the most commonly used methods to estimate population parameters using observed data from the specific process. The idea is to use the sample data to calculate sample moments and then set these equal to their corresponding population counterparts. Steps: (1) determine the $k$ parameters of interest and specific distribution for this process; (2) compute the first $k$ (or more) sample-moments; (3) set the sample-moments equal to the population moments and solve for a system of $k$ equations with $k$ unknowns. Let’s look at a simple example as application of the MOM method.&lt;br /&gt;
&lt;br /&gt;
: Consider we want to estimate the true probability of a head by flipping the coins (assume a unfair coin). Suppose we flip the coin 10 times and observe the following outcome: {H,T,H,H,T,T,T,H,T,T}. With MOM: (1) the parameter of interest is $p=P(H)$ and it follows a Bernoulli distribution, (2) $np=E[Y]=4,p=2/5$, where $Y$ is the number of heads for one experiment and it follows a Binomial distribution. (3) estimate of true probability of flipping a head in one experiment equals $2/5$.  This is an easy example of MOM proportion example.&lt;br /&gt;
&lt;br /&gt;
* [http://onlinestatbook.com/2/estimation/estimation.html This article] presents a fundamental introduction to estimation theory and illustrated on basic concepts and application of estimation. It offers specific examples and exercises on each concept and application and works as a good start of introduction to estimation theory. &lt;br /&gt;
&lt;br /&gt;
* [http://digital-library.theiet.org/content/journals/10.1049/ip-f-2.1993.0015 This article] proposed an algorithm, the bootstrap filter, for implementing recursive Bayesian filters. The required density of the state vector is represented as a set of random samples, which are updated and propagated by the algorithm. The method presented is not restricted by assumptions of linearity or Gaussian noise and it may be applied to any state transition or measurement model. It presents a simulation example of the bearings only tracking problems and includes schemes for improving the efficiency of the basic algorithm.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
*[http://socr.ucla.edu/htmls/SOCR_Distributions.html SOCR Distribution]&lt;br /&gt;
*[http://socr.ucla.edu/htmls/SOCR_Experiments.html SOCR Simulations &amp;amp; Experiments] &lt;br /&gt;
*[http://socr.ucla.edu/htmls/SOCR_Charts.html SOCR Charts]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
* Which of the following statements is true.&lt;br /&gt;
: a.  When the margin of error is small, the confidence level is high.&lt;br /&gt;
: b. When the margin of error is small, the confidence level is low.&lt;br /&gt;
: c. A confidence interval is a type of point estimate.&lt;br /&gt;
: d. A population mean is an example of a point estimate.&lt;br /&gt;
: e. None of the above.&lt;br /&gt;
&lt;br /&gt;
* Which of the following statements is true.&lt;br /&gt;
: a. The standard error is computed solely from sample attributes.&lt;br /&gt;
: b. The standard deviation is computed solely from sample attributes.&lt;br /&gt;
: c. The standard error is a measure of central tendency.&lt;br /&gt;
: d. All of the above.&lt;br /&gt;
: e. None of the above.&lt;br /&gt;
&lt;br /&gt;
* 900 students were randomly selected for a national survey. Among survey participants, the mean grade-point average (GPA) was 2.7, and the standard deviation was 0.4. What is the margin of error, assuming a 95% confidence level?&lt;br /&gt;
: a. 0.013&lt;br /&gt;
: b. 0.025&lt;br /&gt;
: c. 0.500&lt;br /&gt;
: d. 1.960&lt;br /&gt;
&lt;br /&gt;
* Suppose we want to estimate the average weight of an adult male in Dekalb County, Georgia. We draw a random sample of 1,000 men from a population of 1,000,000 men and weigh them. We find that the average man in our sample weighs 180 pounds, and the standard deviation of the sample is 30 pounds. What is the 95% confidence interval?&lt;br /&gt;
: a. $180 \pm 1.86$&lt;br /&gt;
: b. $180 \pm 3.0$ &lt;br /&gt;
: c. $180 \pm 5.88$&lt;br /&gt;
: d. $180 \pm 30$&lt;br /&gt;
&lt;br /&gt;
* Suppose that simple random samples of seniors are selected from two colleges: 15 students from school A and 20 students from school B. On a standardized test, the sample from school A has an average score of 1000 with a standard deviation of 100. The sample from school B has an average score of 950 with a standard deviation of 90. What is the 90% confidence interval for the difference in test scores at the two schools, assuming that test scores came from normal distributions in both schools? (Hint: Since the sample sizes are small, use a t score as the critical value.)&lt;br /&gt;
: a. 50 + 1.70&lt;br /&gt;
: b. 50 + 28.49&lt;br /&gt;
: c. 50 + 32.74&lt;br /&gt;
: d. 50 + 55.66&lt;br /&gt;
&lt;br /&gt;
* You know the population mean for a certain test score. You select 10 people from the population to estimate the standard deviation. How many degrees of freedom does your estimation of the standard deviation have?&lt;br /&gt;
: a. 8&lt;br /&gt;
: b. 9&lt;br /&gt;
: c. 10&lt;br /&gt;
: d. 11&lt;br /&gt;
&lt;br /&gt;
* In the population, a parameter has a value of 10. Based on the means and standard errors of their sampling distributions, which of these statistics estimates this parameter with the least sampling variability?&lt;br /&gt;
: a. Mean = 10, SE = 5&lt;br /&gt;
: b. Mean = 9, SE = 4&lt;br /&gt;
: c. Mean = 11, SE = 2&lt;br /&gt;
: d. Mean = 13, SE = 3&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
*[http://wiki.stat.ucla.edu/socr/index.php/Probability_and_statistics_EBook#Method_of_Moments_and_Maximum_Likelihood_Estimation  SOCR]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Estimation  Estimation Wikipedia]&lt;br /&gt;
* [http://onlinestatbook.com/2/estimation/characteristics.html  OnlineStatBook: Estimation]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Confidence_interval  Confidence Interval Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_Estimation}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ExpObsStudies&amp;diff=13548</id>
		<title>SMHS ExpObsStudies</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ExpObsStudies&amp;diff=13548"/>
		<updated>2014-08-29T16:51:57Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Experiments vs. Observational Studies ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
In an experiment investigators apply treatment to experimental units and then proceed to observe the effect of the treatments on the experimental units. It’s an ordered procedure carried out with the goal of verifying, refuting, or establishing the validity of a hypothesis. This lecture will present a general introduction to the field of experiment and different types of experiment that we may apply in researches later. We are also going to talk about observational study, which draws inferences about the possible effect of a treatment on subjects where the assignment of subjects into a treated group versus a control group outside the control of the investigators. A general comparison between these two types of studies will be presented thereafter.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
Experimental and observational studies are among the most commonly applied studies in researches. Consider a simple example of experimental study. Suppose we enrolled 200 women aged 30 who aren’t smokers and assign half of them to smoking treatment with one pack per day and the other half to no smoking treatment and kept this status for 10 years. Then the lung capacity of all the women are measured and the data is further analyzed and interpreted. Here we have an experimental study. For the other study, we find 200 women aged 30, of whom 100 are smoke free and the other half having been smoking one pack per day for 10 years and the lung capacity of those women are measured. Then the data is further analyzed and interpreted. This would be an easy example of observational study. The difference can be easily drawn from the comparison between these two studies: the assignment of subjects into a treated group versus a control group is outside the control of the investigators where in an experimental study, each subject is randomly assigned to a treated group or a control group. So, what characteristics would define experimental and observational studies in general and what would be the major difference between these two types of studies?&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
'''Experimental study'''&lt;br /&gt;
Experimental study is an empirical method that arbitrates between models or hypothesis and used to test existing theories or new hypotheses in order to support them or disprove them. Controlled experiments provide researches with insight into the causal relationship by demonstrating what outcome occurs when a particular factor is manipulated. Experiments may vary from personal and informal natural comparisons, to highly controlled ones. &lt;br /&gt;
*'''Types of experimental studies:'''&lt;br /&gt;
**Controlled experiments: compare the results obtained form experimental samples against control samples, which are practically identical to the experimental sample except for the one whose effect is being tested.&lt;br /&gt;
**Natural experiments: rely solely on observations of the variables of the system under study, rather than manipulation of just one or a few variables as occurs in controlled experiments. &lt;br /&gt;
**Field experiments: named to draw a contrast with laboratory experiments, which enforce scientific control by testing a hypothesis in the artificial and highly controlled setting of a laboratory. It is often used in social sciences, and especially in economic analyses o education.&lt;br /&gt;
&lt;br /&gt;
'''Observational Study'''&lt;br /&gt;
Observational Study draws inferences about the possible effect of a treatment on subjects where the assignment of subjects into a treated group versus a control group is outside the control of the investigator.&lt;br /&gt;
*'''Types of observational studies:'''&lt;br /&gt;
**Case-control study: originally developed in epidemiology, where two existing groups differing in outcome are identified and compared on the basis of some supposed causal attribute.&lt;br /&gt;
**Cross-sectional study: involves data collection from a population, or a representative subset, at one specific point in time.&lt;br /&gt;
**Longitudinal study: correlational research study that involves repeated observations of the same variables over long periods of time.&lt;br /&gt;
**Cohort study (panel study): a particular form of longitudinal study where a group of patients is closely monitored over a span of time.&lt;br /&gt;
**Ecological study: an observational study in which at least one variable is measured at the group level.&lt;br /&gt;
&lt;br /&gt;
*'''Degree of usefulness and reliability:''' though observational studies can’t be used as reliable sources to make statements of fact about the ‘safety, efficacy, or effectiveness’ of a practice, they can still be used to:&lt;br /&gt;
**Provide information on real world use and practice; &lt;br /&gt;
**Detect signals about the benefits and risk of use in the general population; &lt;br /&gt;
**Help formulate hypotheses to be tested in subsequent experiments; &lt;br /&gt;
**Provide part of the community-level data needed to design more informative pragmatic clinical trials;&lt;br /&gt;
**Inform clinical practice.&lt;br /&gt;
&lt;br /&gt;
*'''Bias and compensating methods:''' &lt;br /&gt;
When a randomized experiment cannot be carried out, the alternative line of investigation suffers from the problem that the decision of which subjects receive the treatment is not entirely random and thus is a potential source of bias. A major challenge in conducting observational studies is to draw inferences that are acceptably free from influences by overt biases, as well as to assess the influence of potential hidden biases. An observer of an uncontrolled experiment records potential factors and the data output: the goal is to determine the effects of the factors. Sometimes the recorded factors may not be directly causing the differences in the output. Also, recorded or unrecorded factors may be correlated which may yield incorrect conclusions. Finally, as the number of recorded factors increases, the likelihood increases that at least one of the recorded factors will be highly correlated with the data output simply by chance.&lt;br /&gt;
&lt;br /&gt;
*'''Comparisons between experimental and observational studies:'''&lt;br /&gt;
*An observational study is used when it is impractical, cost-prohibitive, or inefficient to fit a physical or social system into a laboratory setting, to completely control confounding factors, or to apply random assignment. It can also be used when confounding factors are either limited or known well enough to analyze the data in light of them. In order for an observational science to be valid, confounding factors must be known and accounted for. &lt;br /&gt;
*Fundamentally, however, observational studies are not experiments. In addition, observational studies often involve variables that are difficult to quantify or control. Observational studies are limited because they lack the statistical properties of randomized experiments. In a randomized experiment, the method of randomization specified in the experimental protocol guides the statistical analysis, which is usually specified also by the experimental protocol.&lt;br /&gt;
*A particular problem with observational studies involving human subjects is the great difficulty attaining fair comparisons between treatments because such studies are prone to selection bias, and groups receiving different treatments (exposures) may differ greatly according to their covariates. In contrast, the randomization ensures that the experimental groups have mean values that are close, due to the CLT or Markov’s inequality. With inadequate randomization or low sample size, the systematic variation in covariates between the treatment groups (or exposure groups) makes it difficult to separate the effect of the treatment (exposure) from the effects of the other covariates, most of which have not been measured. &lt;br /&gt;
*To avoid conditions that render an experiment far less useful, physicians conducting medical trials will quantify and randomize the covariates that can be identified. Researchers attempt to reduce the biases of observational studies with complicated statistical methods such as propensity score matching methods, which require large populations of subjects and extensive information on covariates. Outcomes are also quantified when possible and not based on a subject's or a professional observer's opinion. In this way, the design of an observational study can render the results more objective and therefore, more convincing.&lt;br /&gt;
&lt;br /&gt;
====Applications====&lt;br /&gt;
*[http://www.ncbi.nlm.nih.gov/pmc/articles/PMC534936/ This article] titled Observational Versus Experimental Studies: What’s the Evidence for a Hierarchy presents information that contradicts and discourages such a rigid approach to evaluating the quality of research design. It argued that the popular belief that randomized, controlled trials inherently produce gold standard results, and that all observational studies are inferior, does a disservice to patient care, clinical investigation, and education of health care professionals. It proposed that a more balanced strategy evolves, new claims of methodological authority may be just as problematic as the traditional claims of medical authority that have been criticized by proponents of evidence-based medicine.&lt;br /&gt;
&lt;br /&gt;
*[http://www.nber.org/papers/w13516 This article] titled Observational Learning: Evidence From A Randomized Natural Field Experiment presents results about the effects of observing others’ choices, called observational learning, on individuals' behavior and subjective well-being in the context of restaurant dining from a randomized natural field experiment. In the paper, they conducted experiment to distinguish observational learning effect from saliency effect (because observing others' choices also makes these choices more salient) and found that depending on specifications, the demand for the top 5 dishes was increased by an average of about 13 to 18 percent when these popularity rankings were revealed to the customers; in contrast, being merely mentioned as some sample dishes did not significantly boost their demand. Plus, consistent with theoretical predictions, some modest evidence that observational learning effect was stronger among infrequent customers. Finally, it argued that customers' subjective dining experiences were improved when presented with the information about the top choices by other consumers, but not when presented with the names of some sample dishes.&lt;br /&gt;
&lt;br /&gt;
====Software==== &lt;br /&gt;
not applicable …&lt;br /&gt;
&lt;br /&gt;
====Problems====&lt;br /&gt;
The next five problems are based on the following article: &lt;br /&gt;
You want to study if exercise decreases your risk of having a cardiovascular event. One of your friends says that they have access to data of 5,000 US adults (aged 65-85) who were surveyed once in 2010 about their current exercise patterns and past cardiovascular events. You look at their data and find that people with cardiovascular events reported higher levels of exercise than those without cardiovascular events. This is counter to your expectation since you know that other studies have shown that exercise should put you at a lower risk of an event.&lt;br /&gt;
 &lt;br /&gt;
*1.What could be a plausible explanation(s) for this unexpected finding?&lt;br /&gt;
*2.What kind of study is this? Experimental or Observational?&lt;br /&gt;
*3.What feature of a cohort study design might improve your ability to look at this association?&lt;br /&gt;
*4.Now being impressed by cohort studies, you decide to recruit the current student body of UM SPH to prospectively study exercise as a risk factor for many diseases. One of your friends asks if they can use your data to study exercise as a risk factor for MERRF syndrome, an extremely rare disease of the mitochondria with an estimated prevalence of 9 per 1,000,000. Why or why not might this be a good idea?&lt;br /&gt;
*5.Your real interest is maternal fitness level during pregnancy and cardiovascular disease of the offspring in adulthood. What might be the challenges that you will face in conducting a cohort study to answer this question?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next six problems are based on the following article:&lt;br /&gt;
&lt;br /&gt;
Abstract from Appel et al.&lt;br /&gt;
&lt;br /&gt;
'''BACKGROUND:''' &lt;br /&gt;
It is known that obesity, sodium intake, and alcohol consumption factors influence blood pressure. In this clinical trial, Dietary Approaches to Stop Hypertension, we assessed the effects of dietary patterns on blood pressure. &lt;br /&gt;
&lt;br /&gt;
'''METHODS:'''&lt;br /&gt;
We enrolled 459 adults with systolic blood pressures of less than 160 mm Hg and diastolic blood pressures of 80 to 95 mm Hg. For three weeks, the subjects were fed a control diet that was low in fruits, vegetables, and dairy products, with a fat content typical of the average diet in the United States. They were then randomly assigned to receive for eight weeks the control diet, a diet rich in fruits and vegetables, or a &amp;quot;combination&amp;quot; diet rich in fruits, vegetables, and low-fat dairy products and with reduced saturated and total fat. Sodium intake and body weight were maintained at constant levels.&lt;br /&gt;
 &lt;br /&gt;
'''RESULTS:'''&lt;br /&gt;
At base line, the mean (+/-SD) systolic and diastolic blood pressures were 131.3+/-10.8 mm Hg and 84.7+/-4.7 mm Hg, respectively. The combination diet reduced systolic and diastolic blood pressure by 5.5 and 3.0 mm Hg more, respectively, than the control diet (P&amp;lt;0.001 for each); the fruits-and-vegetables diet reduced systolic blood pressure by 2.8 mm Hg more (P&amp;lt;0.001) and diastolic blood pressure by 1.1 mm Hg more than the control diet (P=0.07). Among the 133 subjects with hypertension (systolic pressure, &amp;gt; or =140 mm Hg; diastolic pressure, &amp;gt; or =90 mm Hg; or both), the combination diet reduced systolic and diastolic blood pressure by 11.4 and 5.5 mm Hg more, respectively, than the control diet (P&amp;lt;0.001 for each); among the 326 subjects without hypertension, the corresponding reductions were 3.5 mm Hg (P&amp;lt;0.001) and 2.1 mm Hg (P=0.003). &lt;br /&gt;
&lt;br /&gt;
'''CONCLUSIONS:'''&lt;br /&gt;
A diet rich in fruits, vegetables, and low-fat dairy foods and with reduced saturated and total fat can substantially lower blood pressure. This diet offers an additional nutritional approach to preventing and treating hypertension. &lt;br /&gt;
&lt;br /&gt;
*1.What type of study is this?&lt;br /&gt;
*2.What was the purpose of the trial?&lt;br /&gt;
*3.Losing weight causes blood pressure to drop. Why do you think the investigators made an effort to keep participants’ weight stable in this trial?&lt;br /&gt;
*4.What was the purpose of randomization in this study (i.e. why is randomization done)?&lt;br /&gt;
*5.How would you evaluate whether randomization “worked” or not?&lt;br /&gt;
*6.Did randomization work?&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
*[http://www.public.iastate.edu/~dnett/S401/nexpvsobs.pdf  Online resource] &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Experiment   Experiment Wikipedia]  &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Observational_study  Observational Study Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_ExpObsStudies}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_IntroEpi&amp;diff=13547</id>
		<title>SMHS IntroEpi</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_IntroEpi&amp;diff=13547"/>
		<updated>2014-08-29T16:51:06Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Introduction to Epidemiology ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Epidemiology is the study of the distribution and determinants of disease frequency in human populations. It serves as an important area in the scientific field: it is the only scientific discipline that is concerned with the occurrence of disease in human populations and how it changes over time. The introduction to Epidemiology aims to introduce the filed of Epidemiology and study the basic concepts and methodologies we are going to apply later. It also aims to help students solve and analyze Epidemiological problems and introduce students to various Epidemiological studies.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
To get an introduction to Epidemiology, we want to: &lt;br /&gt;
*study on the basis of the language of epidemiology and identify key sources of data for epidemiologic purposes&lt;br /&gt;
*be able to calculate and interpret measures of disease frequency&lt;br /&gt;
*recognize and evaluate epidemiological study designs and their limitations&lt;br /&gt;
*be an informed consumer of  epidemiological sources of information (journals, websites, government agencies).&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
*Five main goals of epidemiology=&lt;br /&gt;
**1. To identify the cause of disease and its risk factors&lt;br /&gt;
**2. To determine the extent of disease found in the community&lt;br /&gt;
**3. To study the natural history and prognosis of disease&lt;br /&gt;
**4. To evaluate new preventative and therapeutic measures&lt;br /&gt;
**5. To provide a foundation for developing public policy.&lt;br /&gt;
&lt;br /&gt;
*Distinguishing between Endemic, Epidemic, and Pandemic&lt;br /&gt;
**Endemic: The habitual presence (or usual occurrence) of a disease within a given geographic area;&lt;br /&gt;
**Epidemic: The occurrence of a disease clearly in excess of normal expectancy in a given geographic area;&lt;br /&gt;
**Pandemic: A worldwide epidemic affecting an exceptionally high proportion of the global population.&lt;br /&gt;
&lt;br /&gt;
*Modes of Disease Transmission&lt;br /&gt;
**Direct contact: transmission occurs when the pathogen is transferred by contact from an infected person to contaminated intermediate object such as sneeze, touch or sexual intercourse. &lt;br /&gt;
**Indirect contact: transmission involves the transfer of pathogen by contact with a contaminated intermediate inanimate object or vector. &lt;br /&gt;
:(1) Inanimate object vehicle), examples may be toy, food or water; &lt;br /&gt;
:(2) Vector-borne (animal or insect), examples include mosquito, tick and mice.&lt;br /&gt;
&lt;br /&gt;
*Attack Rates and Ratios (ARR)&lt;br /&gt;
**Attack rates and ratios use statistics to develop and evaluate hypotheses in an outbreak involves: starting with the big picture and big risk factors for disease such as “How many people at the event got ill?”; refining the big picture into smaller questions of “Did they eat the salad? Chicken? Or ice cream?”; formulating a hypothesis such as “Among those who eat at the buffet, are the people who ate the Caesar salad at greater risk than those who did not?”&lt;br /&gt;
**Attack Rates (AR): $AR=\frac{Number\,of\,people\,at\,risk\,who\,develop\,a\,certain\,  illness} {Total\,number\,of\,people\,at\,risk}.$ &lt;br /&gt;
**Attack Rate Ratio (ARR): $ARR=\frac{Attack\,rate\,in\,those\,exposed} {Attack\,rate\,in\,those\,unexposed}.$&lt;br /&gt;
**$H_{0}:ARR=1$,and 95% confidence intervals can be used to see whether estimated ARR interval includes the null value of 1. If ARR is much greater than 1, then people exposed are more likely to develop the illness compared to those unexposed.&lt;br /&gt;
&lt;br /&gt;
*Measuring Disease&lt;br /&gt;
&lt;br /&gt;
To name and calculate two measures of incidence and describe differences in interpreting these measures as well as to understand the difference of the difference between proportion and a true rate.&lt;br /&gt;
**Incidence: number of new cases of a disease occurring in the population during a special period of time divided by the number of persons at risk of developing the disease during that period of time. For example: if there are 2000 persons at risk during the year and 20 develop disease over that period. The incidence rate would be 20⁄2000=1%.&lt;br /&gt;
**Cumulative incidence: $ \frac{Number\,of\,new\,cases}{Total\,population\,at\,risk}. $&lt;br /&gt;
**Incidence rate: $\frac{Number\,of\,new\,cases}{Total\,person-time\,contributed\,by\,the\,persons\,followed}.$ &lt;br /&gt;
Person time is a way to measure the amount of time all individuals in a study spend at risk. For example, if subject A is followed for 3 days, subject B is followed for 5 days and C for 8 days then person-days = 3 + 5 + 8 = 16.&lt;br /&gt;
**Prevalence $\frac{Number\,of\,cases\,of\,a\,disease\,in\,the\,population\,at\,a\,specified\,time}{Number\,of\,persons\,in\,the\,population\,at\,that\,time}.$ &lt;br /&gt;
**The specified time can be a period or a point, so we can measure the prevalence during a short period in January of 2013 or on January 3$^{rd}$, 2013.&lt;br /&gt;
&lt;br /&gt;
*Measuring Mortality Rates&lt;br /&gt;
**To calculate and interpret all-cause mortality rates, group-specific mortality rates and cause-specific mortality rates.&lt;br /&gt;
**All cause mortality rates=$\frac{Number\,of\,deaths\,in\,a\,specified\,time\,period}{Number\,in\,population\,in\,the\,middle\,of\,the\,year}$.&lt;br /&gt;
**Cause-specific mortality rate=$\frac{Total\,number\,of\,deaths\,in\,1\,year\,from\,lung\,cancer\,in\,US}{Population\,of\,the\,US\,in\,the\,middle\,of\,the\,year}$.&lt;br /&gt;
**Group-specific mortality rate=$\frac{Total\,number\,of\,deaths\,in\,1\,year\,among\,women\,in\,US} {Female\,population\,of\,the\,US\,in\,the\,middle\,of\,the\,year}$.&lt;br /&gt;
*Additional Measures of Mortality&lt;br /&gt;
**Infant mortality: $\frac{Number\,of\,deaths\,in\,children\,under\,1\,year\,of\,age\,in\,2011} {(Number\,of\,live\,births\,in\,2011}$.&lt;br /&gt;
&lt;br /&gt;
**Proportionate mortality: measures proportion of all deaths occurring in a given place over a given time that is due to a given cause.	&lt;br /&gt;
**Case fatality: Of all people diagnosed with a given disease, the proportion of persons die of a case over a certain period.&lt;br /&gt;
**Underlying cause of death.&lt;br /&gt;
&lt;br /&gt;
*Direct and Indirect Adjustment of Rates&lt;br /&gt;
&lt;br /&gt;
Direct and indirect adjustment of rates are used to compare two populations or one population at different time periods with different age distributions by adjust for age to compare the mortality rates in two populations if they both have the same age distribution.&lt;br /&gt;
**Direct age-adjustment: expected rate (or standardized rate) can be compared to the crude rate or to any other similarly standardized rate.&lt;br /&gt;
&lt;br /&gt;
For each population:&lt;br /&gt;
:1. Calculate age-specific rates&lt;br /&gt;
:2. Multiply age-specific rates by the # of people in corresponding age range in standard population&lt;br /&gt;
:3. Sum expected # of deaths across age groups&lt;br /&gt;
:4. Divide total # of expected deaths by total standard population&lt;br /&gt;
&lt;br /&gt;
Age-adjusted mortality rate for each population of interest.&lt;br /&gt;
&lt;br /&gt;
**Indirect age-adjustment: expected number of deaths can be compared to the number of actual deaths with the standardized mortality rate (SMR). It is especially useful when I don’t trust the group-specific rates (i.e. if the population is too small).&lt;br /&gt;
:1. Acquire age-specific mortality rates for standard population&lt;br /&gt;
:2. Multiply standard population’s age-specific rates by # of people in age range in study population&lt;br /&gt;
:3. Sum expected # of deaths across age groups in study population&lt;br /&gt;
:4. Divide observed # of deaths by expected # of deaths in study population&lt;br /&gt;
&lt;br /&gt;
Result: SMR (&amp;gt;1 more than expected, =1 as expected, &amp;lt;1 less than expected)&lt;br /&gt;
&lt;br /&gt;
*Screening&lt;br /&gt;
&lt;br /&gt;
Screening is the use of testing to sort out apparently well persons (asymptomatic) who probably have disease from those who probably do not and allows to detect the disease early. Examples of screening include: fasting blood sugar for diabetes, bone densitometry for osteoporosis and Otoacoustic emissions testing for hearing loss new borns. It is done during the preclinical phase and is a secondary prevention strategy. Screening increases lead time, thereby allows us to detect disease early, initiate treatment sooner and provide better outcomes. However, it is critical that screening programs must be warranted and there must be a critical point that can be preceded by screening. &lt;br /&gt;
&lt;br /&gt;
*A. Clinical utility predictive value &amp;amp; reliability: clinical utility of positive tests.&lt;br /&gt;
&lt;br /&gt;
If a patient is tested positive, the likelihood they actually have the disease is called '''Positive Predictive Value (PPV'''), if a patient tests negative, the likelihood they actually do not have the disease is called '''Negative Predictive Value (NPV).''' PPV and NPV are affected by prevalence of disease, specificity and sensitivity 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:25%&amp;quot;border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=2 rowspan=2| || colspan=2| Disease Status	&lt;br /&gt;
|-&lt;br /&gt;
| Disease|| No Disease&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2 |Screening Test ||Positive|| a (True positives)||	b (False positives)&lt;br /&gt;
|-&lt;br /&gt;
| Negative ||	c (False negatives)||	d (True negatives)&lt;br /&gt;
|}&lt;br /&gt;
$PPV=\frac{a}{a+b},NPV=\frac{d}{c+d}$&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
'''PPV interpretation:''' Given a positive result on the disease, the likelihood that an individual is positive in the screening test is PPV.&lt;br /&gt;
'''NPV interpretation:''' Given a negative result on the disease, the likelihood that an individual is negative in the screening test is NPV.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*B. Factors influence predictive values:&lt;br /&gt;
&lt;br /&gt;
Disease prevalence: increasing disease prevalence increases PPV (or decreases NPV). Screening program most productive and efficient in high-risk populations; screening for infrequent disease may waste resources; need to present PPV in context of disease prevalence.&lt;br /&gt;
**Test specificity (ability of a test to correctly identify those who have the disease $=\frac{d}{b+d}$): higher test specificity increases PPV.&lt;br /&gt;
**Test sensitivity (ability of a test to correctly identify those who do not have the disease =$\frac{a}{a+c}).$&lt;br /&gt;
&lt;br /&gt;
'''Note:''' the cutoff of a disease will influence test sensitivity and specificity: lowering the cutpoint will increase true positive hence increases sensitivity; decreases true negative hence decreases specificity. Similarly, raising the cutpoint will decrease true positives hence decreases sensitivity; increase true negatives hence increases specificity. &lt;br /&gt;
&lt;br /&gt;
*C. Validity:&lt;br /&gt;
&lt;br /&gt;
Validity is the ability of a test to distinguish between who has disease and who does not; reliability is the ability to replicate results on same sample if test if repeated. 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;
[[Image:SMHS_InNtroEpi_Fig_1_2_3_C.png]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
*D. Reliability(repeatability) of tests:&lt;br /&gt;
&lt;br /&gt;
Can the results be replicated if the test is redone? The results may be influenced by three factors:&lt;br /&gt;
**Intrasubject variation: variation within individual subjects&lt;br /&gt;
**Intraobserver variation: variation in reading of results by the same reader&lt;br /&gt;
**Interobserver variation: variation between those reading results&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*E. How do multiple testing improve screening programs? &lt;br /&gt;
&lt;br /&gt;
Using multiple tests: &lt;br /&gt;
:(1) sequential tests(2-stage) is less expensive, less invasive, less uncomfortable test first; if positive on first test, then follow-up with additional testing.&lt;br /&gt;
:(2) simultaneous tests (parallel) conduct multiple screening tests at the same time; to be considered positive, the person can test positive on either test, to be considered negative, the person must test negative on all tests. &lt;br /&gt;
&lt;br /&gt;
Each test has own sensitivity and specificity. Utilization of multiple testing can improve net sensitivity (simultaneous testing) or net specificity (sequential testing), that is sequential testing decreases net sensitivity and increases net specificity while simultaneous testing increases net sensitivity and decreases net specificity.&lt;br /&gt;
&lt;br /&gt;
*Randomized Controlled Trials (RCT):&lt;br /&gt;
&lt;br /&gt;
The investigator assigns exposure at random to study participants, investigator then observes if there are differences in health outcomes between people who were (treatment group) and were not (comparison group) exposed to the facto. Special care is taken in ensuring that the follow-up is done in an identical way in both groups. The essence of good comparison between “treatment” is that the compared groups are the same except for the “treatment”.&lt;br /&gt;
**Steps of a RCT: hypothesis formed; study participant recruited based on specific criteria and their informed consent is sought; eligible and willing participants randomly allocated to receive assignment to a particular study group; study groups are monitored for outcome under study; rates of outcome in the various groups are compared.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:MSHS_IntroEpi_Fig_3_actually2.png |400px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
**External and internal validity: &lt;br /&gt;
***External validity: Generalization of study to larger source population. Influenced by factors like: demographic differences between eligible and ineligible subgroups; intervention mirror what will happen in the community or source population.&lt;br /&gt;
***Internal validity: Ability to reach correct conclusion in study. Influenced by factors like: ability of subjects to provide valid and reliable data; expected compliance with a regimen; low probability of dropping out.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
*Measures of Association and Effect in RCT:&lt;br /&gt;
 &lt;br /&gt;
Ratio of two measures of disease incidence (relative measures) - Risk Ratio (Relative Risk), Rate Ratio.&lt;br /&gt;
Difference between two measures of disease incidence: Risk difference, efficacy.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text align:center;width:25%&amp;quot;border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=2 rowspan=2| || colspan=2| Disease Status	&lt;br /&gt;
|-&lt;br /&gt;
| Disease|| No Disease&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2 |Treatment||Drug A|| a ||	b &lt;br /&gt;
|-&lt;br /&gt;
| Placebo ||	c ||	d&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
$Relative\,Risk=\frac{Cumulative\,Incidence\,in\,exposed} {Cumulative\,Incidence\,in\,unexposed}=ratio\,of\,risks=Risk\,Ratio=\frac{a/(a+b)} {c/(c+d)}=\frac{CI_{drugA}}{CI_placebo}$&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
$Rate\, Ratio=\frac{Incidence\,rate\,in\,exposed} {Incidence\,rate\,in\,unexposed}$&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Interpretation: RR&amp;gt;1, The risk of X is RR times more likely to occur in group A than in group B; RR=1, Null value (no difference between groups); RR&amp;lt;1, Either calculate the reduction in risk ratios (100%-xx%) or invert (1/RR) to be interpreted as “less likely” risk.&lt;br /&gt;
&amp;lt;center&amp;gt; $Efficacy=\frac{C.I.\,rate\,in\, placebo-C.I.\,rate\, in\, the\, treatment}{C.I.\,rate\, in\, placebo\, group}$&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
*Situations that favor the use of RCT:&lt;br /&gt;
:(1) Exposure of interest is a modifiable factor over which individuals are willing to relinquish control; &lt;br /&gt;
:(2) Legitimate uncertainty exists regarding the effect of interventions on outcome, but reasons exist to believe that the benefits of the intervention in question overweight the risks;&lt;br /&gt;
:(3) Effect of intervention on outcome is of sufficient importance to justify a large study.&lt;br /&gt;
&lt;br /&gt;
*Cohort Study:&lt;br /&gt;
&lt;br /&gt;
Population of exposed and unexposed individuals at risk of developing outcomes are followed over time to compare the development of disease in each group. &lt;br /&gt;
**Steps: Establish the study population. Identify a study population that is reflective of base population of interest and has a distribution of exposure; identify group of exposed and unexposed individuals. Study on the outcomes of exposed and not exposed groups.&lt;br /&gt;
[[Image:MSHS_IntroEpi_Fig2_C.png |500px|]]&lt;br /&gt;
**Types: &lt;br /&gt;
Prospective (concurrent) and Retrospective Cohort Studies (non-concurrent) based on when is the data collected.&lt;br /&gt;
Retrospective has benefits: more cost effective; good for disease of long latency.&lt;br /&gt;
Prospective has benefits: data quality presumably higher.&lt;br /&gt;
Both designs need to be cautious of ascertainment biases if outcomes or exposure is known.&lt;br /&gt;
&lt;br /&gt;
**Measures of Association in Cohort Study:&lt;br /&gt;
&lt;br /&gt;
Ratio of two measures of disease incidence (relative measures): Risk Ratio (Relative Risk), Rate Ratio.&lt;br /&gt;
Difference between two measures of disease incidence: Risk Difference, Rate Difference.&lt;br /&gt;
**Strengths and weakness of Cohort Design:&lt;br /&gt;
Strengths:&lt;br /&gt;
:(1) Maintain temporal sequence – can estimate incidence of disease; exposure precedes development of disease; also explore time-varying information. &lt;br /&gt;
:(2) Excellent for studying known adverse exposures or those that cannot practically be randomized. &lt;br /&gt;
:(3) Like RCT, excellent for studying rare exposures. &lt;br /&gt;
:(4) Multiple outcomes and sometimes multiple exposures can be studied.&lt;br /&gt;
Disadvantages: &lt;br /&gt;
:(1) Long-term follow-up required and expensive; &lt;br /&gt;
:(2) Not effective at capturing rare outcomes and can be challenging to study disease that take a long time to develop; &lt;br /&gt;
:(3) Loss to follow-up can be a problem; &lt;br /&gt;
:(4) Changes over time in criteria and methods can lead to problems with inferences; &lt;br /&gt;
:(5) People self-select exposures so exposed and unexposed may differ with respect to important characteristics.&lt;br /&gt;
**Situations favor a Cohort Study: &lt;br /&gt;
:(1) When there is evidence of an association between the exposure and the disease from other studies;&lt;br /&gt;
:(2) When the exposure is rare but incidence of disease among the exposure is high;|&lt;br /&gt;
:(3) When time between exposure and development of the disease is relatively short or historical data is available;&lt;br /&gt;
:(4) When good follow-up can be ensured.&lt;br /&gt;
&lt;br /&gt;
*Case Control Study:&lt;br /&gt;
A case control study compares cases and controls to see which group has greater exposure to the disease.&lt;br /&gt;
**Measures of Association: Odds Ratio.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text align:center;width:25%&amp;quot;border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=2| || Case || Control	&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2 |Exposed || Yes || a || b &lt;br /&gt;
|-&lt;br /&gt;
| No ||	c ||d&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
$Odds\, Ratio=\frac{odds\, of\, a\, case\, being\, exposed}{odds\, of\, a\, control\, being\, exposed}=\frac{(a/c)} {(b/d)}=\frac {ad}{bc}.$&lt;br /&gt;
&lt;br /&gt;
''Interpretation:'' Odds of being exposed is OR times higher (if OR &amp;gt; 1) in the cases than the controls (1/OR times lower (if OR &amp;lt; 1) in the cases than the controls; No association – odds are the same in cases and controls (if OR = 1)).&lt;br /&gt;
&lt;br /&gt;
*Strengths and weakness of Case Control Study:&lt;br /&gt;
**Strengths: Case Control Study Design is efficient and can evaluate many risk factors for the same disease, so is good for diseases about which little is known; it is observational – we don’t ask people to change their behavior, we just collect information on events that happen “naturally”.&lt;br /&gt;
**Weakness: Inefficient for rare exposures; can study only one outcome at a time; cannot calculate incidence of disease but can only estimate the odds of being exposed in cases vs. controls; the number of cases and controls in study is artificial and does not represent the natural distribution of disease in the population.&lt;br /&gt;
&lt;br /&gt;
*Avoiding Recall / Reporting Bias:&lt;br /&gt;
**Ways to avoid recall and report bias include: &lt;br /&gt;
:(1) adjusting timing so that the time between the event/illness and the study is as short as possible; use standardized questionnaires that obtain complete information;&lt;br /&gt;
:(2) using existing information if/when possible (e.g. medical record); &lt;br /&gt;
:(3) masking participants to study hypothesis&lt;br /&gt;
**Conditions when an OR from a Case-Control Study can approximate a RR OR≈RR:&lt;br /&gt;
:(1) when the cases are representative, with respect to their exposure status, of all people with the disease in the population from which the cases were drawn; &lt;br /&gt;
:(2) when the controls are representative, with respect to their exposure status, of all people without the disease in the population from which the cases are drawn; &lt;br /&gt;
:(3) when the disease being studied does not occur frequently.&lt;br /&gt;
&lt;br /&gt;
*Cross-Sectional Studies:&lt;br /&gt;
&lt;br /&gt;
A cross sectional study is an observational study in which a subject’s exposure and disease data are measured at the same time; prevalent cases of the disease are identified; exposure prevalence in relation to disease prevalence (no incidence cases; unable to determine temporality).&lt;br /&gt;
**Strengths and Limitations of Cross-Sectional Studies:&lt;br /&gt;
'''Strengths:'''&lt;br /&gt;
:(1) good for generating hypotheses;&lt;br /&gt;
:(2) easily sets up other analytic designs; &lt;br /&gt;
:(3) temporality is not a problem for time invariant exposures (genetic markers); &lt;br /&gt;
:(4) relatively low cost.&lt;br /&gt;
'''Weakness:'''&lt;br /&gt;
:(1) temporality – exposure or disease which happened first; &lt;br /&gt;
:(2) prevalent cases may not be the same as incident cases; &lt;br /&gt;
:(3) not useful for rare disease; &lt;br /&gt;
:(4) subject to selection bias.&lt;br /&gt;
&lt;br /&gt;
**Measures of Association in Cross Sectional Studies&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text align:center;width:25%&amp;quot;border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=2| || Case || Control	&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2 |Exposed || Yes || a || b &lt;br /&gt;
|-&lt;br /&gt;
| No ||	c ||d&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
$Prevalence Ratio=\frac{Prevalence\,of\,disease\,in\,exposed}{Prevalence\,of\, disease\,in\,unexposed}=\frac{a/(a+b)}{c/(c+d)}$&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Ecologic Studies:&lt;br /&gt;
&lt;br /&gt;
An ecological study is an observational study in which group-level data is used for the exposure and/or the outcome. Subjects can be grouped by place (multiple-group study); by time (time-trend study); by place &amp;amp; time (mixed study). An error that could occur when an association identified based on group level (ecologic) characteristics are ascribed to individuals when such association do not exist at the individual level. &lt;br /&gt;
'''Strengths and Disadvantages of Ecologic Studies:'''&lt;br /&gt;
'''Strengths:''' &lt;br /&gt;
:(1) data is relatively easy and/or cheap to obtain; &lt;br /&gt;
:(2) good place to start; (3) many relevant social, occupational and environmental exposures cannot be ascribed to an individual.&lt;br /&gt;
'''Weakness:''' reliance on group-level data may not correctly represent individual-level associations. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Ecologic fallacy is when an association between variables based on group characteristics is used to make inferences about individuals when that association does not exist.&lt;br /&gt;
&lt;br /&gt;
*Ecologic studies are useful for generation of new hypotheses because they are relatively easy and low-cost to conduct.&lt;br /&gt;
&lt;br /&gt;
*Other Risk Estimates:&lt;br /&gt;
**Attributable Risk Estimates of Effect – if exposure causes increased risk of disease, then we can estimate how many cases of disease could be eliminated if we completely eliminate the exposure.&lt;br /&gt;
**Attributable Risk (AR):$AR=CI_{Exposed} - CI _{Not\,exposed}$ This is just the risk difference. Group of interest: exposed and aims to quantify the risk of disease in the “exposed” group attributable to the exposure. 	&lt;br /&gt;
**Attributable Risk Percent $(AR\%)$:    $ AR\%$ = $\frac{(CI_{Exposed} - CI_{Not exposed})}{CI_{exposed}}$&lt;br /&gt;
**Population Attributable Risk (PAR):    $PAR= CI_{Total} - CI_{Not exposed}$&lt;br /&gt;
**Population Attributable Risk Percent $(PAR\%)$: $PAR\%$ = $\frac{(CI_{Total}-CI_{Not exposed})} {CI_{total}}$&lt;br /&gt;
&lt;br /&gt;
*Bias: A barrier to internal validity&lt;br /&gt;
**Causes of bias: Any systematic error in the design, conduct or analysis of a study that results in a distorted estimate of the relationship between an exposure and o*utcome; observed results different than true results. &lt;br /&gt;
*Impact of bias: makes it appear as if there is an association when there really is none (bias away form the null); mask an association when there really is one (bias toward the null).&lt;br /&gt;
*Reasons we get wrong answer:&lt;br /&gt;
*(1)Selection bias: who is selected or retained in a study distorts your estimates of the truth. Example may be selection bias due to different retention in the study.&lt;br /&gt;
**Mechanisms to reduce bias:&lt;br /&gt;
**Ensure proper selection of study subjects (chose groups from the same source population; try lists of people that are more inclusive; use methods that result in high recruitment rates).&lt;br /&gt;
**Minimize loss-to-follow up: keep participants happy and in touch with study team; review non-respondents to understand characteristics.&lt;br /&gt;
&lt;br /&gt;
*:(2)Information bias: the quality of your information distorts your estimate of the true association. Examples include surveillance bias, non-differential misclassification of hypertension, reporting bias and differential misclassification. Sources of measurement error/misclassification: normal variability or imprecision in measure, error due to subconscious or conscious decisions by the participant or investigator.&lt;br /&gt;
&lt;br /&gt;
*:(3)Confounding bias: differences between cases and controls or exposed and unexposed distorts your estimates of the truth. A variable is a confounder if it is a known risk factor for the outcome, it is associated with the exposure but not a result of the exposure. These three conditions are necessary for a variable to be considered as a confounder. &lt;br /&gt;
&lt;br /&gt;
*:(4)Chance: the luck of draw gets you a study sample that is not representative of the larger population.&lt;br /&gt;
**Strategies to handle confounding: (1) in study design – individual matching, group matching, randomization (experimental) studies; (2) in data analysis – stratification, adjustment.\ &lt;br /&gt;
Matching in a case-control study: &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text align:center;width:25%&amp;quot;border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  || Control Exposed || Control Unexposed	&lt;br /&gt;
|-&lt;br /&gt;
| Case Exposed || a || b &lt;br /&gt;
|-&lt;br /&gt;
|Case Unexposed || c ||d&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Concordant pairs: both case and control exposed; neither case nor control exposed.&lt;br /&gt;
Discordant pairs: case exposed but control not exposed; control exposed but case not exposed.&lt;br /&gt;
*Matched analysis: Odds ratio (only based on discordant pairs) $Odds\, Ratio =\frac {b} {c}.$&lt;br /&gt;
&lt;br /&gt;
''Interpretation'': If there is an association between exposure and outcome, it is not due to any factors that were matched on; you cannot conduct analyses for matched variables and outcome.&lt;br /&gt;
*Randomization: Random allocation of exposure/”treatment” by investigator, ensure that the two groups (exposed &amp;amp; unexposed) are the same except for exposure of interest, able to control for both known and unknown confounders because distribution of these “3rd variables” should be equally distributed between the groups.&lt;br /&gt;
*Stratification: Examine the relationship between exposure and outcome within each stratum of a potential confounding variable; holding the confounding variable constant. &lt;br /&gt;
*Adjustment: A statistical technique that can be used to examine what the association between exposure and outcome would be IF the confounder was not associated with the exposure. &lt;br /&gt;
&lt;br /&gt;
Example following is age-adjustment.&lt;br /&gt;
&lt;br /&gt;
[[Image:MSHS_IntroEpi_Fig4.png]]&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
[[http://www.sciencedirect.com/science/article/pii/S1631069107001072 This article]] reviews, from some important examples, the classical methodological approach for discussing causality in epidemiology. Coronary hear disease (CHD) prevention has largely benefited in the past from the development of epidemiological research, however, the opposition association-causation is currently raised from observational data. The easy identification of DNA polymorphisms has prompted new CHD etiological research in the past 10 years. Causality of the associations presents some special characteristics when genes are involved: necessity of replication, Mendelian randomization, which might prove to be important in future research.&lt;br /&gt;
&lt;br /&gt;
[[http://www.sciencedirect.com/science/article/pii/S0020748912004166 This article]],studies retrospectively the relationship between surveillance, staffing, and serious adverse events in children on general care postoperative units. The paper investigates these hypotheses: (1) the relationship between patient factors and surveillance would be moderated by staffing (i.e., registered nurse hours per patient per shift), and (2) the relationship between staffing and serious adverse events would be mediated by surveillance.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
*[http://www.distributome.org/V3/calc/StudentCalculator.html Student Calculator]&lt;br /&gt;
*[http://socr.umich.edu/Applets/Normal_T_Chi2_F_Tables.html Normal T Chi-Squared F Tables]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
&lt;br /&gt;
How do we learn about existence of outbreaks?&lt;br /&gt;
:a. cases call health departments directly&lt;br /&gt;
:b. clinicians&lt;br /&gt;
:c. laboratories&lt;br /&gt;
:d. all of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the case of obesity, neighborhood access to healthy food stores represents which aspect of the epidemiologic triad?&lt;br /&gt;
:a. host&lt;br /&gt;
:b. agent&lt;br /&gt;
:c. vector&lt;br /&gt;
:d. environment&lt;br /&gt;
:e. all of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Detroit population had 1 million people without lung cancer in 2000, and 700,000 people without lung cancer in 2010.  During that time period, 17,000 people were newly diagnosed with lung cancer.  What was the incidence rate for lung cancer in Detroit from 2000 to 2010 (expressed per 100,000 person-years)?&lt;br /&gt;
:a. 0.002 lung cancer cases per 100,000 person years&lt;br /&gt;
:b. 200 lung cancer cases per 100,000 person years&lt;br /&gt;
:c. 270 lung cancer cases per 100,000 person years&lt;br /&gt;
:d. 243 lung cancer cases per 100,000 person years&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a fixed population, what happens to the prevalence of a disease when the incidence increases slightly, considering the different duration scenarios below?&lt;br /&gt;
:a. The prevalence increases if the duration of disease is increasing or stays the same&lt;br /&gt;
:b. The prevalence increases if the duration of disease is decreasing rapidly&lt;br /&gt;
:c. The prevalence decreases if the duration of disease is increasing&lt;br /&gt;
:d. The prevalence decreases if the duration of disease stays the same&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ann Arbor’s Mortality Rates from Diabetes Mellitus among whites, 2002- 2012.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center:width:25% border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Age groups (years)	||Age-specific rates (per 100,000)||	Michigan standard population ||	Expected number of deaths&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;20||	20	||2,000,000||	&lt;br /&gt;
|-&lt;br /&gt;
|20-39||	10 ||	3,000,000 ||&lt;br /&gt;
|-	&lt;br /&gt;
|40-59	||5	||1,000,000||&lt;br /&gt;
|-	&lt;br /&gt;
|&amp;gt;60||	30||	4,000,000||&lt;br /&gt;
|-	&lt;br /&gt;
|Total	|| ||	10,000,000 ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What is the age-adjusted mortality rate from diabetes among whites according to the table above?&lt;br /&gt;
:a. 40.2 deaths per 100,000&lt;br /&gt;
:b. 19.5 deaths per 100,000&lt;br /&gt;
:c. 1.9 death per 100,000&lt;br /&gt;
:d. 20.4 deaths per 100,000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given the information above, what is the Standardized Mortality Ratio (SMR) if the observed deaths in the white population are 3000?&lt;br /&gt;
:a. 1.54&lt;br /&gt;
:b. 5.02&lt;br /&gt;
:c. 1.69&lt;br /&gt;
:d. 0.65&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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;
:True&lt;br /&gt;
:False&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sequential testing tends to have higher net specificity than specificity of a single test.&lt;br /&gt;
:True&lt;br /&gt;
:False&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. Use this table to answer the following questions:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center:width:25% border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2 rowspan=2| || colspan=2|Gold standard	&lt;br /&gt;
|-&lt;br /&gt;
|Condition Positive||Condition negative&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=2| Result of New Test||	Test Positive ||80||70&lt;br /&gt;
|-	&lt;br /&gt;
|Test Negative	||10	||240&lt;br /&gt;
|-	&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
What is the sensitivity of the new 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;
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;
&lt;br /&gt;
What is the positive 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;
Understanding health behaviors that may protect against infection with the flu in population-dense areas is of great interest to epidemiologists. To determine if proper hand washing may prevent flu transmission, investigators recruited 834 students from a university dormitory to participate in a research study. At baseline, 74 individuals were experiencing flu-like symptoms and tested positive for active antibodies against the flu virus (meaning they in fact, had the flu) and thus, were not enrolled in the research study. The students that were not ill with the flu at baseline were followed for 12 months with no loss to follow-up. Researchers asked students to contact the study team when they exhibited flu-like symptoms so that they could be tested for the flu virus. During the course of follow-up, 379 students were diagnosed with the flu. Of the students enrolled in this study, 60% reported improper hand-washing behaviors. Of the students that were diagnosed with the flu during follow-up, 280 of them reported improper hand-washing.&lt;br /&gt;
&lt;br /&gt;
:a. What type of study is this?&lt;br /&gt;
:b. Why is this type of study adequate for this particular situation?&lt;br /&gt;
:c. Imagine that you are the investigator picking the appropriate study design to answer this question, what might you have worried about in picking this design?&lt;br /&gt;
:d. What is the best measure of association to test the relationship between hand washing and incident flu? Why?&lt;br /&gt;
:e. Calculate and interpret the above measure of association using a 2X2 table.&lt;br /&gt;
:f. If proper hand-washing behavior were to be used by the students who exhibited improper hand-washing techniques, how many cases per 1000 would be prevented? Interpret your findings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Chikungunya is a relatively rare viral disease transmitted by mosquitoes. This unpleasant disease is characterized by high fevers, nausea, vomiting, and crippling muscle and joint pain that may last for weeks to years as well as retinal damage. Chikungunya was recently detected in the Caribbean, prompting local epidemiologists to conduct a study on the Caribbean Island of Martinique to better understand local risk factors for Chikungunya. Researchers selected 100 individuals who tested positive for Chikungunya infection, as well as 200 individuals that did not have Chikungunya. Though they looked at multiple risk factors, the epidemiologists focused primarily on individuals’ use or non-use of mosquito repellent. Participants were asked about their repellent use (yes/no) in the 12 months preceding enrollment in the study. In their eventual publication, researchers reported that in total, 142 of the participants reported not using repellent. It was also noted that 31% of the participants who did not have Chikungunya reported no repellent use.&lt;br /&gt;
:a. What type of study design was used in this example?&lt;br /&gt;
:b. Why is this type of study appropriate for this particular situation?&lt;br /&gt;
:c. Given that the participants were asked about their use of repellent in the past, what is a potential limitation of this study? &lt;br /&gt;
:d. Set up a 2X2 table to assess the relationship between Chikungunya infection and improper mosquito repellent use.&lt;br /&gt;
:e. What is the appropriate measure of association for this study? Explain why.&lt;br /&gt;
:f. Calculate and interpret your measure of association.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A group of epidemiologists at a prestigious university decided to conduct a survey of public health students to investigate the relationship between cramping of the hands and creating 2x2 tables by hand. This survey was administered just once and there was no follow-up of the participants.&lt;br /&gt;
:a. What type of study is this?&lt;br /&gt;
:b. What type of measure of association is appropriate for this study? Why?&lt;br /&gt;
:c. Our epidemiologists found that 75% of study participants who had hand cramping reported excessive 2x2 table making. Are the epidemiologists justified in claiming that this study provides causal evidence that 2x2 table making leads to hand cramping? Why?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Parents of children who were born with birth defects may be more likely to remember any drug or exposure that occurred during pregnancy than parents of children born without birth defects. This is an example of what type of bias?&lt;br /&gt;
:a. interviewer bias&lt;br /&gt;
:b. recall bias&lt;br /&gt;
:c. loss to follow-up&lt;br /&gt;
:d. non-differential misclassification&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using data from the Nurses Health Study, the association between self-reported frequency of sunburns and melanoma was examined. When questioned after the diagnosis of melanoma, some women with melanoma may have exaggerated their frequency of sunburns especially if they were concerned that sun exposure was a reason they got melanoma. This is an example of:&lt;br /&gt;
:a. interviewer bias&lt;br /&gt;
:b. loss to follow-up&lt;br /&gt;
:c. differential misclassfication&lt;br /&gt;
:d. non-differential misclassification&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Epidemiology  Epidemiology Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_IntroEpi}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_DesignOfExperiments&amp;diff=13546</id>
		<title>SMHS DesignOfExperiments</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_DesignOfExperiments&amp;diff=13546"/>
		<updated>2014-08-29T16:49:39Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Design of Experiments ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Design of experiments is a systematic, rigorous approach to problem solving that applies principles and techniques at the data collection stage so as to ensure the generation of valid, supportable and defensible conclusions. Design of experiments can be used at the point of greatest leverage to reduce costs by speeding up the design process, reducing late engineering design changes and reducing product material and labor complexity. It is also powerful tools to achieve manufacturing costs savings by minimizing process variation and reducing rework, and the need for inspection. The lecture presents a general overview of DOE and an introduction to some fundamental concepts, objectives, steps and design guidelines to assist in conducting designed experiments.&lt;br /&gt;
&lt;br /&gt;
=== Motivation===&lt;br /&gt;
Experiment would be the natural way to implement a study and achieve the desired objectives. So the next question is how can these experiments and studies be realized, that is we need a blueprint for planning the study or experiment including ways to collect data and to control study parameters for accuracy and consistency. What are the key factors in a process? At what settings would the process deliver acceptable performance? What are the main and interaction effects in the process and what settings would bring out less variation in the output? &lt;br /&gt;
Design of Experiment would be the answer to those questions. Experiments can be designed in many different ways to collect the information of which process inputs have a significant impact on the process output and what the target level of those inputs should be to achieve a desired output. There are four general problem areas in which design of experiment may be applied: &lt;br /&gt;
*Comparative: the designer is interested in assessing whether a change in a single factor has in fact resulted in a change/improvement to the process as a whole.&lt;br /&gt;
*Screening and characterizing: the designer is interested in understanding the process as a whole in the sense that they can have a ranked list of the importance of factors that can affect the process.&lt;br /&gt;
*Modeling: the designer is interested in functionally modeling the process with the output being a good fit mathematical function, and to have good estimates of the coefficients in that function..&lt;br /&gt;
*Optimizing: the designer is interested in determining the optimal settings of the process factors, that is to determine for each factor the level of the factor that optimizes the process response. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
The most common components in design of experiments(DOE): &lt;br /&gt;
*Comparison: in some fields of study it’s not possible to have independent measurements to a traceable standard and comparisons between treatments are much more valuable and preferable. To make inference about effects, associations or predictions, one typically has to compare different groups subjected to distinct conditions. &lt;br /&gt;
*Randomization: the process of assigning individuals at random to groups in an experiment. It requires that we make allocation of (controlled variables) treatments to units using some random mechanism. Random does not mean haphazard and great care needs to be taken to make sure appropriate random methods are used.&lt;br /&gt;
*Experimental vs. observational studies: there are many situations where randomized experiments are impractical. Therefore, we cannot reduce causality or effects of various treatments on the response measurement. Observational studies are retrospective or prospective studies where the investigator doesn’t have control over randomization of treatments to subject or units. In these cases, the subjects or units fall naturally within a treatment group.&lt;br /&gt;
*Replication: all measurements, observations or data collection are usually subject to variation and uncertainty. They are repeated and full experiments are replicated to help identify the sources of variation to better estimate the true effects of treatments, to further strengthen the experiment’s reliability and to add to the existing knowledge of the topic. &lt;br /&gt;
*Blocking: the arrangement of experimental units into groups consisting of units that are similar to one another. It reduced known but irrelevant sources of variation between units and allows greater precision in the estimation of the source of variation under study. &lt;br /&gt;
*Orthogonality：it concerns the forms of contrasts that can be legitimately and efficiently carried out. With independence between contrasts, each orthogonal treatment provides different information to the others. The goal is to completely decompose the variance or the relations of the observed measurements into independent components.&lt;br /&gt;
*Factorial experiments: are more efficient at evaluating the effects and possible interactions of several factors. DOE is built on the foundation of the analysis of variance, which partitions the observed variance into components according to what factors the experiment must estimate or test.&lt;br /&gt;
*Placebo:  is a sham or simulated medical intervention that has no direct health impact but may result in actual improvement of a medical condition or disorder. Of such sham effect is observed, it is called a placebo effect. Common placebos are inert tablets, sham surgery and other procedures based on false information. An example could be giving a patient a pill identical to the actual treatment pill but without treatment ingredients. Typically all patients are informed that some will be treated using the drug and some will receive the insert pill, however the patients are blinded as to whether they actually received the drug or the placebo. Such an intervention may cause the patient to believe the treatment will change their condition, which may produce a subjective perception of a therapeutic effect.&lt;br /&gt;
&lt;br /&gt;
'''Components of DOE:''' &lt;br /&gt;
*Factors (inputs): including controllable and uncontrollable variables. The former refers to the factors that we can control like how big is the dose or how often is the treatment taken by the patients. The later refers to factors we have no power with like the factors from the environment: air condition, temperature or humidity. People are generally considered as noise factor, which is an uncontrollable factor that causes variability under normal operating conditions but we can control it during the experiment using blocking and randomization.&lt;br /&gt;
*Levels (settings of each factor): examples include particular level of dosage for evaluation.&lt;br /&gt;
*Response (output): consider the test on a new drug. The output could be the frequency patients having the struck or their need for drugs. Experiments often desire to avoid optimizing the process for on response at the expense of another and important outcomes are measured and analyzed to determine the factors and their setting that will provide the best overall outcome.&lt;br /&gt;
&lt;br /&gt;
'''Objectives of DOE:'''&lt;br /&gt;
*Comparing alternatives: DOE allows us to make an informed decision that evaluates both the quality and the cost.&lt;br /&gt;
*Identify significant factors that affect the output: separating the vital few from the trivial many.&lt;br /&gt;
*Achieving an optimal process output.&lt;br /&gt;
*Reducing variability.&lt;br /&gt;
*Minimizing, maximizing or targeting an output.&lt;br /&gt;
*Improving process or product robustness to ensure the experiments fits with varying conditions.&lt;br /&gt;
*Balance tradeoffs between multiple quality characteristics that require optimization.&lt;br /&gt;
&lt;br /&gt;
'''DOE guidelines:''' &lt;br /&gt;
*DOE guidelines address the questions outlined above by stipulating factors to be tested, levels of the factors and structure and layout of experimental conditions. To sum up, DOE aims to come up with an experiment that can obtain the required information in a cost effective and reproducible manner. &lt;br /&gt;
*Unexplained variation, in addition to measurement error, can obscure the results. Errors can be unexplained variation that is either within or between experiment runs.&lt;br /&gt;
*Noise factors: uncontrollable factors that induce variation under normal operating conditions. For example multiple shifts, humidity or raw materials can be built into the experiment so that variation doesn’t lumped into unexplained error.&lt;br /&gt;
*Correlation. Consider two factors that vary together may be highly correlated without one causing the other or they may both the cause of a third factor. &lt;br /&gt;
*The combined effects or interactions. Consider growing rose, sufficient water will be benefit for its growth though too much water may be harmful for the rose. Factors may generate non-linear effects that are not additive, but these can only be studied with more complex experiments involving more than 2 level settings, such as quadratic or cubic.&lt;br /&gt;
&lt;br /&gt;
'''DOE process:'''&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_Design_of_Experiment_Fig_1_DOE_Process_Gallaway_07232014.jpg|500px]] &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test of means – one factor experiment:'''&lt;br /&gt;
One of the most common types of experiments is the comparison of two process methods, or two methods of treatment. One of the most straightforward methods to evaluate a new process method is to plot the results on an SPC chart that also includes historical data from the baseline process, with established control limits. Then apply the standard rules to evaluate out-of-control conditions to see if the process has been shifted. You may need to collect several subgroups worth of data in order to make a determination, although a single subgroup could fall outside of the existing control limits. &lt;br /&gt;
An alternative way to control chart approach is to use F-test to compare the means of alternate treatments and this is done automatically with ANOVA (analysis of variance). Consider the following example where three treatments are analyzed with the following data:&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:45%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  rowspan=2 | || colspan=3| '''Treatment''' || ||&lt;br /&gt;
|-&lt;br /&gt;
|'''A Usual Route''' || '''B (alternate)''' || '''C(alternate)''' || '''Variance''' || '''Mean'''&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=10| '''Time in Minutes'''|| 27.0 || 26.0 || 29.5 || || &lt;br /&gt;
|-&lt;br /&gt;
| 31.03 || 33.0 || 25.0 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 28.5|| 26.5 || 28.5 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 26.0|| 27.5 || 25.5 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 27.5|| 29.0 || 24.0 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 29.0|| 27.5 || 24.0 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 33.0|| 26.5 || 28.0 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 35.0|| 27.0 || 26.0 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 28.0|| 28.0 || 25.5 || ||&lt;br /&gt;
|-&lt;br /&gt;
| 29.0|| 32.0 || 26.5 || ||&lt;br /&gt;
|-&lt;br /&gt;
|Mean \((\bar Y)\)|| 29.4||28.3||26.6||1.99 ||&lt;br /&gt;
|-&lt;br /&gt;
|Variance \(s^2\)||7.9 ||5.7 ||3.0 || || 5.51&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The F-test analysis is the basis for model evaluation of both single factor and multi-factor experiments. This analysis is commonly output as an ANOVA table by statistical analysis software as illustrated in the table 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:45%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  colspan=7| '''AVONA - Analysis of Variance Table''' &lt;br /&gt;
|-&lt;br /&gt;
|Source|| Sum of Squares||  DF  || Mean Square || F-Ratio ||Probability || Significant&lt;br /&gt;
|-&lt;br /&gt;
| Between Groups ||39.80 ||  2  || 19.90 || 3.61 || 0.0408  || Yes&lt;br /&gt;
|-&lt;br /&gt;
| Within Groups ||148.90||  27  || 5.51 || || ||&lt;br /&gt;
|-&lt;br /&gt;
| Total ||188.70||  29  ||  || || ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0.0408: there is only 4.08% probability that a Model F-ratio this large could occur due to noise (random chance). In other words, the three routes differ significantly in terms of the time taken to reach home from work.&lt;br /&gt;
&lt;br /&gt;
ANOVA: \(H_0: μ_1=⋯=μ_a  vs.H_a\)at least one mean is different&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:45%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Source|| Sum of Squares||  DF  || Mean Square || F-Ratio &lt;br /&gt;
|-&lt;br /&gt;
| Between Groups ||$ SS_{treatment}= ∑_{i=1}^{a} n_i (\bar y_{l.}-\bar y..)^2 $ || $a-1$ ||$ MS_{treatment}=\frac {SS_{treatment}}{a-1}$|| $ F =\frac {MS_{treatment}}{MS_{error}}$ &lt;br /&gt;
|-&lt;br /&gt;
| Within Groups ||$SS_{error} = SS_{total} - SS_{treatment}$||  $N-a$  || $MS_{error}=\frac{SS_{error}} {N-a}$ ||&lt;br /&gt;
|-&lt;br /&gt;
| Total || $SS_{treatment} = ∑_{i=1}^{a} ∑_{j=1}^{n_{i}} (\bar y_{ij}-\bar y..)^2 $  || $N-1$ ||  ||&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We reject the null hypothesis of equal treatment means if F_0&amp;gt;F_(α,a-1,a(n-1))&lt;br /&gt;
Note: a is the number of treatments, n_i is the size of sample in the i^th group, α is the level of significance, y_ij is the measurement from group i, observation index j, (y_(..) ) ̅ is the grand mean of all the observations, (y_(i.) ) ̅ is the grand mean f the i^th treatment group. ANOVA will be further studied in the section of ANOVA later.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
*[http://www.cancer.org/healthy/stayawayfromtobacco/index This article] presents an observational study of smoking effects on cancer. It presents various side effects of tobacco on human health and provided guide to quit smoking. This article illustrated the who study in ten sections where each section is fully developed in a clearly stated form with questions and answers format. The whole article is well organized and prepares people with enough knowledge of the reason behind quitting smoking as well as suggestions and programs help people quit smoking. This is a typical observational study.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://arc.aiaa.org/doi/abs/10.2514/2.3153?journalCode=ja  This article] brought together an empirical drag prediction model plus design of experiment, response surface and data-fusion methods with computational fluid dynamics (CFD) to provide a wing optimization system. The system presented allows high-quality designs to be found using a full three-dimensional CFD code without the expense of direct searches. The meta-models built are shown to be more accurate than the initial empirical model or than simple response surfaces based on the CFD data alone. Data fusion is achieved by building a response surface kriging of the differences between the two drag prediction tools, which are working at varying levels of fidelity. It then uses kriging with empirical tool to predict the drags coming from the CFD code, which is much quicker to use than direct searches of the CFD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://www.tandfonline.com/doi/abs/10.1080/01621459.1972.10481253#.U6HGyBZRXKw This article] illustrated certain numerical approximations for finding one and two stage bioassay designs, which produce small posterior variance using a one-parameter logistic distribution. It discussed the use of two prior distribution: one for design and the other for inference with graphs for designing experiments when the prior distribution are normal. These graphs illustrate the importance of using additional dose levels when the variance of the prior distribution is large.&lt;br /&gt;
&lt;br /&gt;
===Software=== &lt;br /&gt;
*[http://socr.ucla.edu/htmls/SOCR_Distributions.html  SOCR Distributions]&lt;br /&gt;
&lt;br /&gt;
*[http://socr.ucla.edu/htmls/SOCR_Analyses.html SOCR Analyses] &lt;br /&gt;
&lt;br /&gt;
*[http://socr.ucla.edu/htmls/SOCR_Charts.html  SOCR Charts] &lt;br /&gt;
&lt;br /&gt;
*[http://www.socr.ucla.edu/htmls/SOCR_ChoiceOfStatisticalTest.html SOCR Choice Of Statistical Test]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
Suppose two researchers wanted to determine if aspirin reduced the chance of a heart attack. Researcher 1 studied the medical records of 500 patients. For each patient, he recorded whether the person took aspirin every day and if the person had ever had a heart attack. Then he reported the percentage of heart attacks for the patients who took aspirin every day and for those who did not take aspirin every day.&lt;br /&gt;
Researcher 2 also studied 500 people. He randomly assigned half of the patients to take aspirin every day and the other half to take a placebo everyday. After a certain length of time, he reported the percentage of heart attacks for the patients who took aspirin every day and for those who did not take aspirin every day. Suppose that both researchers found that there is a statistically significant difference in the heart attack rates for the aspirin users and the non-aspirin users and that aspirin users had a lower rate of heart attacks. Can both researchers conclude that aspirin caused the reduction?&lt;br /&gt;
:(a) No, only researcher 2 can conclude this.&lt;br /&gt;
:(b) No, only researcher 1 can conclude this.&lt;br /&gt;
:(c) Yes, because aspirin is known to reduce heart attacks.&lt;br /&gt;
:(d) Yes, because aspirin users had a larger heart attack rate in both studies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that you were hired as a statistical consultant to design a study to examine the impact of a new medicine vs. a current medicine on lowering blood pressure. 50 patients volunteer to participate in the study. What design will you recommend?&lt;br /&gt;
:(a) Completely randomized design with two factors.&lt;br /&gt;
:(b) Completely randomized design with two factors and single blind.&lt;br /&gt;
:(c) Completely randomized design.&lt;br /&gt;
:(d) Completely randomized design with two factors and double blind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next four questions are based on the following: &lt;br /&gt;
Hospital floors are usually covered by bare tiles. Carpets would cut down on noise but might be more likely to harbor germs. To study this possibility, investigators randomly assigned 8 of 16 available hospital rooms to have carpet installed. The others were left bare. Later, air from each room was pumped over a dish of agar. The dish was incubated for a fixed period, and the number of bacteria colonies was counted.&lt;br /&gt;
&lt;br /&gt;
*1.Select the appropriate statistical term for the 8 rooms left bare.&lt;br /&gt;
*:(a) Treatments&lt;br /&gt;
*:(b) Experimental Units&lt;br /&gt;
*:(c) Control Group&lt;br /&gt;
*:(d) Response&lt;br /&gt;
&lt;br /&gt;
*2.Select the appropriate statistical term for the 16 hospital rooms.&lt;br /&gt;
*:(a) Response&lt;br /&gt;
*:(b) Treatments&lt;br /&gt;
*:(c) Experimental Units&lt;br /&gt;
*:(d) Control Group&lt;br /&gt;
&lt;br /&gt;
*3.Select the appropriate statistical term for number of colonies in a dish.&lt;br /&gt;
*:(a) Treatments&lt;br /&gt;
*:(b) Control Group&lt;br /&gt;
*:(c) Response&lt;br /&gt;
*:(d) Experimental Units&lt;br /&gt;
&lt;br /&gt;
*4.Select the appropriate statistical term for number of colonies in a dish.&lt;br /&gt;
*:(a) Treatments&lt;br /&gt;
*:(b) Response&lt;br /&gt;
*:(c) Experimental Units&lt;br /&gt;
*:(d) Control Group&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A psychologist is examining the effect of showing pictures on learning of words by seven-year-olds. The seven-year-olds are randomly assigned to two groups. The experimental group is shown the word along with the picture. The control group is shown only the word. At the end of the experiment, the subjects are given a test on the number of words they get right. This is an example of:&lt;br /&gt;
:(a) A blind study&lt;br /&gt;
:(b) An experiment with a design flaw&lt;br /&gt;
:(c) A double blind study&lt;br /&gt;
:(d) A well-designed experiment&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose that students A and B are working for the university. The registrar asks student A to calculate the mean and SD of the GPA's for the Fall 2005 freshmen class. He asks student B to design a sampling strategy to evaluate the attitude of the undergraduates at the university toward undergraduate teaching.&lt;br /&gt;
:(a) Student A is doing descriptive statistics and student B is doing inferential statistics.&lt;br /&gt;
:(b) Student A is doing inferential statistics and student B is doing descriptive statistics.&lt;br /&gt;
:(c) Both students are doing descriptive statistics.&lt;br /&gt;
:(d) Both students are doing inferential statistics.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the Department of Statistics, we intend to examine the effect of using computers in Statistics 10 on the attitudes of students toward statistics. We offer ten lectures of Statistics 10 in an academic year. Five of these sections are randomly assigned to the experimental group and the other five are assigned to the control group. The experimental group will go to lecture, section, and computer lab. The control group will only go to lecture and section, but will not do the computer lab. The attitude of the students toward statistics is measured before and after the course. This study is:&lt;br /&gt;
:(a) A double blind study&lt;br /&gt;
:(b) A well-designed experiment&lt;br /&gt;
:(c) A blind study&lt;br /&gt;
:(d) Not a randomized experiment&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An office manager wonders whether there is any relationship between drinking coffee before 10 am and alertness. He selects at random 3 days of the week, and in those days, he compared the alertness level of 25 employees who usually drink coffee before 10 am and 25 employees who do not usually drink coffee before 10 am. Is this an observational or experimental study?&lt;br /&gt;
:(a) We need more information to decide&lt;br /&gt;
:(b) This is an experimental study&lt;br /&gt;
:(c) This is an observational study&lt;br /&gt;
:(d) This is a combination of experimental and observational study&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A major car manufacturing company intends to find out if cars get better millage with premium instead of regular unleaded gasoline. They also would like to know if the size of the car has any effect on fuel economy. 96 volunteers who are similar in age, experience and style of driving participate in the study. The drivers are randomly assigned to the premium and regular groups. The drivers assigned to the premium and regular groups are then randomly assigned to drive a small, medium, or large car. All of the drivers are asked to keep a driving log. What is the design used for this study?&lt;br /&gt;
:(a) randomized block design&lt;br /&gt;
:(b) Completely randomized two factor experiment&lt;br /&gt;
:(c) Completely randomized experiment with one factor&lt;br /&gt;
:(d) Completely randomized experiment with matching&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this research situation, decide what statistical procedure would most likely be used to answer the research question posed. Assume all assumptions have been met for using the procedure.&lt;br /&gt;
Is ethnicity related to political party affiliation (Republican, Democrat, Other)?&lt;br /&gt;
:(a) Test the difference in means between two paired or dependent samples.&lt;br /&gt;
:(b) Use a chi-squared test of association.&lt;br /&gt;
:(c) Test one mean against a hypothesized constant.&lt;br /&gt;
:(d) Test the difference between two means (independent samples).&lt;br /&gt;
:(e) Test for a difference in more than two means (one way ANOVA).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a large mid-western university with 30 different departments, the university is considering eliminating standardized scores from their admission requirements. The university wants to find out whether the students agree with this plan. They decide to randomly select 100 students from each department, send them a survey, and follow up with a phone call if they do not return the survey within a week. What kind of sampling plan did they use?&lt;br /&gt;
:(a) Stratified random sampling&lt;br /&gt;
:(b) Simple random sampling&lt;br /&gt;
:(c) Cluster sampling&lt;br /&gt;
:(d) Multi-stage sampling&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
*[http://wiki.stat.ucla.edu/socr/index.php/AP_Statistics_Curriculum_2007_IntroDesign  SOCR]&lt;br /&gt;
 &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Design_of_experiments  Design of Experiments Wikipedia]&lt;br /&gt;
 &lt;br /&gt;
*[https://www.moresteam.com/toolbox/design-of-experiments.cfm  Design of Experiment Tutorial]&lt;br /&gt;
&lt;br /&gt;
*[http://www.itl.nist.gov/div898/handbook/pmd/section3/pmd31.htm  What is DOE, Engineering Statistics Handbook]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_DesignOfExperiments}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ResamplingSimulation&amp;diff=13545</id>
		<title>SMHS ResamplingSimulation</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ResamplingSimulation&amp;diff=13545"/>
		<updated>2014-08-29T16:48:26Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /*  Scientific Methods for Health Sciences - Resampling and Simulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Resampling and Simulation ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
In statistics, ''resampling'' and ''simulation'' are two important concepts with widely application in researches and projects from various fields. ''Resampling'' is any of a variety of methods when the following processes are implemented: (1) estimating the precision of sample statistics (medians, percentiles) by using subsets of available data (jackknifing) or drawing randomly with replacement from a set of data (bootstrapping); (2) exchanging labels on data points when performing significance tests (permutation tests); (3) validating models by using random subsets (bootstrapping, cross validation). We are going to introduce some common resampling techniques including bootstrapping, jackknifing, cross-validation and permutation tests. ''Simulation'' is the imitation of what’s happening in the real world or system over time. We usually apply simulation after a model, which represents the key characteristics of the process is developed. Simulation is widely applied in many contexts such as simulation of technology for performances optimization, testing and video games. It is often applied when the real system is not accessible or hard, costly to apply and it provides us with an easier way to get the data or apply the system for the purpose of testing and etc. We are going to present an introduction to simulation including the basic methods, application, advantages and limits.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
Consider we want to evaluate the quality of a system or process, but the data is very hard to collect. How can we evaluate without having to actually taking samples from the system? In this case, it would be great if we know the characteristics of the data set, say if we know it follows a normal distribution, then we could easily generate a series of data following a normal distribution and use these to test the system. In fact, we can easily generate a large amount of dataset and test the system with more power. Consider another case, where instead of knowing the exact characters of the data, we only have very few data from the last few years where they follow a certain pattern. Here, we can use these dataset to work out the characteristic of the data and generate new dataset from the model we developed. A popular example is the bootstrapping method in the interest rate model. In order to learn more about the resampling and simulation methods, we are going to introduce the fundamental concepts, rules and methodologies commonly applied in these fields to prepare students with necessary background in resampling and simulation.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
==== Resampling methods====&lt;br /&gt;
Resampling methods use a computer to generate a large number of simulated samples, patterns in these samples are then summarized and analyzed. However, in resampling methods, the simulated samples are drawn from the existing sample of data you have in your hands and not from a theoretically defined DGP. Thus, in resampling methods, the researcher doesn’t know or control the DGP but the goal of learning about the DGP remains.&lt;br /&gt;
&lt;br /&gt;
*Principles: assumption is that there is some population DGP that remains unobserved and that DGP produced one sample of data one had in hand; all information about the population contained in the original sample of data is also contained in the distribution of these simulated samples. Then draw a new ‘sample’ of data that consists of a different mix of the cases in original sample and repeats many times so we have lots of new simulated ‘samples’. Also, one can think that the sample of data one had in hands is reasonable representation of the population, and the distribution of parameter estimates produced from running a model on a series of resampled data sets will provide a good approximation of the distribution in the population. Resampling method can either be parametric or non-parametric.&lt;br /&gt;
&lt;br /&gt;
====Bootstrapping====&lt;br /&gt;
Bootstrapping is a statistical method for estimating the sampling distribution of an estimator by sampling with replacement from the original sample, most often with the purpose of deriving robust estimates of standard errors and confidence intervals of a population parameter like median, odds ratio or regression coefficient. This technique allows estimation of the sampling distribution of almost any statistic using only very simple method and it falls in the broader class of resampling method. &lt;br /&gt;
&lt;br /&gt;
*Situations where bootstrapping applies: (1) when the theoretical distribution of a statistic of interest is complicated or unknown; (2) when the sample size is insufficient for straightforward statistical inference; (3) when power calculations have to be performed, and a small pilot sample is available. &lt;br /&gt;
&lt;br /&gt;
*It is the practice of estimating properties of an estimator by measuring those properties when sampling from an approximating distribution, say the empirical distribution of the observed data. It is often used as a robust alternative to inference based on parametric assumptions when those assumptions are in doubt, or where parametric inferences is impossible or requires very complicated formulas for the calculation of standard errors. It may also be used for constructing hypothesis tests.&lt;br /&gt;
&lt;br /&gt;
*The basic idea of bootstrapping is that inference about a population from sample data (sample &amp;amp;rarr; population) can be modeled by resampling the sample data and perform inference on (resample &amp;amp;rarr; sample). More formally, the bootstrap works by treating inference of the true probability distribution, given the original data, as being analogous to inference of the empirical distribution given the resampled data. The accuracy of inferences regarding the empirical distribution using the resample data can be assessed because we know the distribution. If the empirical distribution is reasonable approximation to the true probability distribution, then the quality of inference on true probability distribution can in turn be inferred. &lt;br /&gt;
&lt;br /&gt;
*Common process: (1) begin with an observed sample of size N, (2) generate a simulated sample of size N by drawing observations from your observed sample independently and with replacement, (3) compute and save the statistic of interest, (4) repeat this process many times (say 1000), (5) treat the distribution of your estimated statistics of interest as an estimate of the population distribution of that statistic. &lt;br /&gt;
&lt;br /&gt;
*Key features of the bootstrap: the draws must be independent, each observation in the observed sample must have an equal chance of being selected; the simulated sample must be of size N to take full advantage of the information in the sample; resampling must be done with replacement, if not, then every simulated sample of size N would be identical to each other and to the original sample; resampling with replacement means that in any given simulated sample, some cases might appear more than once while others will not appear at all.&lt;br /&gt;
&lt;br /&gt;
*Types of bootstrap scheme: (1) case resampling: the Monte Carlo algorithm; (2) estimating the distribution of sample mean; (3) regression; (4) Bayesian bootstrap; (5) smooth bootstrap; (6) parametric bootstrap; (7) resampling residuals; (8) Gaussian process regression bootstrap; (9) wild bootstrap; (10) block bootstrap. &lt;br /&gt;
&lt;br /&gt;
*Advantages: simplicity and straightforward to derive estimates of standard errors and confidence intervals for complex estimators of complex parameters of the distribution; appropriate to control and check the stability of the results.&lt;br /&gt;
&lt;br /&gt;
*Limitations: does not provide general finite-sample guarantees; the apparent simplicity may conceal the fact that important assumptions are being made when undertaking the bootstrap analysis where these would be more formally stated in other approaches.&lt;br /&gt;
&lt;br /&gt;
====Jackknife====&lt;br /&gt;
The Jackknife method estimates the bias and standard error of a statistic when a random sample of observations is used to calculate it. The basic idea is systematically recomputing the statistic estimate, leaving out one or more observations at a time from the sample set. From the new set of replicates of the statistic, an estimate for the bias and an estimate for the variance of the statistic can be calculated.&lt;br /&gt;
&lt;br /&gt;
*Jackknife estimate of variance tends to asymptotically to the true value almost surely. The jackknife is consistent for the sample means, sample variances, and etc.&lt;br /&gt;
&lt;br /&gt;
*Jackknife is not consistent for the sample median. In the case of a unimodal variate the ratio of the jackknife variance to the sample variance tends to be distributed as one half the square of a chi-square distribution with two degrees of freedom.&lt;br /&gt;
*It is dependent on the independence of the data. Extensions of the jackknife to allow for dependence in the data have been proposed.&lt;br /&gt;
&lt;br /&gt;
*Advantages: good at detecting outliers/influential cases. Those sub-sample estimates that differ most from the rest indicate those cases that has the most influence on those estimates in the original full sample analysis.&lt;br /&gt;
&lt;br /&gt;
*Limitations: The jackknife is less general than the bootstrap, and thus used less frequently; it does not perform well if the statistic under consideration does not change ‘smoothly’ across simulated samples; it does not perform well in small samples because you don’t end up generating many resamples.&lt;br /&gt;
&lt;br /&gt;
==== Cross-validation====&lt;br /&gt;
Cross-validation (CV) is a statistical method for validating a predictive model, assessing a statistical model on a data set that is independent of the data set used to fit the model. Subsets of the data are held out for use as validating sets; a model is fit to the remaining data (training set) and used to predict for the validation set. Averaging the quality of the predictions across the validation sets yields an overall measure of prediction accuracy. &lt;br /&gt;
&lt;br /&gt;
*Steps: (1) randomly partition the variable data into a training set and a testing set, (2) fit the model on the training set, (3) take the parameter estimates from that model, use them to calculate a measure of fit on the testing set, (4) repeat for several times and average to reduce variability.&lt;br /&gt;
&lt;br /&gt;
*Types of CV: &lt;br /&gt;
**leave-one-out CV: iterative method with number of iterations = sample size, each observation becomes the training set one time; Steps: 1) delete observation #1 from the data, 2) fit the model on observations #2-n, 3) apply the coefficients form step #2 to observation #1, calculate the chosen fit measure, 4) delete observation #2 form the data, 5) fit the model on observations #1 and #3-n, 6) apply the coefficients from step #5 to observation #2, calculate the chosen fit measure, 7) repeat until all observations have been deleted once.&lt;br /&gt;
**K-fold cross-validation, splits the data into K subsets and each is held out in turn as the validation set. This avoids self-influence. For comparison, in regression analysis method such as linear regression, each y value draws the regression line toward itself, making the prediction of that value appear more accurate than it really is. Cross-validation applied to linear regression predicts the y value for each observation without using that observation.&lt;br /&gt;
&lt;br /&gt;
*Limitations of CV: training and testing data must be random samples from the same population; will show biggest differences from in-sample measures when n is small; higher computational demand than calculating in-sample measures; subject to researcher’s selection of an appropriate fit statistic.&lt;br /&gt;
&lt;br /&gt;
====Permutation test====&lt;br /&gt;
Permutation (or randomization or re-randomization) test is a type of statistical significance test in which the distribution of the test statistic under the null hypothesis is obtained by calculating all possible values of the test statistic under rearrangements of the labels on the observed data points. It is just another form of resampling but is done without replacement.&lt;br /&gt;
&lt;br /&gt;
*Rather than assume a distribution for the null hypothesis, we simulate what it would be by randomly reconfiguring our sample lots of times (say 1000) in a way that ‘breaks’ the relationship in our sample data.&lt;br /&gt;
&lt;br /&gt;
*Suppose we have group A and group B with sample means $\bar{x}_A$ and $\bar{x}_B$ respectively and we want to test, at a 5% significance level, whether they come form the same distribution. $n_A$ and $n_B$ are the sample size for each group. A permutation test is designed to determine whether the observed difference between the sample means is large enough to reject the null hypothesis $H_0$: the two groups have identical probability distribution. The test proceeds: (1) the difference in the means between group A and B is calculated, (2) difference in sample means is calculated and recorded for each possible way of dividing these pooled values into two groups of size $n_A$ and $n_B$. The set of these calculated differences if the exact distribution of possible differences under the null hypothesis that group label does not matter, (3) the one-side p-value of the test is calculated as the proportion of sampled permutations where the difference in means was greater than or equal to $T (obs)$; the two-sided p-value of the test is calculated as the proportion of sampled permutations where the absolute difference was greater than or equal to $ABS(T(obs))$;(4) sort the recorded differences and then observe if $T(obs)$ is contained within the middle 95% of them, if not, reject $H_0$ at 5% significance level.&lt;br /&gt;
&lt;br /&gt;
====Simulation====&lt;br /&gt;
A common assumption is that the coefficients we estimate are drawn from a probability distribution that describes the larger population. With large enough sample size, according to the CLT this distribution is multivariate normal. &lt;br /&gt;
*Steps: (1) goal of simulation is to make random draws from this distribution to simulate many ‘hypothetical values’ of the coefficients, (2) the next step is to choose a QI say expected value, predicted probability, odds ratio, first difference, etc, (3) set a key variable in the model to a theoretically interesting value and the rest to their means or modes, (4) calculate QI with each set of simulated coefficients and set the variable to a new value, (5) set the variable to a new value, (6) calculate that QI with each set of simulated coefficients, (7) repeat as appropriate, (8) efficiently summarize the distribution of the computed QI at each value of our variable.&lt;br /&gt;
&lt;br /&gt;
*Advantages: provide more information than a just a table of regression output; accounts for uncertainty in the QI; flexible to many different types of models, QIs and variable specifications; after doing it once, easy to use; can be much easier than working with analytic solutions.&lt;br /&gt;
&lt;br /&gt;
*Limitations: relies on CLT to justify asymptotic normality (fully Bayesian model using MCMC could produce exact finite-sample distribution; bootstrapping would require no distributional assumption); computational intensity; large models can produce lots of uncertainty around quantity of interest.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
* [http://www.amstat.org/publications/jse/v16n2/dinov.html This article] presents the application of Central Limit Theorem using the new SOCR applet and demonstration activity. In this article, it described an innovative effort of using technological tools for improving student motivation and learning of the theory, practice and usability of the CLT probability and statistics courses. The method is based on harnessing the computational libraries developed by SOCR to design a new interactive Java applet and a corresponding demonstration activity that illustrate the meaning and power of the CLT. It included four experiments to demonstrate the assumptions, meaning and implication of CLT as well as hands-on simulation and a number of examples illustrating the theory and application of CLT. &lt;br /&gt;
&lt;br /&gt;
* [http://link.springer.com/article/10.3758/BRM.40.3.879 This article] titled Asymptotic and resampling strategies for assessing and comparing indirect effects in multiple mediator models provided an overview of simple and multiple mediation and explored three approaches that can be used to investigate indirect process. It also presents methods for contrasting two or more mediators within a single model through examples. The paper presents an illustrative example, assessing and contrasting potential mediators of relationship between the helpfulness of socialization agents and job satisfaction as well as software application of these methods including SAS, SPSS macros and etc.&lt;br /&gt;
&lt;br /&gt;
* [[SOCR_ResamplingSimulation_Activity|This article]] presents the resampling, randomization and simulation activity and illustrated the processes of sampling, resampling and randomization using the SOCR webapp. It aims to demonstrate the concepts of simulation and data generation, illustrate data resampling on a massive scale, reinforce the concept of resampling and randomization based statistical inference and demonstrate the similarities and differences between parametric-based and resampling-based statistical inference. The article provides specific steps to implement the activities and video is also provided for reference.&lt;br /&gt;
&lt;br /&gt;
* [[SOCR_EduMaterials_Activities_SamplingDistributionCLTExperiment | This article]] is an experiment on sampling distribution with Central Limit Theory. It demonstrates the properties of the sampling distributions of various sample statistics and illustrates the CLT through the experiment. The sampling distribution CLT experiment provides a simulation accessible to the public that demonstrates characteristics of various sample statistics and CLT and to empirically demonstrate that the sample average is unique. The article helps users develop a better understanding of the two topics and apply them to various types of activities as the concepts of a native distribution, sample distribution and numerical parameter estimate.&lt;br /&gt;
&lt;br /&gt;
===Software ===&lt;br /&gt;
*[http://ww2.coastal.edu/kingw/statistics/R-tutorials/resample.html R-Tutorial] &lt;br /&gt;
*[http://www.socr.ucla.edu/htmls/SOCR_Experiments.html SOCR Experiments]&lt;br /&gt;
*[http://socr.ucla.edu/htmls/HTML5/SOCR_Resampling_Webapp/ SOCR Resampling Webapp]&lt;br /&gt;
&lt;br /&gt;
* Sampling with/without replacement in R:&lt;br /&gt;
 &amp;gt; names&amp;lt;-c('Ann','Tom','William','Tim','Kate','Mike','Rose','Alfred','Jef','Jack')&lt;br /&gt;
 &amp;gt; N&amp;lt;-length(names)&lt;br /&gt;
 &amp;gt; sample(names,N,replace=F)&lt;br /&gt;
 [1] &amp;quot;William&amp;quot; &amp;quot;Kate&amp;quot;    &amp;quot;Mike&amp;quot;    &amp;quot;Ann&amp;quot;     &amp;quot;Jef&amp;quot;     &amp;quot;Tom&amp;quot;     &amp;quot;Rose&amp;quot;   &lt;br /&gt;
 [8] &amp;quot;Jack&amp;quot;    &amp;quot;Tim&amp;quot;     &amp;quot;Alfred&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt; sample(names,N,replace=T)&lt;br /&gt;
 [1] &amp;quot;Mike&amp;quot;    &amp;quot;Rose&amp;quot;    &amp;quot;William&amp;quot; &amp;quot;Rose&amp;quot;    &amp;quot;Jef&amp;quot;     &amp;quot;Mike&amp;quot;    &amp;quot;Jack&amp;quot;   &lt;br /&gt;
 [8] &amp;quot;Rose&amp;quot;    &amp;quot;Tom&amp;quot;     &amp;quot;Ann&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
# Go over the examples in article 4.2 and 4.3.&lt;br /&gt;
# Do the exercise of simulating stock closing price $S_t$ on 252 trading days where $S_{t}$ satisfies: $S_t=S_0  e^{vt+\sigma \sqrt{t} Z}$, $Z \sim Normal(0,1)$ with $S_0=36, \sigma=2%, v=0.01%$. &lt;br /&gt;
# Now suppose you bought a call on this stock with strike price 40, with your simulation data, what is percentage of days you can profit from exercising the call option? (That is the percentage of days your $S_t$ is greater than 40).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
=== References===&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Resampling_(statistics)  Resampling Wikipedia]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cross-validation_(statistics)  Cross Validation Wikipedia]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Bootstrapping_(statistics)  Bootstrapping Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_ResamplingSimulation}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ProbabilityDistributions&amp;diff=13544</id>
		<title>SMHS ProbabilityDistributions</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ProbabilityDistributions&amp;diff=13544"/>
		<updated>2014-08-29T16:45:08Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Probability Distributions ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Distributions are the fundamental basis of probability theory. There are two types of processes that we observe in nature – discrete and continuous distributions (there could also be mixtures, multidimensional or tensor distributions which are not discussed here). The type of distribution depends on the type of data. Discrete and continuous distributions represent discrete or continuous random variables, respectively. This section aims to introduce various kinds of discrete and continuous distributions and the relationships between distributions. &lt;br /&gt;
&lt;br /&gt;
*Discrete distributions: [[AP_Statistics_Curriculum_2007_Distrib_Binomial|Bernoulli distribution]], [[AP_Statistics_Curriculum_2007_Distrib_Binomial|Binomial distribution]], [[AP_Statistics_Curriculum_2007_Distrib_Multinomial|Multinomial distribution]], [[SOCR_EduMaterials_Activities_Explore_Distributions#Geometric_probability_distribution|Geometric distribution]], [[AP_Statistics_Curriculum_2007_Distrib_Dists#HyperGeometric|Hypergeometric distribution]], [[AP_Statistics_Curriculum_2007_Distrib_Dists#Negative_Binomial|Negative binomial distribution]], [[AP_Statistics_Curriculum_2007_Distrib_Dists#Negative_Multinomial_Distribution_.28NMD.29|Negative multinomial distribution]], [[AP_Statistics_Curriculum_2007_Distrib_Poisson|Poisson distribution]].&lt;br /&gt;
&lt;br /&gt;
*Continuous distributions: [[AP_Statistics_Curriculum_2007#Chapter_V:_Normal_Probability_Distribution|Normal distribution]], [[SOCR_BivariateNormal_JS_Activity| Multivariate normal distribution]].&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
We have talked about different types of data and the fundamentals of probability theory. In order to capture and estimate the patterns of data, we introduced the concept of distribution. A probability distribution assigns a probability to each measurable subset of the possible outcomes of a random experiment. It can either be univariate or multivariate. A univariate distribution gives the probability of a single random variable while the a multivariate distribution (a joint probability distribution) gives the probability of a random vector which is a set of two or more random variables taking on various combinations of values. Consider the coin tossing experiment, what would be the distribution of the outcome? &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
'''Random variables''': a random variable is a function or a mapping from a sample space into the real numbers (most of the time). In other words, a random variable assigns real values to outcomes of experiments.&lt;br /&gt;
&lt;br /&gt;
'''Probability density / mass and (cumulative) distribution functions''' &lt;br /&gt;
The probability density or probability mass function (pdf), for a continuous or discrete random variable, is the function defined by the probability of the subset of the sample space $\{s\in S\}\subset S$. $p(x)=P(\{s\in S\} | X(s)=x)$, for all $x$.&lt;br /&gt;
The cumulative distribution function (cdf) $F(x)$ of any random variable $X$ with probability mass or density function $p(x)$ is defined by the total probability of all $\{s\in S\}\subset S$, where $X(s) \leq x; F(x)=P(X\leq x)$, for all x.&lt;br /&gt;
&lt;br /&gt;
'''Expectation and variance'''&lt;br /&gt;
*Expectation: The expected value, expectation or mean, of a discrete random variable $X$ is defined as $E[X]=\sum_i {x_i P(X=x_i)}$. The expected value of a continuous random variable $Y$ is defined as $E[Y]=\int_y{yP(y)dy}$, which is the integral over the domain of $Y$ and $P(y)$ is the probability density function of $Y$. An important property of expectation is that it is a linear functional, i.e., $E[aX+bY]=aE[X]+bE[Y]$.&lt;br /&gt;
&lt;br /&gt;
*Variance: The variance of a discrete random variable $X$ is defined as $VAR[X]=\sum_i {(x_i-E[X])^2 P(X=x_i)}$. Variance of a continuous random variable $Y$ is defined as $VAR[Y]=\int_y {(y-E[Y])^2 P(y)dy}$, which is the integral over the domain of $Y$ and $P(y)$ is the probability density function of $Y$. The second moment, variance, does not quite have the same linear functional properties as the expectation: $VAR[aX]= a^2 VAR[X]$ and $VAR[X+Y]=VAR[X]+VAR[Y]+2COV(X,Y)$.&lt;br /&gt;
*Covariance:$COV(X,Y)=E[(X-E[X])(Y-E[Y])]$.&lt;br /&gt;
&lt;br /&gt;
====Bernoulli distribution====&lt;br /&gt;
A [[AP_Statistics_Curriculum_2007_Distrib_Binomial#Bernoulli_process|Bernoulli trial]] is an experiment whose dichotomous outcomes are random (e.g. ‘head vs. ‘tail’). $X(outcome)= \begin{cases}&lt;br /&gt;
0, &amp;amp; \text{s=head} \\&lt;br /&gt;
1, &amp;amp; \text{s=tail}&lt;br /&gt;
\end{cases}$.  &lt;br /&gt;
If ''p''=P(''head''), then $E[X]=p$ and $VAR[X]=p(1-p)$.&lt;br /&gt;
&lt;br /&gt;
====Binomial distribution====&lt;br /&gt;
Suppose we conduct an experiment observing n trial Bernoulli process. If we are interested in the RV $x$ = {Number of heads in the $n$ trials}, then $X$ is called a [[AP_Statistics_Curriculum_2007_Distrib_Binomial#Binomial_Random_Variables|Binomial RV and its distribution is called Binomial distribution]], $X \sim B(n,p)$,where $n$ is sample size, $p$ is the probability of head at one trial. $P(X=x)={n\choose x} p^x (1-p)^{n-x}$, for $x=0,1,…,n$, where ${n\choose x}=\frac {n!} {x!(n-x)!}$ is the binomial coefficient.&lt;br /&gt;
$$E[X]=np,VAR[X]=np(1-p)$$&lt;br /&gt;
&lt;br /&gt;
====Multinomial distribution====&lt;br /&gt;
The [[AP_Statistics_Curriculum_2007_Distrib_Multinomial|multinomial distribution]] is an extension of binomial where the experiment consists of $k$ repeated trials and each trial has a discrete number of possible outcomes; on any given trial, the probability that a particular outcome will occur is constant; the trials are independent.&lt;br /&gt;
&lt;br /&gt;
$ p=P(X_1=r_1 \cap \cdots \cap X_k=r_{k}│r_1 + ⋯ +r_k=n)$ = ${n\choose r_1,…,r_k} p_1^{r_1} p_2^{r_2}…p_k^{r_k}$ for all (∀) $r_1+⋯+r_k=n$ where ${n\choose r_1,…,r_k}=\frac {n!}{r_1! \times … \times r_k!}$.&lt;br /&gt;
&lt;br /&gt;
====Geometric distribution====&lt;br /&gt;
The probability distribution of number X of Bernoulli trials needed to get one success is called [[AP_Statistics_Curriculum_2007_Distrib_Dists#Geometric|Geometric]]. It is supported on the set $\{1,2,3,…\}$. $P(X=x)=(1-p)^{x-1}p$, for $x = 1, 2, … $&lt;br /&gt;
&lt;br /&gt;
$$E[X]=\dfrac {1} {p},VAR[X]= \frac {1-p} {p^{2}}$$&lt;br /&gt;
&lt;br /&gt;
====Hypergeometric distribution====&lt;br /&gt;
A discrete probability distribution that describes the number of successes in a sequence of $n$ draws from a finite population without replacement. An experimental design for using [[AP_Statistics_Curriculum_2007_Distrib_Dists#HyperGeometric|Hypergeometric distribution]] is illustrated in the table below: a shipment of $N$ objects includes $m$ are defective. The Hypergeometric Distribution describes the probability that in a sample of $n$ distinctive objects drawn from the shipment exactly $k$ objects are defective.&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;
|'''Type''' ||'''Drawn''' ||'''Not-Drawn''' || '''Total'''&lt;br /&gt;
|-&lt;br /&gt;
|Defective || $k$|| $m-k$ || $m$&lt;br /&gt;
|-&lt;br /&gt;
|Non-Defective || $n-k$ || $N+k-n-m$ ||$N-m$&lt;br /&gt;
|-&lt;br /&gt;
|Total || $n$|| $N-n$	|| $N$&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$$ P(X=k)=\frac {{m \choose k}{N-m \choose n-k}} {N \choose n}, E[X]=\frac{nm}{N}, VAR[X]=\frac{\frac{nm}{N}(1-\frac{m}{N})(N-n)} {N-1}$$&lt;br /&gt;
&lt;br /&gt;
==== Negative binomial distribution====&lt;br /&gt;
Suppose X=trial index (n) of the $r^{th}$ success, or total number of experiments ($n$) to get $r$ successes. [[AP_Statistics_Curriculum_2007_Distrib_Dists#Negative_Binomial| Negative binomial distribution]] has the following mass function $P(X=n)={n-1 \choose r-1} p^r (1-p)^{(n-r)}$, for $n=r,r+1,r+2,…$, where $n$ is the trial number of the $𝑟^{𝑡ℎ}$ success.&lt;br /&gt;
&lt;br /&gt;
$$E[X]=\frac {r} {p},VAR[X]=\frac {r(1-p)} {p^{2}}$$&lt;br /&gt;
 &lt;br /&gt;
Suppose Y= Number of failures ($k$) to get $r$ successes. $P(Y=k)={k+r-1 choose k} p^{r} (1-p)^{k}$, for $k=0,1,2,…,$ where $k$ is the number of failures before the $ r^{th} $ success. $Y \sim NegBin(r,p)$, the probability of $k$ failures and $r$ successes in $n = k+1$ $Bernoulli(p)$ trials with success on the last trial.&lt;br /&gt;
&lt;br /&gt;
$$E[Y]=\frac{r(1-p)}{p},VAR[Y]=\frac {r(1-p)} {p^{2}}$$&lt;br /&gt;
&lt;br /&gt;
NOTE: $X=Y+r,E[X]=E[Y]+r,VAR[X]=VAR[Y]$.&lt;br /&gt;
&lt;br /&gt;
====Negative multinomial distribution (NMD)====&lt;br /&gt;
[[AP_Statistics_Curriculum_2007_Distrib_Dists#Negative_Multinomial_Distribution_.28NMD.29|NMD]] is a generalization of the two-parameter $NegBin(r,p)$ to more than one outcomes. Suppose we have $m$ possible outcomes $\{X_0,…,X_m\}$ each with probability $\{p_0,…,p_m \}$, respectively, where $0&amp;lt;p_i&amp;lt;1$ and $\sum_{i=0}^m {p_i} =1$. Suppose the experiment generates independent outcomes until $\{X_0,…,X_m \}$ occur exactly $\{k_0,…,k_m \}$ times, then $\{X_{0},…,X_{m}\}$ is Negative Multinomial with parameter vector $(k_0,\{p_{1},…,p_{m}\})$, with $m$ representing the degrees of freedom. &lt;br /&gt;
&lt;br /&gt;
* In the special case of $m=1$, if $X$ is the total number of experiments ($n$) necessary to get $k_{0}$ and $n-k_{o}$ outcomes of the other possible outcome $(X_{1})$. $X \sim NegativeMultinomial(k_{0},{p_[0},p_{1})$&lt;br /&gt;
&lt;br /&gt;
* NMD Probability Mass Function: &amp;lt;math&amp;gt; P(k_1, \cdots, k_m|k_0,\{p_1,\cdots,p_m\}) = \left (\sum_{i=0}^m{k_i}-1\right)!\frac{p_0^{k_0}}{(k_0-1)!} \prod_{i=1}^m{\frac{p_i^{k_i}}{k_i!}},&amp;lt;/math&amp;gt; or equivalently:&lt;br /&gt;
: &amp;lt;math&amp;gt; P(k_1, \cdots, k_m|k_0,\{p_1,\cdots,p_m\}) = \Gamma\left(\sum_{i=1}^m{k_i}\right)\frac{p_0^{k_0}}{\Gamma(k_0)} \prod_{i=1}^m{\frac{p_i^{k_i}}{k_i!}},&amp;lt;/math&amp;gt; &lt;br /&gt;
: where &amp;lt;math&amp;gt;\Gamma(x)&amp;lt;/math&amp;gt; is the [http://en.wikipedia.org/wiki/Gamma_function Gamma function].&lt;br /&gt;
* Mean (vector): &amp;lt;math&amp;gt;\mu=E(X_1,\cdots,X_m)= (\mu_1=E(X_1), \cdots, \mu_m=E(X_m)) = \left ( \frac{k_0p_1}{p_0}, \cdots, \frac{k_0p_m}{p_0} \right).&amp;lt;/math&amp;gt;&lt;br /&gt;
* Variance-Covariance (matrix): &amp;lt;math&amp;gt;Cov(X_i,X_j)= \{cov[i,j]\},&amp;lt;/math&amp;gt; where &lt;br /&gt;
: &amp;lt;math&amp;gt; cov[i,j] = \begin{cases} \frac{k_0 p_i p_j}{p_0^2},&amp;amp; i\not= j,\\&lt;br /&gt;
\frac{k_0 p_i  (p_i + p_0)}{p_0^2},&amp;amp; i=j.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Poisson distribution====&lt;br /&gt;
The discrete [[AP_Statistics_Curriculum_2007_Distrib_Poisson|Poisson distribution]] expresses the probability of the number of events occurring in a fixed interval of time if these events occur with a known average rate and independently of the time since the last event. The Figure below shows the pdf of Poisson Distribution with varying parameter ($\lambda$) values.&lt;br /&gt;
&amp;lt;center&amp;gt;[[image:SMHS_Probability_Fig1.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The distribution is right-skewed, but for increasing $\lambda$ (say $\lambda&amp;gt;40$) the distribution becomes bell shaped. See the [[AP_Statistics_Curriculum_2007_Limits_Norm2Poisson|Normal approximation to Poisson distribution section]]. The Figure below shows the CDF of Poisson Distribution with varying parameter values.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_ProbabilityDistribution_fig2.png ]]&amp;lt;/center&amp;gt; You can also see the [http://www.distributome.org/V3/calc/PoissonCalculator.html Distributome interactive Poisson calculator].&lt;br /&gt;
&lt;br /&gt;
$$P(X=k)=\frac{λ^{k}e^{-λ}}{k!},E[X]=λ,VAR[X]=λ.$$&lt;br /&gt;
&lt;br /&gt;
The CDF is discontinuous at the integers of $k$ and flat everywhere else because the variable only takes on integer values. That is the CDF of Poisson distribution is left continuous but not right continuous. Also note, the CDF of Poisson distribution takes on the value of 0 with 0 occurrence and it is non-decreasing with increasing number of occurrence. And it increases and stays at 1 after certain number of occurrence.&lt;br /&gt;
&lt;br /&gt;
====Normal distribution====&lt;br /&gt;
The continuous [[AP_Statistics_Curriculum_2007_Normal_Std|Standard Normal distribution]] has &lt;br /&gt;
* ''density'' function $ f(x)= {e^{-x^2 \over 2} \over \sqrt{2 \pi}}. $&lt;br /&gt;
* ''cumulative distribution'' function $\Phi(y)= \int_{-\infty}^{y}{{e^{-x^2 \over 2} \over \sqrt{2 \pi}} dx}.$&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
*[http://www.mdm.com/articles/28757-the-case-for-proactive-inside-sales?v=preview  The article] examined how a proactive inside sales force can be critical to serving mid-market and small customers as part of a broader multichannel strategy and in included steps for initiating an effective program.&lt;br /&gt;
&lt;br /&gt;
*[http://wiki.socr.umich.edu/index.php/SOCR_EduMaterials_Activities_NegativeBinomial This article] provides an example of Negative Binomial Experiment by SOCR. The goal of this experiment is to provide a simulation demonstrating properties of the Negative Binomial(k,p) distribution. The applet facilitates the calculations of the Negative Binomial mass/density function, the moments and cumulative distribution function. It gives the specific steps of the experiment in SOCR and it allows users to learn about the variation of the distribution with changing parameters.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
*[http://socr.ucla.edu/htmls/SOCR_Distributions.html SOCR Distributions]&lt;br /&gt;
*[http://socr.ucla.edu/htmls/exp/Bivariate_Normal_Experiment.html Bivariate_Normal_Experiment]&lt;br /&gt;
*[http://socr.ucla.edu/Applets.dir/Normal_T_Chi2_F_Tables.htm Normal T Chi$^{2}$]&lt;br /&gt;
*[http://socr.ucla.edu/htmls/dist/Multinomial_Distribution.html Multinomial_Distribution] &lt;br /&gt;
*[http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_Activities_Binomial_Distributions Activities Binomial Distributions] &lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
* If sampling distributions of sample means are examined for samples of size 1, 5, 10, 16 and 50, you will notice that as sample size increases, the shape of the sampling distribution appears more like that of the:&lt;br /&gt;
: (a) normal distribution&lt;br /&gt;
: (b) uniform distribution&lt;br /&gt;
: (c) population distribution&lt;br /&gt;
: (d) binomial distribution&lt;br /&gt;
&lt;br /&gt;
* Which of the following statements best describes the effect on the Binomial Probability Model if the number of trials is held constant and the p(the probability of &amp;quot;success&amp;quot;) increases?&lt;br /&gt;
: (a) None of these statements are true&lt;br /&gt;
: (b) The mean and the standard deviation both increase&lt;br /&gt;
: (c) The mean decreases and the standard deviation increases&lt;br /&gt;
: (d) The mean increases and the standard deviation decreases&lt;br /&gt;
: (e) The mean and standard deviation both decrease&lt;br /&gt;
&lt;br /&gt;
* Suppose you draw one card from a standard deck three times, with replacement. What is the probability that you get spades all three times? Choose one answer.&lt;br /&gt;
: (a) 0.002&lt;br /&gt;
: (b) 0.321&lt;br /&gt;
: (c) 0.015&lt;br /&gt;
: (d) 0.021&lt;br /&gt;
&lt;br /&gt;
* Suppose the number of cars that enter a parking lot in an hour is a Poisson random variable, and suppose that P(X=0)=0.05. Determine the variance of X.&lt;br /&gt;
: (a) 0.349&lt;br /&gt;
: (b) 3.232&lt;br /&gt;
: (c) 9.321&lt;br /&gt;
: (d) 2.996&lt;br /&gt;
&lt;br /&gt;
* A researcher converts 100 lung capacity measurements to z-scores. The lung capacity measurements do not follow a normal distribution. What can we say about the standard deviation of the 100 z-scores?&lt;br /&gt;
: (a) It depends on the standard deviation of the raw scores&lt;br /&gt;
: (b) It equals 1&lt;br /&gt;
: (c) It equals 100&lt;br /&gt;
: (d) It must always be less than the standard deviation of the raw scores&lt;br /&gt;
: (e) It depends on the shape of the raw score distribution&lt;br /&gt;
&lt;br /&gt;
* Among first year students at a certain university, scores on the verbal SAT follow the normal curve. The average is around 500 and the SD is about 100. Tatiana took the SAT, and placed at the 85% percentile. What was her verbal SAT score?&lt;br /&gt;
: (a) 604&lt;br /&gt;
: (b) 560&lt;br /&gt;
: (c) 90&lt;br /&gt;
: (d) 403&lt;br /&gt;
&lt;br /&gt;
* Consider a random sample 100 orc soldiers and found the mean and the standard deviation to be 200lbs and and 20lbs respectively. He can be 68% confident that the mean weight in the population of orc soldiers is between&lt;br /&gt;
: (a) 196 to 204 lbs&lt;br /&gt;
: (b) 198 to 202 lbs&lt;br /&gt;
: (c) 194 to 206 lbs&lt;br /&gt;
: (d) None of the above&lt;br /&gt;
&lt;br /&gt;
* The Rockwell hardness of certain metal pins is known to have a mean of 50 and a standard deviation of 1.5. If the distribution of all such pin hardness measurements is known to be normal, what is the probability that the average hardness for a random sample of nine pins is at least 50.5?&lt;br /&gt;
: (a) Approximately 4&lt;br /&gt;
: (b) 0.4&lt;br /&gt;
: (c) Approximately 0.1587&lt;br /&gt;
: (d) Approximately 0&lt;br /&gt;
&lt;br /&gt;
* You read that the heights of college women are nearly normal with a mean of 65 inches and a standard deviation of 2 inches. If Vanessa is at the 10th percentile (shortest 10% for women) in height for college women, then her height is closest to:&lt;br /&gt;
: (a) 64.5 inches&lt;br /&gt;
: (b) It cannot be determined from this information&lt;br /&gt;
: (c) 60.5 inches&lt;br /&gt;
: (d) 62.44 inches&lt;br /&gt;
&lt;br /&gt;
* The settlement (in cm) of a structure shown in the following figure may be evaluated from S = 0.3A + 0.2B + 0.1C,&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS_ProbabDist_Fig3.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
: where A, B, and C are respectively the thickness (in m) of the three layers of soil as shown. Suppose A, B, and C are modeled as independent normal random variables as: $A \sim N(5,1)$, $B \sim N(8,2)$, $C \sim N(7,1)$, &lt;br /&gt;
: (a) Determine the probability that the settlement will exceed 4 cm.&lt;br /&gt;
: (b) If the total thickness of the three layers is known exactly as 20 m; and furthermore, thicknesses A and B are correlated with correlation coefficient equal to 0.5, determine the probability that the settlement will exceed 4 cm.&lt;br /&gt;
&lt;br /&gt;
* Suppose that the distribution of X in the population is strongly skewed to the left. If you took 200 independent and random samples of size 3 from this population, calculated the mean for each of the 200 samples, and drew the distribution of the sample means, what would the sampling distribution of the means look like?&lt;br /&gt;
: (a) It will be perfectly normal and the mean will be equal to the median.&lt;br /&gt;
: (b) It will be close to the normal and the mean will be close to the median.&lt;br /&gt;
: (c) On a p-plot, most of the points will be on the line.&lt;br /&gt;
: (d) It will be skewed to the left and the mean will be less than the median.&lt;br /&gt;
&lt;br /&gt;
* A polling agency has been hired to predict the proportion of voters who favor a certain candidate. The polling agency picks a random sample of 1000 voters of which 400 indicate that they favor the candidate. If they increase the sample size to 2000, how does the standard error change?&lt;br /&gt;
: (a) The standard error will decrease by one-fourth&lt;br /&gt;
: (b) The standard error will not change; the margin of error changes&lt;br /&gt;
: (c) Since the sample size is doubled, the standard error will be halved&lt;br /&gt;
: (d) The standard error will decrease not by a factor of 1/2 but by the square of root of 1/2&lt;br /&gt;
&lt;br /&gt;
* The probability of winning a certain instant scratch-n-win game is 0.02. You play the game 80 times. Find the probability that you win 3 times.&lt;br /&gt;
: (a) 0.2983&lt;br /&gt;
: (b) 0.1378&lt;br /&gt;
: (c) 0.3231&lt;br /&gt;
: (d) 0.2391&lt;br /&gt;
&lt;br /&gt;
* After firing 1000 boxes of ammunition, a certain handgun jamed according to a Poisson distribution with a mean of 0.4 per box of ammunition. Approximate the probability that more than 350 boxes of ammunition contain some that is jammed.&lt;br /&gt;
: (a) .0032&lt;br /&gt;
: (b) .0012&lt;br /&gt;
: (c) .0231&lt;br /&gt;
: (d) .0089&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [http://wiki.socr.umich.edu/index.php/Probability_and_statistics_EBook#Chapter_IV:_Probability_Distributions SOCR EBook Probability Chapter]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Poisson_distribution  Poisson Distribution Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_ProbabilityDistributions}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_Probability&amp;diff=13543</id>
		<title>SMHS Probability</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_Probability&amp;diff=13543"/>
		<updated>2014-08-29T16:44:18Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Probability Theory ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Probability theory plays an important role in statistics and its application in many other areas because it provides the theoretical groundwork for statistical inference. Probability theory is concerned with probability, which is the analysis of random phenomena. The central objects are random variables, stochastic processes, and events. Consider an individual coin toss, which can be considered to be a random event, if it is repeated many times then the sequence of random events will exhibit certain patterns. And probability theory helps us to study and predict those patterns. Often, probability theory can be further divided into two separate parts of discrete probability distribution and continuous probability distribution, which we’ll study later in the Distribution section. In this section, we aim to study some fundamental concepts in probability theory as well as the probability theory rules we are going to apply in our following studies. &lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
Consider you are doing an experiment where a number of outcomes are produced. This set of outcomes is called sample space and power set of the sample space includes all different collections of the possible results of the experiment. Suppose we are rolling a fair dice, which has 6 possible outcomes. The sample space is {1, 2, 3, 4, 5, 6}. Event is any collection of the possible results. For example, the collection of possible results of rolling an even number gives the subset of {2, 4, 6} which is an element of the power set of the sample space in this experiment. What if we want to estimate the chance of rolling three 2’s in line or the chance of roll an odd number in an experiment? Probability is a way of assigning every event a value between 0 and 1, which informs us of the chance that the event occurs. &lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
'''Random Sampling''': A simple random sample of n items is a sample in which very member of the population has an equal chance of being selected and the members of the sample are chosen independently. For example, consider a survey where 100 students are chosen from the total of 5000 students to take the questionnaires and the chance of chosen is the same for each student. This is a simple example of random sampling. An easy application is random number generator. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Types of probabilities''': Probability models have two components: sample space and probabilities. &lt;br /&gt;
*Sample space (S) for a random experiment is the set of all possible outcomes of the experiment.&lt;br /&gt;
**Event: a collection of outcomes.	&lt;br /&gt;
**Event occurs if an outcome making up that event occurs.&lt;br /&gt;
*Probabilities for each event in the sample space.&lt;br /&gt;
*Probabilities may come from models – say mathematical/physical description of the sample space and the chance of each event. An example may be a fair dice tossing game.	&lt;br /&gt;
*Probabilities may be derived from data – data observations determine the probability distribution. An example may be tossing a coin 50 times and observe the head counts.&lt;br /&gt;
*Subject probabilities: combining data and psychological factors to design a reasonable probability table. An example may be the stock market.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Axioms of probability'''&lt;br /&gt;
*First axiom: the probability of an event is a non-negative real number.&lt;br /&gt;
*Second axiom: the probability that some elementary event in the entire sample space will occur is 1. More specifically, there are no elementary events outside the sample space $P(S)=1$.&lt;br /&gt;
*Third axiom: An countable sequence of pair-wise disjoint events $E_1,E_2, E_3, … $ satisfies $P(E_1 \cup E_2 \cup E_3 \cup … ) = \sum_i {P(E_i)} $.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Event manipulations''' &lt;br /&gt;
*Complement: the complement of event $A$ is denoted as $A^c$ or $A'$, it occurs if and only if $A$ does not occur. The union of $A$ and $A^C$ make up the whole sample space ($S$).&lt;br /&gt;
* Union: $A\cup B$ contains all outcomes in $A$ or $B$ (or both). $ P(A\cup B)=P(A)+P(B)-P(A\cap B). $&lt;br /&gt;
* Intersection: $A\cap B$ contains all outcomes which are in both $A$ and $B$.&lt;br /&gt;
* Mutually exclusive events are events that cannot occur at the same time, $A\cap B =\emptyset$.&lt;br /&gt;
* Conditional Probability: The conditional probability of event $A$ occurring given that event $B$ occurs is $ P(A│B)=(P(A\cap B))/(P(B)) $. When $A$ and $B$ are independent then knowing $B$, or $B^c$, gives no information on the probability of $A$, i.e., $ P(A│B)=P(A) $.&lt;br /&gt;
* Multiplication rule: For any two events, $A$ and $B$, $ P(A\cap B)=P(A│B)P(B) $. In general, for $n$ events $A_1, ..., A_n$: $ P(A_1 \cap A_2 \cap A_3 \cap … \cap A_n ) = P(A_1 )P(A_1│A_2 )P(A_3│A_1\cap A_2 ) … P(A_n│A_1\cap A_1\cap A_2\cap A_3\cap … \cap A_(n-1) ) $.&lt;br /&gt;
* Law of total probability: $P(B)=P(B│A_1 )P(A_1 )+P(B│A_2 )P(A_2 )+⋯ +P(B│A_n )P(A_n) $, where the events $ {A_1,…,A_n} $ partition the sample space $S$.&lt;br /&gt;
* Inverting the order of conditioning: $ P(A \cap B)  = P(A | B) \times  P(B) =  P(B | A) \times P(A) $.&lt;br /&gt;
* Bayesian Rule: If $ {A_1,…,A_n} $ partition the sample space $S$, and $A$ and $B$ are any events, subsets of $S$, then we have: &lt;br /&gt;
$$ P(A | B) = {P(B | A) P(A) \over P(B)} = {P(B | A) P(A) \over P(B|A_1)P(A_1) + P(B|A_2)P(A_2) + \cdots + P(B|A_n)P(A_n)}. $$&lt;br /&gt;
&lt;br /&gt;
====Counting====&lt;br /&gt;
Counting principles are very useful in probability theory. Consider picking 3 students from a total of 26 students named A to Z.&lt;br /&gt;
*Permutation: rearrangement of objects in distinguishable sequences. Each unique ordering is called a permutation. For example $\{A, B, D\}$ are different from $\{D, A, B\}$. There are $3!=6$ permutations of students A, B and D.&lt;br /&gt;
**Permutation with repetitions (replacement): when the ordering of objects matters and an object can be chosen more than once, then the number of permutations is $ n^r $, where n is the number of objects from which you can choose and r is the number of objects you choose. In our example above, we have $ 26^3 $  permutations with repetitions.&lt;br /&gt;
**Permutation without repetitions (replacement): when the order matters and each object can be chosen only once, then the number of permutation is $ n(n-1)…(n-r+1)=n!/(n-r)! $, where $n$ is the number of objects you can choose from and $r$ is the number of objects you choose. In our example above, we have $26*25*24$ permutations without repetitions. &lt;br /&gt;
*Combinations: An un-ordered collection of unique objects. In our example above, {A, B, D} are the same as {D, B, A}. &lt;br /&gt;
**Combinations with repetitions (replacement): when the order doesn’t matter and an object can be chosen more than once. Then the number of combinations is $ {n+r-1 \choose r}= \frac{(n+r-1)!}{r!(n-1)!} $, in our example above we have $ ((26+3-1)!)/3!(26-1)!=6552 $ combinations with repetitions.&lt;br /&gt;
**Combinations without repetitions (replacement): when the order doesn’t matter and an object can be chosen only once. Then the number of combinations is $ {n \choose r}=n!/r!(n-r)! $, where $n$ is the number of objects you can choose from and $r$ is the number of objects you choose. In our example, we have $ {26 \choose 3} $ combinations without repetitions.&lt;br /&gt;
&lt;br /&gt;
'''Independence vs. disjointness/mutual-exclusiveness''' &lt;br /&gt;
The events $A$ and $B$ are independent if $ P(A│B)=P(A)$, that is $ P(A\cap B)=P(A)P(B) $.&lt;br /&gt;
The events $C$ and $D$ are disjoint or mutually-exclusive, if $ P(C\cap D)=0 $, that is $ P(C\cup D)=P(C)+P(D) $.&lt;br /&gt;
&lt;br /&gt;
These two concepts are different and should not be mixed together. Given that if two events are mutually-exclusive, they cannot happen together $ (P(A│B)=0)) $ so the occurrence of one gives information about the probability of the other so events that are mutually-exclusive can’t be independent.&lt;br /&gt;
 &lt;br /&gt;
Consider the [[SOCR_EduMaterials_Activities_PokerExperiment|SOCR poker game]], if we know the card we picked randomly is a Queen, then the event that it is a red Queen given it is a Queen and the event that it is a black Queen given it is a Queen is independent. The event that it is a black card is not mutually-exclusive from the event that it is a spade.&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
* [http://wiki.socr.umich.edu/index.php/AP_Statistics_Curriculum_2007_Prob_Simul This website] introduced on application of probability theory through simulation. Many practical examples require probability computations of complex events. Such calculations may be carried out exactly, using the proper probability rules, or approximately using estimation or simulations. [http://wiki.socr.umich.edu/index.php/AP_Statistics_Curriculum_2007_Prob_Simul SOCR simulations] may be used to compute (approximately) probabilities of various processes and compare these empirical probabilities to their exact counterparts. This article included examples of ''Ball and Urn Experiment, Binomial Coin Toss Experiment, Card Experiment, Roulette Experiment, and Chuck A Luck Experiment'' and would be a great source to take practice on simulations using probability theory.&lt;br /&gt;
&lt;br /&gt;
* [http://www.probabilitytheory.info This website] offers a list of interesting articles on the topic of probability theory. It included a general introduction to the history of probability theory and addresses a wide list of articles of the application of probability in different areas including business, medicine, economics, biology, and etc. These short articles would be a good start to learn about application of probability theory in various fields.&lt;br /&gt;
&lt;br /&gt;
===Software ===&lt;br /&gt;
*[http://www.socr.ucla.edu/htmls/SOCR_Experiments.html SOCR Simulations &amp;amp; Experiments]&lt;br /&gt;
*[http://www.calculatorsoup.com/calculators/discretemathematics/combinations.php Combinations Calculator]&lt;br /&gt;
*[http://www.calculatorsoup.com/calculators/discretemathematics/permutations.php Permutations Calculator]&lt;br /&gt;
*[http://ww2.coastal.edu/kingw/statistics/R-tutorials/proport.html R Tutorials Counts &amp;amp; Proportions]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
* A box contains 6 balls, where 2 are red, 2 are white, and 2 are blue. Four balls are picked at random, one at a time. Each time a ball is picked, the color is recorded, and the ball is put back in the box. If the first 3 balls are red, what color is the fourth ball most likely to be?&lt;br /&gt;
: (a) Red&lt;br /&gt;
: (b) White&lt;br /&gt;
: (c) Blue&lt;br /&gt;
: (d) Blue and white are equally likely and more likely than red.&lt;br /&gt;
: (e) Red, blue, and white are all equally likely.&lt;br /&gt;
&lt;br /&gt;
* A coin is tossed 400 times and 170 heads are observed. This coin is__ ?&lt;br /&gt;
: (a) fair, because the probability of seeing that amount of heads or less is approximately 0.0013&lt;br /&gt;
: (b) neither fair or unfair. There is not enough information to determine that.&lt;br /&gt;
: (c) fair, because the probability of seeing that amount of heads or less is approximately 0.5&lt;br /&gt;
: (d) not fair, because the probability of seeing that amount of heads or less is close to 0.&lt;br /&gt;
&lt;br /&gt;
* If two events are independent, then they are automatically mutually exclusive.&lt;br /&gt;
: (a) True&lt;br /&gt;
: (b) False&lt;br /&gt;
&lt;br /&gt;
* If two events are mutually exclusive, then the sums of their probabilities is 1.&lt;br /&gt;
: (a) True &lt;br /&gt;
: (b) False&lt;br /&gt;
&lt;br /&gt;
* A professor who teaches 500 students in an introductory psychology course reports that 250 of the students have taken at least one introductory statistics course, and the other 250 have not taken any statistics courses. 200 of the students were freshmen, and the other 300 students were not freshmen. Exactly 50 of the students were freshmen who had taken at least one introductory statistics course. If you select one of these psychology students at random, what is the probability that the student is not a freshman and has never taken a statistics course?&lt;br /&gt;
: (a) 30%&lt;br /&gt;
: (b) 40%&lt;br /&gt;
: (c) 50%&lt;br /&gt;
: (d) 60%&lt;br /&gt;
: (e) 20%&lt;br /&gt;
&lt;br /&gt;
*  A professor who teaches 300 students in an introductory psychology course reports that 135 of the students have taken exactly one introductory statistics course, 60 have taken two or more introductory statistics courses, and the other 105 have not taken any statistics courses. If you select one of these psychology students at random, what is the probability that the student has taken at least one statistics class?&lt;br /&gt;
: (a) 0.20&lt;br /&gt;
: (b) 0.45&lt;br /&gt;
: (c) 0.65&lt;br /&gt;
: (d) 0.35&lt;br /&gt;
&lt;br /&gt;
* In a carnival game, a person can win a prize by guessing which one of 5 identical boxes contains the prize. After each guess, if the prize has been won, a new prize is randomly placed in one of the 5 boxes. If a person makes 4 guesses, what is the probability that the person wins a prize exactly twice?&lt;br /&gt;
: (a) $(0.2)^2/(0.8)^2$&lt;br /&gt;
: (b) $2(0.2)^2*(0.8)^2$&lt;br /&gt;
: (c) $6(0.2)^2*(0.8)^2$&lt;br /&gt;
: (d) $(0.2)^2*(0.8)^2$&lt;br /&gt;
: (e) $2!/5!$&lt;br /&gt;
&lt;br /&gt;
* In a university with 20,000 students, 20% are engineering students, 40% are in the sciences, 30% are in the social sciences, and the rest have other majors. The counselors in the registrar's office want to survey the opinions of students on the issue of posting grades on-line and they seek opinions from students of various majors. They conduct a survey by randomly selecting students. Among the first three students selected, what is the probability that two of the three major in social sciences and one has a major other than social science?&lt;br /&gt;
: (a) 0.600&lt;br /&gt;
: (b) 0.189&lt;br /&gt;
: (c) 0.090&lt;br /&gt;
: (d) 0.063&lt;br /&gt;
&lt;br /&gt;
* Every five years the Conference Board of Mathematical Sciences surveys college math departments. In a recent report, 51% of all undergraduates taking calculus were in classes using graphing calculators and 31% were in classes using computer assignments. Suppose that 16% of these students use both calculator and computer. What proportion of undergraduates taking calculus use no technology?&lt;br /&gt;
: (a) 0.44&lt;br /&gt;
: (b) 0.82&lt;br /&gt;
: (c) 0.66&lt;br /&gt;
: (d) 0.34&lt;br /&gt;
: (e) 0.16&lt;br /&gt;
&lt;br /&gt;
* Two cards are dealt to you (without replacement) from an ordinary well-shuffled deck. Let X = the probability that you have a pair. Let Y = the probability that both of your cards are diamonds. Compare X and Y. &lt;br /&gt;
: (a) X &amp;lt; Y&lt;br /&gt;
: (b) X = Y&lt;br /&gt;
: (c) X &amp;gt; Y&lt;br /&gt;
&lt;br /&gt;
* [[SOCR_EduMaterials_Activities_PokerExperiment|Poker game]]: What is number of hands of Full house where you have patterns like AAABB and A and B are from distinct kinds? What is number of hands of two pairs where you have patterns like AABBC and A, B and C are distinct kinds? What is total number of 5-card hands?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [http://wiki.stat.ucla.edu/socr/index.php/AP_Statistics_Curriculum_2007_Prob_Basics  SOCR]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probability  Probability Wikipedia]&lt;br /&gt;
* [[Probability_and_statistics_EBook#Chapter_III:_Probability|SOCR EBook: Probability Chapter]]&lt;br /&gt;
* [[AP_Statistics_Curriculum_2007_Prob_Count||SOCR EBook: Counting Examples]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_Probability}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_ParamInference&amp;diff=13542</id>
		<title>SMHS ParamInference</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_ParamInference&amp;diff=13542"/>
		<updated>2014-08-29T16:43:19Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Parametric Inference ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
Statistics aims to retrieving the ‘causes’ (e.g. parameters of a probability density function) from the observations. In statistical inference, we aim to collect information on the underlying population based on a sample drawn from it. The ideal case would be to find the perfect model with unknown parameters based on which we can make further inference about the data (the population) and of which the parameters can be determined with data we have. In this lecture, we are going to introduce to the concept of variables, parametric models and making inference based on the parametric model.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
Consider a well-known example of flipping a coin 10 times. Experience tells us that the outcome of the number of heads in one experiment with 10 flips would follow a Binomial Distribution with $ p=P(head)$ in one flip. Here, we have chosen the model to be a Binomial $ (n,p) $, where $ n=10 $. So, the next step would be to determine on the value of $ p $. An obvious way of doing this would be to flip the coin many times (say 100) and get the number of heads and the estimate of $ p $ would just be the number of heads in the 100 flips divided by 100, say $ 63/100 $. Based on the information, we have the number of heads in our experiment follows a Binomial distribution with $ (10,0.63) $. That is, we can infer that we will flip an average of 6.3 heads in 10 flips if we repeat the experiment enough time. So, what is a random variable? How to build up a parametric model based on the data? What kind of inference can we make based on the parametric model?&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
* Random variable: a variable whose value is subject to variations due to chance (i.e., randomness). It can take on a set of values, each with an associated probability for discrete variables or a probability density function for continuous variables. The value of a random variable represents the possible outcomes of a yet-to-be-performed experiment, or the possible outcomes of a past experiment whose already-existing value is uncertain. The possible values of a random variable and their associated probabilities (known as a probability distribution) can be further described with mathematical functions. &lt;br /&gt;
: There are two types of random variables: &lt;br /&gt;
:: ''Discrete random variables'': take on a specified finite or countable list of values, endowed with a probability mass function, characteristic of a probability distribution;&lt;br /&gt;
:: ''Continuous random variables'': take on any numerical value in an interval or collection of intervals, via a probability density function that is characteristic of a probability distribution, or a mixture of both types.&lt;br /&gt;
&lt;br /&gt;
* Parameters:  a characteristic, or measurable factor that can help in defining a particular system. It is an important element to consider in evaluation or comprehension of an event. Say, μ is often used as the mean and σ is often used as the standard deviation in statistics. The following table provides of a list of commonly used parameters with descriptions:&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;
|Parameter || Description || Parameter || Description&lt;br /&gt;
|-&lt;br /&gt;
| $\bar{x}$ || Sample mean || α,β,γ || Greek&lt;br /&gt;
|-&lt;br /&gt;
| μ || Population mean || θ || Lower case for Theta&lt;br /&gt;
|-&lt;br /&gt;
|σ || Population standard deviation || φ || Lower case for Phi&lt;br /&gt;
|-&lt;br /&gt;
| $σ^2$ || Population variance || ω || Lower case for Omega&lt;br /&gt;
|- &lt;br /&gt;
| s || Sample standard deviation || ∆ || Increment&lt;br /&gt;
|-&lt;br /&gt;
| $s^2$ || Sample variance || ν || Nu&lt;br /&gt;
|-&lt;br /&gt;
| λ || Poisson mean, Lambda || τ || Tau&lt;br /&gt;
|-&lt;br /&gt;
| χ || χ distribution, Chi || η || Eta&lt;br /&gt;
|-&lt;br /&gt;
| ρ || The density, Rho || τ || Sometimes used in tau function&lt;br /&gt;
|-&lt;br /&gt;
| ϕ || Normal density function, Phi || Θ || Parameter space&lt;br /&gt;
|-&lt;br /&gt;
| Γ || Gamma || Ω || Sample Space, Omega&lt;br /&gt;
|-&lt;br /&gt;
| ∂ || Per/ divided || δ || Lower case for Delta&lt;br /&gt;
|-&lt;br /&gt;
| S || Sample space|| Κ,k || Kappa&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Parametric model: a collection of probability distribution that can be described using a finite number of parameters. These parameters are usually collected together to form a single k-dimensional parameter vector $\theta=(\theta_1,\theta_2,…,\theta_k)$. The main characteristics of a parametric mode: all the parameters are in finite-dimensional parameter spaces.&lt;br /&gt;
&lt;br /&gt;
: Each member of the collection of the parametric model $ p_θ $ is described by a finite-dimensional parameter $ θ $. The set of all allowable values for the parameter is denoted $ Θ⊆R^k $, and the model itself is written as $ P={p_θ |θ∈Θ} $, when the model consists of absolutely continuous distribution, it is often specified in terms of corresponding probability density function $ P={f_θ |θ∈Θ}$. It’s identifiable if the mapping $ θ→p_θ $ is invertible, that is there are no two different parameter value $ θ_1 $ and $ θ_2 $ such that $ p_{θ_1} =p_{θ_2} $.&lt;br /&gt;
&lt;br /&gt;
: Consider one of the most popular distribution of normal distribution, where the parameter is $ θ=(μ,σ) $, where $ μ∈R $ is a location parameter, and σ&amp;gt;0 is a scale parameter. This parameterized family: &lt;br /&gt;
$$ p=\{f_θ (x)=\frac{1}{\sqrt{2πσ}} e^{-\frac{1}{2σ^2}{({x-μ}^2)}} |μ∈R,σ&amp;gt;0\}.$$&lt;br /&gt;
&lt;br /&gt;
* Parametric inference: Often, we are interested in estimating $ \theta $, or more generally, a function of $ \theta $, say $ g(\theta) $. Let’s consider a few examples that will enable us to understand this.&lt;br /&gt;
** Let $ x_1,x_2,…,x_n $ be the outcomes of n independent flips of the same coin. Here, we code $ X_i=1 $ if the $i^{th}$ toss produces a Head and code $ X_i=0 $ if the $i^{th}$ toss produces a tail. So $ \theta $, which is the probability of flipping a head in a single toss could be any number between 0 and 1. We know that $ x_i$’s are i.i.d. and the common distribution $ p_{\theta} $ is the Bernoulli $ (\theta) $ distribution which has the probability mass function of $ f(x,\theta)=\theta^x (1-\theta)^(1-x), x \in {0,1} $. If we repeat the experiment with the same coin for enough time, the average number of heads we will have would be $n \theta$.&lt;br /&gt;
**Let $ x_1,x_2,…,x_n $ be the number of customers that arrive at $n$ different identical counters in unit time. Then the $ X_i$'s can be though of as i.i.d. random variable with Poisson distribution with mean $ \theta $, which varies in the set $ (0,\infty) $, representing the parameter space $ \Theta $. The probability mass function of $ f(x,\theta)=e^{-\theta} \frac{\theta^{x}}{x!}$, for each $x=0, 1, 2, ...$.&lt;br /&gt;
&lt;br /&gt;
: After determining the parameters in the model, we will be able to apply the characteristic of the distribution and the model to the data. The characteristics of various distributions will be discussed further in the [[SMHS_ProbabilityDistributions|Distribution section]]. We will also discuss about hypothesis testing and estimation later. &lt;br /&gt;
&lt;br /&gt;
====Random number generation====&lt;br /&gt;
* R examples: the random variable follows a normal distribution, $ N(0,1) $. &lt;br /&gt;
* Random number generator to get 10 random variables follow a normal distribution with mean 0, variance 1:&lt;br /&gt;
 &amp;gt; runif(10,0,1)&lt;br /&gt;
 [1] 0.64900447    0.82074379    0.56889471    0.95659206    0.69771341    0.19772881    0.07656862&lt;br /&gt;
 [8] 0.29823980    0.31825198    0.45029058 &lt;br /&gt;
&lt;br /&gt;
* Generate 5 random variables follow a Poisson distribution with $\lambda = 2$&lt;br /&gt;
 &amp;gt; rpois(5,2)&lt;br /&gt;
 [1] 3 2 1 4 1&lt;br /&gt;
&lt;br /&gt;
* Generate 5 random variables follow a Binomial distribution with $ p = 0.3, n = 10 $&lt;br /&gt;
 &amp;gt; rbinom(5,10,0.3)&lt;br /&gt;
 [1] 2 3 3 2 3&lt;br /&gt;
&lt;br /&gt;
* [[SOCR_EduMaterials_Activities_RNG|SOCR Random Number Generation Activity]]&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
* The article titled [http://link.springer.com/article/10.1007/BF00341287 Parametric Inference For Imperfectly Observed Gibbsian Fields] presents a maximum likelihood estimation method for imperfectly observed Gibbsian fields on a finite lattice. This method is an adaptation of the algorithm given in Younes. Presentation of the new algorithm is followed by a theorem about the limit of the second derivative of the likelihood when the lattice increases, which is related to convergence of the method. The paper offers some practical remarks about the implementation of the procedure.&lt;br /&gt;
&lt;br /&gt;
* [http://www.pnas.org/content/101/46/16138.short This article] uses graphical models that have been applied to these problems include hidden Markov models for annotation, tree models for phylogenetics, and pair hidden Markov models for alignment. A single algorithm, the sum-product algorithm, solves many of the inference problems that are associated with different statistical models. This article introduces the polytope propagation algorithm for computing the Newton polytope of an observation from a graphical model. This algorithm is a geometric version of the sum-product algorithm and is used to analyze the parametric behavior of maximum a posteriori inference calculations for graphical models.&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
*[http://socr.ucla.edu/htmls/SOCR_Distributions.html SOCR Distributions]&lt;br /&gt;
*[http://socr.ucla.edu/htmls/exp/Bivariate_Normal_Experiment.html Bivariate Normal Experiment] &lt;br /&gt;
*[http://socr.ucla.edu/htmls/dist/Multinomial_Distribution.html  Multinomial Distribution]&lt;br /&gt;
*[http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_Activities_Binomial_Distributions Activities with Binomial Distributions]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
* Suppose we are flipping a fair dice, what would be the average probability that we are going to roll three six in a row? What kind of model we are inferring on?&lt;br /&gt;
&lt;br /&gt;
* Consider the unfair coin flipping game, where the probability of flipping a head is unknown. Construct an experiment to test the probability of flipping a head in a single experiment. What is the probability that we are going to roll 5 heads out of 8 flips?&lt;br /&gt;
&lt;br /&gt;
* Random number generator is a commonly used in scientific studies. Explain how it works.&lt;br /&gt;
&lt;br /&gt;
* The average number of homes sold by realty Tom is 3 houses per day, what is the probability that exactly 4 houses will be sold tomorrow?&lt;br /&gt;
&lt;br /&gt;
* Suppose that the average number of patients with cancer seen per day is 5, what is the probability that less than 4 patients with cancer will be seen on the next day?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References===&lt;br /&gt;
* [http://www.itl.nist.gov/div898/handbook/eda/eda.htm NIST EDA]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Random_variable  Random variable Wikipedia]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Parameter  Parameter Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_ParamInference}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_UbiquitousVariation&amp;diff=13541</id>
		<title>SMHS UbiquitousVariation</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_UbiquitousVariation&amp;diff=13541"/>
		<updated>2014-08-29T16:42:34Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Ubiquitous Nature of Process Variability ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
In real world, variation exists in almost all the data set. The truth is no matter how controlled the environment is in the protocol or the design, virtually any repeated measurement, observation, experiment, trial, or study is bounded to generate data that varies because of intrinsic (internal to the system) or extrinsic (ambient environment) effects. And the extent to which they are unalike, or vary can be noted as variation. Variation is an important concept in statistics and measuring variability is of special importance in statistic inference. And measure of variation, which is namely measures that provided information on the variation, illustrates the extent to which data are dispersed or spread out. We will introduce several basic measures of variation commonly used in statistics: range, variation, standard deviation, sum of squares, Chebyshev’s theorem and empirical rules.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
Variation is of significant importance in statistics and it is ubiquitous in data. Consider the example in [[SMHS_UbiquitousVariation#References | UCLA’s study of Alzheimer’s disease]] which analyzed the data of 31 Mild Cognitive Impairment (MCI) and 34 probable Alzheimer’s disease (AD) patients. The investigators made every attempt to control as many variables as possible. Yet, demographic information they collected from the outcomes of the subjects contained unavoidable variation. The same study found variation in the MMSE cognitive scores even in the same subject. The table below shows the demographic characteristics for the subjects and patients included in this study, where the following notation is used M (male), F (female), W (white), AA (African American), A (Asian).&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;
| '''Variable''' || '''Alzheimer’s disease''' || '''MCI''' || '''Test statistics''' || '''Test score''' || '''P-value'''&lt;br /&gt;
|-&lt;br /&gt;
| '''Age (years)''' || 76.2 (8.3) range 52–89 || 73.7 (7.4) range 57–84 || Student’s T  || $t_o = 1.284$ || ''p=0.21''&lt;br /&gt;
|-&lt;br /&gt;
| '''Gender (M:F)''' || 15:19 || 15:16 || Proportion || $z_o = -0.345$  || ''p=0.733''&lt;br /&gt;
|-&lt;br /&gt;
| '''Education (years)''' || 14.0 (2.1) range 12–19 || 16.23 (2.7) range 12–20 || Wilcoxon rank sum || $w_o = 773.0$  || ''p&amp;lt;0.001''&lt;br /&gt;
|-&lt;br /&gt;
| '''Race (W:AA:A)'''  || 29:1:4 || 26:2:3 || $\chi_{(df=2)}^2$ || $\chi_{(df=2)}^2=1.18$ || 0.55&lt;br /&gt;
|-&lt;br /&gt;
| '''MMSE''' || 20.9 (6.3) range 4–29 || 28.2 (1.6) range 23–30 || Wilcoxon rank-sum || $w_o= 977.5$   || ''p&amp;lt;0.001''&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once we accept that all natural phenomena are inherently variant and there aren’t completely deterministic processes, we need to look for measures of variation that allow us to know the extent to which the data are dispersed. Suppose, for instance, we flip a coin 50 times and get 15 heads and 35 tails. But according to the fundamental probability theory where we assume it’s a fair coin, we should have got 25 heads and 25 tails. So, what happened here? Now, suppose there are 100 students and each one flipped the coin 50 times. So, how would you imagine the results to be?&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
Measures of variation:&lt;br /&gt;
* '''Range''': range is the simplest measure of variation and it is the difference between the largest value and the smallest. Range = Maximum – Minimum. &lt;br /&gt;
: Suppose the pulse rate of Jack varied from 70 to 76 while that of Tom varied from 58 to 79. Here we have Jack has a range of 76 – 70 = 6 and Tom has a range of 79 – 58 = 21. Hence we conclude that Tom has a big variation in pulse rate compared to Jack with the range measure.&lt;br /&gt;
: A similar measure of variation covers (more or less) the middle 50 percent. It is the interquartile range: Q&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; - Q &amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; where Q &amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; and Q &amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; are the first and third quarters.&lt;br /&gt;
&lt;br /&gt;
* '''Variance''': unlike range, which only involves the largest and smallest data, variance involves all the data values.&lt;br /&gt;
** Population variance: is the second central moment, relative to the mean (first moment) $\mu =E(X)$: $ \operatorname{Var}(X) = \operatorname{E}\left[(X - \mu)^2 \right].$&lt;br /&gt;
**Unbiased estimate of the population variance (sample-variance): $s^2=\frac{\sum {(x_i-\bar{x})^2}}{n-1}$, where $\bar{x}$ is the sample mean and n is the sample size.&lt;br /&gt;
&lt;br /&gt;
* '''Standard deviation''' (SD): It is the square root of variance. Given that the deviations in variance were squared, meaning the units were squared, so to take the square root of the variance gets the unit back the same as the original data values.&lt;br /&gt;
**Population SD: $\sigma =\sqrt{E(X-\mu)^2}$, where $\mu$ is the population mean of the data.&lt;br /&gt;
**Unbiased estimate of the population stand deviation (sample standard deviation): $s=\sqrt{\frac{\sum {(x_i-\bar{x})^2}}{n-1}}$ where $\bar{x}$ is the sample mean and n is the sample size.	&lt;br /&gt;
&lt;br /&gt;
:: Consider an example: a biologist found 8, 11, 7, 13, 10, 11, 7 and 9 contaminated mice in 8 groups. Calculate $s$. The sample average is:&lt;br /&gt;
:: $\bar{x} =\frac{8+11+7+13+10+11+7+9}{8}=9.5$.&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;
| x || 8 || 11 || 7 || 13 || 10 || 11 || 7 || 9 || Sum&lt;br /&gt;
|-&lt;br /&gt;
| $\sum {(x_i-\bar{x})}$ || -1.5  || 1.5 || -2.5 || 3.5 || 0.5 || 1.5 || -2.5 ||-0.5 || 0&lt;br /&gt;
|-&lt;br /&gt;
| $\sum {(x_i-\bar{x})^2}$ || 2.25 || 2.25|| 6.25 || 12.25 || 0.25 || 2.25 || 6.25 || 0.25 || 32&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:: $s=\sqrt{\frac{\sum {(x_i-\bar{x})^2}}{n-1}} = \sqrt{\frac{32}{7}} \approx 2.14$&lt;br /&gt;
&lt;br /&gt;
* '''Sum of squares''' (shortcuts)&lt;br /&gt;
: The sum of the squares of the deviations fro the means is given a shortcut notation and several alternative formulas.&lt;br /&gt;
$$SS(x)=\sum_{i} {(x_i - \bar{x})^2}$$ &lt;br /&gt;
: A little algebraic simplification yields: $SS(x)=\sum_i {x_i^2} - \frac{(\sum_i{x_i})^2}{n}$.&lt;br /&gt;
&lt;br /&gt;
* '''Chebyshev’s Theorem''': The proportion of the values that fall within $k$ standard deviations of the mean will be at least $1-1/k^2$ where $k$ is the number greater than 1. Chebyshev’s theorem is true for any sample set from any (well-defined) distribution. Formally, if ''X'' is a random variable from a distribution with finite mean ($\mu$) and finite non-zero variance ($\sigma^2$), then for any real number $k &amp;gt; 0$, $\Pr(|X-\mu|\geq k\sigma) \leq \frac{1}{k^2}$.&lt;br /&gt;
&lt;br /&gt;
: The useful case is when $k \gt 1$ as when $k \lt 1$ the right-hand side is greater than one, and all probabilities are smaller than or equal to one. If $k=1$, the inequality degenerates into a trivial fact, saying that the probability is less than or equal to one.&lt;br /&gt;
: Example, using $k=\sqrt{2}$ yields that at least half of the values of this distribution lie in the (symmetric) interval $\mu − \sqrt{2}\sigma, \mu + \sqrt{2}\sigma$. Note that this is true for all distributions, whether symmetric or not.&lt;br /&gt;
&lt;br /&gt;
* '''Empirical Rule''': This rule only works for bell-shaped (normal) distributions. With this kind of distribution, we have: approximately 68% of the data values fall within one standard deviation of the mean; approximately 95% of the data values fall within two standard deviations of the mean; approximately 99.7% of the data values fall within three standard deviations of the mean.&lt;br /&gt;
&lt;br /&gt;
=== Applications===&lt;br /&gt;
* [http://www.nature.com/ng/journal/v39/n7s/full/ng2042.html This article titled The Population Genetics of Structural Variation], talked about genomic variation in human genome. It summarized recent dramatic advances and illustrated on the diverse mutational origins of chromosomal rearrangements and argued about their complexity necessitates a re-evaluation of existing population genetic methods. It started with an introduction on genomic variants including their biological significance, their basic characteristics leading to the importance of study on structural variation. It then pointed out the improvements in knowledge of structural variation in human genome compared to the current state of studies in structural variation in human genome and ended with two important future challenges in the study of structural variation.&lt;br /&gt;
&lt;br /&gt;
===Software ===&lt;br /&gt;
* [http://www.alcula.com/calculators/statistics/range/ Range]&lt;br /&gt;
* [http://www.alcula.com/calculators/statistics/variance/ Variance calculator]&lt;br /&gt;
* [http://easycalculation.com/statistics/standard-deviation.php  Standard Deviation calculator]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
* Let X be a random variable with mean 80 and standard deviation 12. Find the mean and the standard deviation of the following variable: X-20. Choose one answer.&lt;br /&gt;
: (a) Mean = 60, standard deviation = 144&lt;br /&gt;
: (b) Mean = 60, standard deviation = 12&lt;br /&gt;
: (c) Mean = 80, standard deviation = 12&lt;br /&gt;
: (d) Mean = 60, standard deviation = -8&lt;br /&gt;
&lt;br /&gt;
* A physician collected data on 1000 patients to examine their heights. A statistician hired to look at the files noticed the typical height was about 60 inches, but found that one height was 720 inches. This is clearly an outlier. The physician is out of town and can't be contacted, but the statistician would like to have some preliminary descriptions of the data to present when the doctor returns. Which of the following best describes how the statistician should handle this outlier? Choose one answer.&lt;br /&gt;
: (a) The statistician should publish a paper on the emergence of a new race of giants.&lt;br /&gt;
: (b) The statistician should keep the data point in; each point is too valuable to drop one.&lt;br /&gt;
: (c) The statistician should drop the observation from the analysis because this is clearly a mistake; the person would be 60 feet tall.&lt;br /&gt;
: (d) The statistician should analyze the data twice, once with and once without this data point, and then compare how the point affects conclusions.&lt;br /&gt;
: (e) The statistician should drop the observation from the dataset because we can't analyze the data with it.&lt;br /&gt;
&lt;br /&gt;
* Researchers do a study on the number of cars that a person owns. They think that the distribution of their data might be normal, even though the median is much smaller than the mean. They make a p-plot. What does it look like? Choose one answer.&lt;br /&gt;
: (a) It's not a straight line.&lt;br /&gt;
: (b) It's a bell curve.&lt;br /&gt;
: (c) It's a group of points clustered around the middle of the plot.&lt;br /&gt;
: (d) It's a straight line.&lt;br /&gt;
&lt;br /&gt;
* Which of the following parameters is most sensitive to outliers? Choose one answer.&lt;br /&gt;
: (a) Standard deviation&lt;br /&gt;
: (b) Interquartile range&lt;br /&gt;
: (c) Mode&lt;br /&gt;
: (d) Median&lt;br /&gt;
&lt;br /&gt;
* Which value given below is the best representative for the following data?&lt;br /&gt;
&amp;lt;center&amp;gt;2, 3, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 9, 9, 9, 9, 10, 11&amp;lt;/center&amp;gt;&lt;br /&gt;
: Choose one answer.&lt;br /&gt;
: (a) The weighted average of the two modes or (4*5 + 9*5)/10 = 6.5&lt;br /&gt;
: (b) No single number could represent this data set&lt;br /&gt;
: (c) The average of the two modes or (4 + 9) / 2 = 6.5&lt;br /&gt;
: (d) The mean or (2 + 3 + 4 + … + 10 + 11)/18 = 5.9&lt;br /&gt;
: (e) The median or (6 + 7)/2 = 6.5&lt;br /&gt;
&lt;br /&gt;
* The following data is collected from website for 121 schools and included these attributes about each institution: name, public or private institution, state, , cost of health insurance, resident tuition, resident fees, resident total expenses, nonresident tuition, nonresident fees, and nonresident total expenses in 2005. So was surprised that medical schools charge no tuition for residents. However, other students pay about $\$20,000$ in fees.&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;
|  || Min || Q1 || Median || Q3 || Max  &lt;br /&gt;
|- &lt;br /&gt;
| Private || -$\$6,550$ || $\$30,729$ || $\$33,850$ || $\$36,685$ || $\$41,360$ &lt;br /&gt;
|- &lt;br /&gt;
| Public || $\$0$ || $\$10,219$ || $\$16,168$ || $\$18,800$ || $\$27,886$ &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: On the same scale, use the 5-Number summary to construct two boxplots for the tuition for residents at 73 public and 48 private medical colleges. Use the data and plots to determine which statement about centers is true.&lt;br /&gt;
: (a) For private medical schools, the mean tuition of residents is greater than the median tuition for residents.&lt;br /&gt;
: (b) With these data, we cannot determine the relationship between mean and median tuition for residents.&lt;br /&gt;
: (c) For private medical schools, the mean tuition of residents is equal to the median tuition for residents.&lt;br /&gt;
: (d) For private medical schools, the mean tuition of residents is less the median tuition for residents.&lt;br /&gt;
&lt;br /&gt;
* Suppose that we create a new data set by doubling the highest value in a large data set of positive values. What statement is FALSE about the new data set? Choose one answer.&lt;br /&gt;
: (a) The mean increases&lt;br /&gt;
: (b) The standard deviation increases&lt;br /&gt;
: (c) The range increases&lt;br /&gt;
: (d) The median and interquartile range both increase&lt;br /&gt;
&lt;br /&gt;
* Consider a large data set of positive values and multiply each value by 100. Which of the following statement is true? Choose one answer.&lt;br /&gt;
: (a) The mean, median, and standard deviation increase&lt;br /&gt;
: (b) The mean and median increase but the standard deviation is unchanged.&lt;br /&gt;
: (c) The standard deviation increases but the mean and median are unchanged.&lt;br /&gt;
: (d) The range and interquartile range are unchanged&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
*[http://brain.oxfordjournals.org/cgi/reprint/awl274v1.pdf 3D comparison of hippocampal atrophy in amnestic mild cognitive impairment and Alzheimer's disease.] &lt;br /&gt;
*[http://wiki.stat.ucla.edu/socr/index.php/AP_Statistics_Curriculum_2007_IntroVar (SOCR EBook) Introduction to Variability]&lt;br /&gt;
*[https://people.richland.edu/james/lecture/m170/ch03-var.html  online article]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_UbiquitousVariation}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_EDA&amp;diff=13540</id>
		<title>SMHS EDA</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_EDA&amp;diff=13540"/>
		<updated>2014-08-29T16:40:48Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Exploratory Data Analysis (EDA), Charts and Plots ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
* ''What is data?'' Data is a collection of facts, observations or information, such as values or measurements. Data can be numbers, measurements, or even just description of things (meta-data). Data types can be divided into two big categories of quantitative (numerical information) and qualitative data (descriptive information). &lt;br /&gt;
&lt;br /&gt;
*''Quantitative data'' is anything that can be expressed as a number, or quantified. For example, the scores on a math test or weight of girls in the fourth grade are both quantitative data. Quantitative data (discrete or continuous) is often referred to as the measurable data and this type of data allows scientists to perform various arithmetic operations, such as addition, multiplication, functional-evaluation, or to find parameters of a population. There are two major types of quantitative data: discrete and continuous.&lt;br /&gt;
**Discrete data results from either a finite, or infinite but countable, possible options for the values present in a given discrete data set and the values of this data type can constitute a sequence of isolated or separated points on the real number line.&lt;br /&gt;
**Continuous quantitative data results from infinite and dense possible values that the observations can take on. &lt;br /&gt;
&lt;br /&gt;
*''Qualitative'' data cannot be expressed as numbers. Examples of qualitative data elements include gender, religious preference. Categorical data (qualitative or nominal) results from placing individuals into groups or categories. Ordinal and qualitative categorical data types both fall into this category.&lt;br /&gt;
&lt;br /&gt;
In statistics, exploratory data analysis (EDA) is an approach to analyze data sets to summarize their main characteristics. Modern statistics regards the graphical visualization and interrogation of data as a critical component of any reliable method for statistical modeling, analysis and interpretation of data. Formally, there are two types of data analysis that should be employed in concert on the same set of data to make a valid and robust inference: graphical techniques and quantitative techniques. We will discuss many of these later, but below is a snapshot of EDA approaches:&lt;br /&gt;
* [[SOCR_EduMaterials_Activities_BoxPlot|Box plot]], [[SOCR_EduMaterials_Activities_Histogram_Graphs|Histogram]]; Multi-vari chart; Run chart; Pareto chart; [[SOCR_EduMaterials_Activities_ScatterChart|Scatter plot]]; Stem-and-leaf plot; &lt;br /&gt;
* Parallel coordinates; Odds ratio; Multidimensional scaling; Targeted projection pursuit; Principal component analysis; Multi-linear PCA; Projection methods such as grand tour, guided tour and manual tour.&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Median_polish Median polish], [http://en.wikipedia.org/wiki/Trimean Trimean].&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The feel of data comes clearly from the application of various graphical techniques, which serves as a perfect window to human perspective and sense. The primary goal of EDA is to maximize the analyst’s insight into a data set and into the underlying structure of the data set. To get a feel for the data, it is not enough for the analyst to know what is in the data, he or she must also know what is not in the data, and the only way to do that is to draw on our own pattern recognition and comparative abilities in the context of a series of judicious graphical techniques applied to the data. The main objectives of EDA are to:&lt;br /&gt;
* Suggest hypotheses about the causes of observed phenomena; &lt;br /&gt;
* Assess (parametric) assumptions on which statistical inference will be based; &lt;br /&gt;
* Support the selection of appropriate statistical tools and techniques; &lt;br /&gt;
* Provide a basis for further data collection through surveys and experiments.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
Many EDA techniques have been proposed, validated and adopted for various statistical methodologies. Here is an introduction to some of the frequently used EDA charts and the quantitative techniques. &lt;br /&gt;
&lt;br /&gt;
====[[SOCR_EduMaterials_Activities_BoxPlot|Box-and-Whisker plot]]====&lt;br /&gt;
[[SOCR_EduMaterials_Activities_BoxPlot|Box-and-Whisker plot]] is an efficient way for presenting data, especially for comparing multiple groups of data. In the box plot, we can mark-off the five-number summary of a data set (minimum, 25&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile, median, 75&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile, maximum). The box contains the 50% of the data. The upper edge of the box represents the 75&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile, while the lower edge is the 25&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile. The median is represented by a line drawn in the middle of the box. If the median is not in the middle of the box then the data are skewed. The ends of the lines (whiskers) represent the minimum and maximum values of the data set, unless there are outliers. Outliers are observations below \( Q_1-1.5(IQR) \) or above \( Q_3+1.5(IQR) \), where \( Q_1 \) is the 25&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile, \( Q_3 \) is the 75&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile, and \( IQR=Q_3-Q_1 \) (the interquartile range). The advantage of a box plot is that it provides graphically the location and the spread of the data set, it provides an idea about the skewness of the data set, and can provide a comparison between variables by constructing a side-by-side box plots.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS EDA Gallaway 07012014 Fig1a.png|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====[[SOCR_EduMaterials_Activities_Histogram_Graphs|Histogram]]====&lt;br /&gt;
Histograms represent a graphical visualization of tabulated frequencies or counts of data within equal spaced partition of the range of the data. It shows what proportion of measurements that fall into each of the categories defined by the partition of the data range space.&lt;br /&gt;
[[Image:UMHS Gallawaay 07012014 Fig2.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
* Comment: Compare the two series from the histogram above, we can easily tell that the pattern of series 2 if more obvious compared to series 1. Our intuition may come from: series 1 has more extreme values across five days, for example, the values for Jan 1st and Jan 3rd are extremely high (almost 55 for Jan 1st) while that for Jan 4th is almost -12. However values for series 2 are all above 0 and fluctuated between 5 and 20.&lt;br /&gt;
&lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig3.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
* Comment: The Dot chart above gives a clear picture of the values of all the data points and makes the fundamental measurements easily readable. We can tell that most of the values of the data fluctuate between 1 and 7 with mean 3.9 and median 4. There are two obvious outliers valued -2 and 10. &lt;br /&gt;
&lt;br /&gt;
====[[SOCR_EduMaterials_Activities_ScatterChart|Scatter plot]]====&lt;br /&gt;
Scatter plots use Cartesian coordinates to display values for two variables for a set of data, which is displayed as a collection of points. The value of variable is determined by the position on the horizontal and vertical axis. &lt;br /&gt;
&lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig4.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
* Comment: The x and y axes display values for two variables and all the data points drawn in the chart are coordinates indicating a pair of values for both variables. &lt;br /&gt;
&lt;br /&gt;
For the first series, all the data points lie on and above the diagonal line so with increasing x variable, the paired y variable increases faster or equal to x variable. We can infer a positive linear association between X and Y.&lt;br /&gt;
&lt;br /&gt;
For the second series, most data located along the line except for two outliers (4,8) and (1,5). So for most data points, with increasing x variable, the paired y variable decreases slower or equal to x. We may infer a negative linear association between X and Y.&lt;br /&gt;
&lt;br /&gt;
For the third series, we can’t draw a line association between X and Y, instead, a quadratic pattern would work better here.&lt;br /&gt;
&lt;br /&gt;
====[[SOCR_EduMaterials_Activities_QQChart|QQ Plot]]====&lt;br /&gt;
In Quantile-Quantile plots, the observed values are plotted against theoretical quantiles in QQ charts. A line of good fit is drawn to show the behavior of the data values against the theoretical distribution. If F() is a cumulative distribution function, then a quantile (q), also known as a percentile, is defined as a solution to the equation \(F(q)=p\),that is \(q=F^{-1}(p)\).&lt;br /&gt;
&lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig5.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
*Comment: From the chart above, we can see that the data follows a normal distribution in general given all the data points (noted in red) located along side the line. However, the data doesn’t follow a normal distribution tightly because there are data points located pretty far from the line. We can also infer that the sampled data may not be representative enough of the population because of the limited size of the sample. &lt;br /&gt;
&lt;br /&gt;
====Median polish====&lt;br /&gt;
Median polish is an EDA procedure proposed by [http://en.wikipedia.org/wiki/John_Tukey John Tukey]. It finds an additively fit model for data in a two-way layout table of the form row effect + column effect + overall mean. It is an iterative algorithm for removing any trends by computing medians for various coordinates on the spatial domain D.&lt;br /&gt;
&lt;br /&gt;
==== Trimean====&lt;br /&gt;
Trimean is a measure of a probability distribution’s location defined as a weighted average of the distribution’s median and its two quartiles. It combines the median’s emphasis on center values with the midhinge’s attention to the extremes. And it is a remarkably efficient estimator of population mean especially for large data set (say more than 100 points) from a symmetric population.&lt;br /&gt;
&amp;lt;center&amp;gt; \( \frac{Q_1+2Q_2+Q_3}{4} \)  &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
* [http://www.itl.nist.gov/div898/handbook/eda/eda.htm This article] provides a thorough introduction to EDA. It discusses the basic concepts, objectives, and techniques associated with EDA. It also includes case studies in which EDA is applied.  The case studies include eight type of charts for univariate analyses and introduce the concepts of reliability and multi-factor studies. The article gives specific examples with background, output and interpretations of results is a useful resource for learning EDA. &lt;br /&gt;
* [http://www.stat.cmu.edu/~hseltman/309/Book/chapter4.pdf This article] begins with a general introduction to data analysis and explains EDA via examples that employ various graphical analyses. This article serves as a basic and general introduction to the concepts associated with EDA and is a good starting place for studying these concepts. &lt;br /&gt;
* The [http://wiki.stat.ucla.edu/socr/index.php/SOCR_HTML5_Expansion_MotionCharts SOCR Motion Charts Project enables complex data visualization, see the [http://socr.umich.edu/HTML5/MotionChart/ SOCR MotionChart webapp]. The SOCR Motion Charts provide an interactive infrastructure for discovery-based exploratory analysis of multivariate data. &lt;br /&gt;
&lt;br /&gt;
Now, we want to explore the relationship between two variables in the [[SOCR_Data_Dinov_010309_HousingPriceIndex| dataset: UR (Unemployment Rate) and HPI (Housing Price Index) in the state of Alabama over 2000 to 2006]]. First, how does the UR in Alabama change from 2000 to 2006? &lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig6.PNG|800px]]&lt;br /&gt;
&lt;br /&gt;
From this chart, we can see that the UR in Alabama increases from 2000 to 2003 then decreases sharply from 2004 to 2006. So you may wonder what is UR for states from other part of the country over the same period?&lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig7.PNG|800px]]&lt;br /&gt;
&lt;br /&gt;
All the states appear to follow similar patterns. Now, let’s study relationships between UR and HPI in a single state, say Alabama, across this time span. &lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig8.PNG|800px]]&lt;br /&gt;
&lt;br /&gt;
The chart above suggests that HPI increases through time in Alabama, while UR increases at first and then exhibits a sharp drop between 2004 and 2006. If there is any association between UR and HPI, it appears to be quadratic rather than linear. Similarly, if we extend the graph to the three states from different regions, we generate the following chart: &lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig9.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
We can now address the question: is there any association between UR and HPI among all the states based on the chart? &lt;br /&gt;
The motion chart, however, makes the study much more interesting by exhibiting a moving chart with UR vs. HPI of 51 states from different areas during the period from 2000 to 2006. This allows us to get an idea of the changing values over the years among all states. You’re welcome to play with the data to see how the chart changes using the link listed above.&lt;br /&gt;
&lt;br /&gt;
===Software ===&lt;br /&gt;
* [http://www.socr.umich.edu/html/cha SOCR Charts]&lt;br /&gt;
* [http://www.r-bloggers.com/exploratory-data-analysis-useful-r-functions-for-exploring-a-data-frame/ R EDA functions]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
* Work on problems in [http://www.itl.nist.gov/div898/handbook/eda/section4/eda42.htm Uniform Random Numbers and Random Walk from this Case Study].&lt;br /&gt;
&lt;br /&gt;
* Two random samples were taken to determine backpack load difference between seniors and freshmen, in pounds. The following are the summaries:&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;
| Year|| Mean || SD || Median || Min ||Max || Range|| Count &lt;br /&gt;
|-&lt;br /&gt;
| Freshmen || 20.43 || 4.21 || 17.2 || 5.78 || 31.68 || 25.9 || 115&lt;br /&gt;
|-&lt;br /&gt;
| Senior || 18.67 || 4.21 || 18.67 || 5.31 || 27.66 || 22.35 ||157&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Which of the following plots would be the most useful in comparing the two sets of backpack weights? Choose One Answer:&lt;br /&gt;
: (a) Histograms&lt;br /&gt;
: (b) Dot Plots&lt;br /&gt;
: (c) Scatter Plots&lt;br /&gt;
: (d) Box Plots&lt;br /&gt;
&lt;br /&gt;
* School administrators are interested in examining the relationship between height and GPA. What type of plot should they use to display this relationship? Choose one answer.&lt;br /&gt;
: (a) box plot&lt;br /&gt;
: (b) scatter plot&lt;br /&gt;
: (c) line plot&lt;br /&gt;
: (d) dot plot&lt;br /&gt;
&lt;br /&gt;
* What would be the most appropriate plot for comparing the heights of the 8th graders from different ethnic backgrounds? Choose one answer.&lt;br /&gt;
: (a) bar charts&lt;br /&gt;
: (b) side by side boxplot&lt;br /&gt;
: (c) histograms&lt;br /&gt;
: (d) pie charts&lt;br /&gt;
&lt;br /&gt;
* There is a company in which a very small minority of males (3%) receives three times the median salary of all males, and a very small minority of females (3%) receives one-third of the median salary of all females. What do you expect the side-by-side boxplot of male and female salaries to look like? Choose one answer.&lt;br /&gt;
: (a) Both boxplots will be skewed and the median line will not be in the middle of any of the boxes.&lt;br /&gt;
: (b) Both boxplots will be skewed, in the case of the females the median line will be close to the top of the box and in the case of the males the median line will be closer to the bottom of the box.&lt;br /&gt;
: (c) Need to have the actual data to compare the shape of the boxplots.&lt;br /&gt;
: (d) Both boxplots will be skewed, in the case of males the median line will be close to the top of the box and for the females the median line will be closer to the bottom of the box.&lt;br /&gt;
&lt;br /&gt;
* A researcher has collected the following information on a random sample of 200 adults in the 40-50 age range: Weight in pounds Heart beats per minute Smoker or non-smoker Single or married&lt;br /&gt;
He wants to examine the relationship between: 1) heart beat per minute and weight, and 2) smoking and marital status. Choose one answer.&lt;br /&gt;
: (a) He should draw a scatter plot of heart beat and weight, and a segmented bar chart of smoking and marital status.&lt;br /&gt;
: (b) He should draw a side by side boxplot of heart beat and weight and a scatterplot of smoking and marital status.&lt;br /&gt;
: (c) He should draw a side by side boxplot of smoking and marital status and a segmented bar chart of hear beat and weight.&lt;br /&gt;
: (d) He should draw a back to back stem and leaf plot of weight and heart beat and examine the cell frequencies in the contingency table for smoking by marital status.&lt;br /&gt;
&lt;br /&gt;
* As part of an experiment in perception, 160 University of Michigan psych students completed a task on identifying similar objects. On average, the students spent 8.25 minutes with sa tandard deviation of 2.4 minutes. However, the minimum time was 2.3 minutes and one students worked for almost 60 minutes. What is the best description of the histogram of times that students spent on this task? Choose one answer.&lt;br /&gt;
: (a) The histogram of times could be symmetrical and not normal with major outliers.&lt;br /&gt;
: (b) The histogram of times could be left skewed, and in case there are any outliers, it is likely that they will be smaller than the mean.&lt;br /&gt;
: (c) The histogram of times could be right skewed, and in the case of any outliers, it is likely that they will be larger than the mean.&lt;br /&gt;
: (d) The histogram of times could be normal with no major outliers.&lt;br /&gt;
&lt;br /&gt;
=== References===&lt;br /&gt;
* [http://wiki.stat.ucla.edu/socr/index.php/AP_Statistics_Curriculum_2007_EDA_Plots  SOCR]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Exploratory_data_analysis Exploratory data analysis Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_EDA}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_EDA&amp;diff=13539</id>
		<title>SMHS EDA</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_EDA&amp;diff=13539"/>
		<updated>2014-08-29T16:40:34Z</updated>

		<summary type="html">&lt;p&gt;Liyufang: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==[[SMHS| Scientific Methods for Health Sciences]] - Exploratory Data Analysis (EDA), Charts and Plots ==&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
* ''What is data?'' Data is a collection of facts, observations or information, such as values or measurements. Data can be numbers, measurements, or even just description of things (meta-data). Data types can be divided into two big categories of quantitative (numerical information) and qualitative data (descriptive information). &lt;br /&gt;
&lt;br /&gt;
*''Quantitative data'' is anything that can be expressed as a number, or quantified. For example, the scores on a math test or weight of girls in the fourth grade are both quantitative data. Quantitative data (discrete or continuous) is often referred to as the measurable data and this type of data allows scientists to perform various arithmetic operations, such as addition, multiplication, functional-evaluation, or to find parameters of a population. There are two major types of quantitative data: discrete and continuous.&lt;br /&gt;
**Discrete data results from either a finite, or infinite but countable, possible options for the values present in a given discrete data set and the values of this data type can constitute a sequence of isolated or separated points on the real number line.&lt;br /&gt;
**Continuous quantitative data results from infinite and dense possible values that the observations can take on. &lt;br /&gt;
&lt;br /&gt;
*''Qualitative'' data cannot be expressed as numbers. Examples of qualitative data elements include gender, religious preference. Categorical data (qualitative or nominal) results from placing individuals into groups or categories. Ordinal and qualitative categorical data types both fall into this category.&lt;br /&gt;
&lt;br /&gt;
In statistics, exploratory data analysis (EDA) is an approach to analyze data sets to summarize their main characteristics. Modern statistics regards the graphical visualization and interrogation of data as a critical component of any reliable method for statistical modeling, analysis and interpretation of data. Formally, there are two types of data analysis that should be employed in concert on the same set of data to make a valid and robust inference: graphical techniques and quantitative techniques. We will discuss many of these later, but below is a snapshot of EDA approaches:&lt;br /&gt;
* [[SOCR_EduMaterials_Activities_BoxPlot|Box plot]], [[SOCR_EduMaterials_Activities_Histogram_Graphs|Histogram]]; Multi-vari chart; Run chart; Pareto chart; [[SOCR_EduMaterials_Activities_ScatterChart|Scatter plot]]; Stem-and-leaf plot; &lt;br /&gt;
* Parallel coordinates; Odds ratio; Multidimensional scaling; Targeted projection pursuit; Principal component analysis; Multi-linear PCA; Projection methods such as grand tour, guided tour and manual tour.&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Median_polish Median polish], [http://en.wikipedia.org/wiki/Trimean Trimean].&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
The feel of data comes clearly from the application of various graphical techniques, which serves as a perfect window to human perspective and sense. The primary goal of EDA is to maximize the analyst’s insight into a data set and into the underlying structure of the data set. To get a feel for the data, it is not enough for the analyst to know what is in the data, he or she must also know what is not in the data, and the only way to do that is to draw on our own pattern recognition and comparative abilities in the context of a series of judicious graphical techniques applied to the data. The main objectives of EDA are to:&lt;br /&gt;
* Suggest hypotheses about the causes of observed phenomena; &lt;br /&gt;
* Assess (parametric) assumptions on which statistical inference will be based; &lt;br /&gt;
* Support the selection of appropriate statistical tools and techniques; &lt;br /&gt;
* Provide a basis for further data collection through surveys and experiments.&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
Many EDA techniques have been proposed, validated and adopted for various statistical methodologies. Here is an introduction to some of the frequently used EDA charts and the quantitative techniques. &lt;br /&gt;
&lt;br /&gt;
====[[SOCR_EduMaterials_Activities_BoxPlot|Box-and-Whisker plot]]====&lt;br /&gt;
[[SOCR_EduMaterials_Activities_BoxPlot|Box-and-Whisker plot]] is an efficient way for presenting data, especially for comparing multiple groups of data. In the box plot, we can mark-off the five-number summary of a data set (minimum, 25&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile, median, 75&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile, maximum). The box contains the 50% of the data. The upper edge of the box represents the 75&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile, while the lower edge is the 25&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile. The median is represented by a line drawn in the middle of the box. If the median is not in the middle of the box then the data are skewed. The ends of the lines (whiskers) represent the minimum and maximum values of the data set, unless there are outliers. Outliers are observations below \( Q_1-1.5(IQR) \) or above \( Q_3+1.5(IQR) \), where \( Q_1 \) is the 25&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile, \( Q_3 \) is the 75&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; percentile, and \( IQR=Q_3-Q_1 \) (the interquartile range). The advantage of a box plot is that it provides graphically the location and the spread of the data set, it provides an idea about the skewness of the data set, and can provide a comparison between variables by constructing a side-by-side box plots.&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:SMHS EDA Gallaway 07012014 Fig1a.png|500px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====[[SOCR_EduMaterials_Activities_Histogram_Graphs|Histogram]]====&lt;br /&gt;
Histograms represent a graphical visualization of tabulated frequencies or counts of data within equal spaced partition of the range of the data. It shows what proportion of measurements that fall into each of the categories defined by the partition of the data range space.&lt;br /&gt;
[[Image:UMHS Gallawaay 07012014 Fig2.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
* Comment: Compare the two series from the histogram above, we can easily tell that the pattern of series 2 if more obvious compared to series 1. Our intuition may come from: series 1 has more extreme values across five days, for example, the values for Jan 1st and Jan 3rd are extremely high (almost 55 for Jan 1st) while that for Jan 4th is almost -12. However values for series 2 are all above 0 and fluctuated between 5 and 20.&lt;br /&gt;
&lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig3.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
* Comment: The Dot chart above gives a clear picture of the values of all the data points and makes the fundamental measurements easily readable. We can tell that most of the values of the data fluctuate between 1 and 7 with mean 3.9 and median 4. There are two obvious outliers valued -2 and 10. &lt;br /&gt;
&lt;br /&gt;
====[[SOCR_EduMaterials_Activities_ScatterChart|Scatter plot]]====&lt;br /&gt;
Scatter plots use Cartesian coordinates to display values for two variables for a set of data, which is displayed as a collection of points. The value of variable is determined by the position on the horizontal and vertical axis. &lt;br /&gt;
&lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig4.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
* Comment: The x and y axes display values for two variables and all the data points drawn in the chart are coordinates indicating a pair of values for both variables. &lt;br /&gt;
&lt;br /&gt;
For the first series, all the data points lie on and above the diagonal line so with increasing x variable, the paired y variable increases faster or equal to x variable. We can infer a positive linear association between X and Y.&lt;br /&gt;
&lt;br /&gt;
For the second series, most data located along the line except for two outliers (4,8) and (1,5). So for most data points, with increasing x variable, the paired y variable decreases slower or equal to x. We may infer a negative linear association between X and Y.&lt;br /&gt;
&lt;br /&gt;
For the third series, we can’t draw a line association between X and Y, instead, a quadratic pattern would work better here.&lt;br /&gt;
&lt;br /&gt;
====[[SOCR_EduMaterials_Activities_QQChart|QQ Plot]]====&lt;br /&gt;
In Quantile-Quantile plots, the observed values are plotted against theoretical quantiles in QQ charts. A line of good fit is drawn to show the behavior of the data values against the theoretical distribution. If F() is a cumulative distribution function, then a quantile (q), also known as a percentile, is defined as a solution to the equation \(F(q)=p\),that is \(q=F^{-1}(p)\).&lt;br /&gt;
&lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig5.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
*Comment: From the chart above, we can see that the data follows a normal distribution in general given all the data points (noted in red) located along side the line. However, the data doesn’t follow a normal distribution tightly because there are data points located pretty far from the line. We can also infer that the sampled data may not be representative enough of the population because of the limited size of the sample. &lt;br /&gt;
&lt;br /&gt;
====Median polish====&lt;br /&gt;
Median polish is an EDA procedure proposed by [http://en.wikipedia.org/wiki/John_Tukey John Tukey]. It finds an additively fit model for data in a two-way layout table of the form row effect + column effect + overall mean. It is an iterative algorithm for removing any trends by computing medians for various coordinates on the spatial domain D.&lt;br /&gt;
&lt;br /&gt;
==== Trimean====&lt;br /&gt;
Trimean is a measure of a probability distribution’s location defined as a weighted average of the distribution’s median and its two quartiles. It combines the median’s emphasis on center values with the midhinge’s attention to the extremes. And it is a remarkably efficient estimator of population mean especially for large data set (say more than 100 points) from a symmetric population.&lt;br /&gt;
&amp;lt;center&amp;gt; \( \frac{Q_1+2Q_2+Q_3}{4} \)  &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Applications===&lt;br /&gt;
* [http://www.itl.nist.gov/div898/handbook/eda/eda.htm This article] provides a thorough introduction to EDA. It discusses the basic concepts, objectives, and techniques associated with EDA. It also includes case studies in which EDA is applied.  The case studies include eight type of charts for univariate analyses and introduce the concepts of reliability and multi-factor studies. The article gives specific examples with background, output and interpretations of results is a useful resource for learning EDA. &lt;br /&gt;
* [http://www.stat.cmu.edu/~hseltman/309/Book/chapter4.pdf This article] begins with a general introduction to data analysis and explains EDA via examples that employ various graphical analyses. This article serves as a basic and general introduction to the concepts associated with EDA and is a good starting place for studying these concepts. &lt;br /&gt;
* The [http://wiki.stat.ucla.edu/socr/index.php/SOCR_HTML5_Expansion_MotionCharts SOCR Motion Charts Project enables complex data visualization, see the [http://socr.umich.edu/HTML5/MotionChart/ SOCR MotionChart webapp]. The SOCR Motion Charts provide an interactive infrastructure for discovery-based exploratory analysis of multivariate data. &lt;br /&gt;
&lt;br /&gt;
Now, we want to explore the relationship between two variables in the [[SOCR_Data_Dinov_010309_HousingPriceIndex| dataset: UR (Unemployment Rate) and HPI (Housing Price Index) in the state of Alabama over 2000 to 2006]]. First, how does the UR in Alabama change from 2000 to 2006? &lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig6.PNG|800px]]&lt;br /&gt;
&lt;br /&gt;
From this chart, we can see that the UR in Alabama increases from 2000 to 2003 then decreases sharply from 2004 to 2006. So you may wonder what is UR for states from other part of the country over the same period?&lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig7.PNG|800px]]&lt;br /&gt;
&lt;br /&gt;
All the states appear to follow similar patterns. Now, let’s study relationships between UR and HPI in a single state, say Alabama, across this time span. &lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig8.PNG|800px]]&lt;br /&gt;
&lt;br /&gt;
The chart above suggests that HPI increases through time in Alabama, while UR increases at first and then exhibits a sharp drop between 2004 and 2006. If there is any association between UR and HPI, it appears to be quadratic rather than linear. Similarly, if we extend the graph to the three states from different regions, we generate the following chart: &lt;br /&gt;
[[Image:UMHS Gallaway 07012014 Fig9.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
We can now address the question: is there any association between UR and HPI among all the states based on the chart? &lt;br /&gt;
The motion chart, however, makes the study much more interesting by exhibiting a moving chart with UR vs. HPI of 51 states from different areas during the period from 2000 to 2006. This allows us to get an idea of the changing values over the years among all states. You’re welcome to play with the data to see how the chart changes using the link listed above.&lt;br /&gt;
&lt;br /&gt;
===Software ===&lt;br /&gt;
* [http://www.socr.umich.edu/html/cha SOCR Charts]&lt;br /&gt;
* [http://www.r-bloggers.com/exploratory-data-analysis-useful-r-functions-for-exploring-a-data-frame/ R EDA functions]&lt;br /&gt;
&lt;br /&gt;
===Problems===&lt;br /&gt;
* Work on problems in [http://www.itl.nist.gov/div898/handbook/eda/section4/eda42.htm Uniform Random Numbers and Random Walk from this Case Study].&lt;br /&gt;
&lt;br /&gt;
* Two random samples were taken to determine backpack load difference between seniors and freshmen, in pounds. The following are the summaries:&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;
| Year|| Mean || SD || Median || Min ||Max || Range|| Count &lt;br /&gt;
|-&lt;br /&gt;
| Freshmen || 20.43 || 4.21 || 17.2 || 5.78 || 31.68 || 25.9 || 115&lt;br /&gt;
|-&lt;br /&gt;
| Senior || 18.67 || 4.21 || 18.67 || 5.31 || 27.66 || 22.35 ||157&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Which of the following plots would be the most useful in comparing the two sets of backpack weights? Choose One Answer:&lt;br /&gt;
: (a) Histograms&lt;br /&gt;
: (b) Dot Plots&lt;br /&gt;
: (c) Scatter Plots&lt;br /&gt;
: (d) Box Plots&lt;br /&gt;
&lt;br /&gt;
* School administrators are interested in examining the relationship between height and GPA. What type of plot should they use to display this relationship? Choose one answer.&lt;br /&gt;
: (a) box plot&lt;br /&gt;
: (b) scatter plot&lt;br /&gt;
: (c) line plot&lt;br /&gt;
: (d) dot plot&lt;br /&gt;
&lt;br /&gt;
* What would be the most appropriate plot for comparing the heights of the 8th graders from different ethnic backgrounds? Choose one answer.&lt;br /&gt;
: (a) bar charts&lt;br /&gt;
: (b) side by side boxplot&lt;br /&gt;
: (c) histograms&lt;br /&gt;
: (d) pie charts&lt;br /&gt;
&lt;br /&gt;
* There is a company in which a very small minority of males (3%) receives three times the median salary of all males, and a very small minority of females (3%) receives one-third of the median salary of all females. What do you expect the side-by-side boxplot of male and female salaries to look like? Choose one answer.&lt;br /&gt;
: (a) Both boxplots will be skewed and the median line will not be in the middle of any of the boxes.&lt;br /&gt;
: (b) Both boxplots will be skewed, in the case of the females the median line will be close to the top of the box and in the case of the males the median line will be closer to the bottom of the box.&lt;br /&gt;
: (c) Need to have the actual data to compare the shape of the boxplots.&lt;br /&gt;
: (d) Both boxplots will be skewed, in the case of males the median line will be close to the top of the box and for the females the median line will be closer to the bottom of the box.&lt;br /&gt;
&lt;br /&gt;
* A researcher has collected the following information on a random sample of 200 adults in the 40-50 age range: Weight in pounds Heart beats per minute Smoker or non-smoker Single or married&lt;br /&gt;
He wants to examine the relationship between: 1) heart beat per minute and weight, and 2) smoking and marital status. Choose one answer.&lt;br /&gt;
: (a) He should draw a scatter plot of heart beat and weight, and a segmented bar chart of smoking and marital status.&lt;br /&gt;
: (b) He should draw a side by side boxplot of heart beat and weight and a scatterplot of smoking and marital status.&lt;br /&gt;
: (c) He should draw a side by side boxplot of smoking and marital status and a segmented bar chart of hear beat and weight.&lt;br /&gt;
: (d) He should draw a back to back stem and leaf plot of weight and heart beat and examine the cell frequencies in the contingency table for smoking by marital status.&lt;br /&gt;
&lt;br /&gt;
* As part of an experiment in perception, 160 University of Michigan psych students completed a task on identifying similar objects. On average, the students spent 8.25 minutes with sa tandard deviation of 2.4 minutes. However, the minimum time was 2.3 minutes and one students worked for almost 60 minutes. What is the best description of the histogram of times that students spent on this task? Choose one answer.&lt;br /&gt;
: (a) The histogram of times could be symmetrical and not normal with major outliers.&lt;br /&gt;
: (b) The histogram of times could be left skewed, and in case there are any outliers, it is likely that they will be smaller than the mean.&lt;br /&gt;
: (c) The histogram of times could be right skewed, and in the case of any outliers, it is likely that they will be larger than the mean.&lt;br /&gt;
: (d) The histogram of times could be normal with no major outliers.&lt;br /&gt;
&lt;br /&gt;
=== References===&lt;br /&gt;
* [http://wiki.stat.ucla.edu/socr/index.php/AP_Statistics_Curriculum_2007_EDA_Plots  SOCR]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Exploratory_data_analysis / Exploratory data analysis Wikipedia]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_EDA}}&lt;/div&gt;</summary>
		<author><name>Liyufang</name></author>
		
	</entry>
</feed>