Introduction¶
The law of large numbers (LLN) and the central limit theorem underpin a large portion of statistical theory. We will see that the LLN will link proportions to probabilities, expected values to the sample mean, and allow us to estimate parameters of a random variable given a dataset.
The method of moments will be the primary tool we use to derive parameter estimates for parameters for a given distribution of a random variable. This method follows directly from the LLN.
Finally, we will explore the Central limit theorem which is the foundation of much of generating hypothesis tests and building confidence intervals.
Independent and identically distributed and sample¶
To model a dataset, , we will need to make assumptions about how our data set was generated.
A common assumption for a dataset with data points is that each data point was generated from a random variable . The collection of random variables is called a sample and the dataset above is typically called one realized sample or a realization of the sample.
If we additionally assume that all the random variables are identically distributed, or that they have the same distribution , and we assume that for any and that and are independent then we call our sample a random sample.
Because pairwise independence between random variables and that all random variables are identically distributed are two common assumptions, they are abbreviated as i.i.d which stands for "independent and identically distributed".
Properties of the Expected value and Variance of a sum¶
To explore the law of large numbers, we will need another property of the expectation. The expected value of the sum of random variables is the sum of the expected value of each individual random variable.
When we combine the properties of expected values we have already learned, we can state
and this is true for any number of random variables
We start at the definition of the expected value to derive this property
Suppose and then .
The variance is an expected value and so it follows that
and we can state more generally that for two independent random variables
Let and then .
Law of large numbers¶
The intuition behind the law of large numbers can be characterized by the following experiment: you are asked to flip a fair coin and record the whether the coin is heads up or tails up. After 10 flips you are asked to compute the proportion of heads up flips, after 50 flips you are asked to compute this proportion, after 100, 1,000, 10,000 flips you are asked to compute the proportion of heads up flips. We expect that if this coin is fair that the proportion of flips with heads face up will get closer and closer to 0.50.
The law of large numbers attempts to describe this intuition.
Define a sequence of random variables such that any pair of random variables, and are independent (that is . Finally, transform this sequence into a single random variable that is equal to .
Then the law of large numbers (LLN) states that given any small number that is greater than 0 as grows towards infinity
where .
We can picture a distribution that depends on and as increase the random variable assigns more and more probability to the value 0. <pic>
The LLN has many applications.
Let a sequence of Bernoulli distributed random variables be (i) pairwise independent and (ii) be distributed the same $X_{1}, X_{2}, \cdots, X_{N} \sim Bern(\theta)$.
Lets take a look at the transformation $\overline{X}$. Consider a sequence of two random variables with a Bernoulli distribution. Then define $$\begin{aligned}
S = X_{1} + X_{2}
\end{aligned}$$
The expected value of $S$ is
$$\begin{aligned}
\mathbb{E}(S) &= \mathbb{E}(X_{1} + X_{2}) \\
&= \mathbb{E}(X_{1}) + \mathbb{E}(X_{2})\\
&= \theta + \theta \\
&= 2\theta
\end{aligned}$$ and the expected value of $\overline{X}$ is then $$\begin{aligned}
\mathbb{E}(\overline{X}) = \frac{\mathbb{E}(S)}{2} = \frac{2 \theta}{2} = \theta
\end{aligned}$$
To gain intuition about what a sample from $\overline{X}$ looks like, assume we collect data points from $n$ random variables $x_{1} \sim X_{1}, x_{2} \sim X_{2}, \cdots, x_{n} \sim X_{n}$. An example of a single data point $d$ could be $$\begin{aligned}
d = (0,1,0,1,0,0,1,1,1,0)
\end{aligned}$$ and the sample mean $\overline{x}$, one sample from $\overline{X}$, is then $$\begin{aligned}
S &= \sum_{i=1}^{10} d_{i} \\
\overline{x} &= \frac{X}{n}
\end{aligned}$$
However, the value of $S$ can be counted in two different ways. We can sum up $d_{i}$ one by one in order, or we can multiply zero by the frequency of zeros in our dataset, multiply 1 by the frequency of ones in our dataset, and sum both of these products. $$\begin{aligned}
S &= \sum_{i=1}^{10} d_{i} \\
&= 0+1+0+1+0+0+1+1+1+0\\
S &= N(0) \cdot 0 + N(1) \cdot 1
\end{aligned}$$ where $N(x)$ is the number of values $x$ in our dataset.
If we use the above method to sum our data points the sample mean simplifies to $$\begin{aligned}
\overline{x} &= \frac{ N(0) \cdot 0 + N(1) \cdot 1 }{N} \\
&= \frac{N(1)}{N}.
\end{aligned}$$ The sample mean is the proportion of 1s $(p_{n})$ from our sample of $n$ data points, and the law of large number then says that $$\begin{aligned}
&P( | \overline{X} - \mu | > \epsilon ) \to 0 \\
&P( | p_{n} - \theta | > \epsilon ) \to 0
\end{aligned}$$ or, roughly, that the sample proportion approaches $\theta$, the true probability that a $1$ will appear.Define a discrete random variable $X_{1}, X_{2}, \cdots, X_{n} \sim f_{X}$, $supp(X_{i}) = \{1,2,3\}$
Lets assume $n=10$ and take a closer look at $S$. One sample from our $n=10$ random variables could be $d = (2,1,3,2,3,2,3,1,2,2)$ and we can compute the sum $S = 2+1+3+2+3+2+3+1+2+2$. However, we could have also summed these ten numbers by multiplying each unique number in the dataset by the frequency this number occurs and then summing these products: $S = N(1) \cdot 1 + N(2) \cdot 2 + N(3) \cdot 3$, where $N(x)$ is the number of times the value $x$ appears. For our specific example $S = 2 \cdot 1 + 5 \cdot 2 + 3 \cdot 3$. The sample mean is then $$\begin{aligned}
\overline{x} &= \frac{S}{N} \\
&= \frac{N(1) \cdot 1 + N(2) \cdot 2 + N(3) \cdot 3}{N}\\
&= \frac{N(1)}{N} 1 + \frac{N(2)}{N} 2 + \frac{N(3)}{N} 3
\end{aligned}$$ We know from our discussion of the LLN and Bernoulli distributed random variables that $\frac{N(1)}{N}$ is the proportion of $1$s , $p_{n}(1)$, and this proportion will approach the true probability of a 1 as we collect more data (as $n \to \infty$).
Let's rewrite the above sample mean computation $$\begin{aligned}
\overline{x} &= \frac{N(1)}{N} 1 + \frac{N(2)}{N} 2 + \frac{N(3)}{N} 3 \\
&= p_{n}(1) 1 + p_{n}(2) 2 + p_{n}(3) 3 \\
\end{aligned}$$ As $n \to \infty$ $$\begin{aligned}
\overline{x} &= \frac{N(1)}{N} 1 + \frac{N(2)}{N} 2 + \frac{N(3)}{N} 3 \\
&= f_{X}(1) 1 + f_{X}(2) 2 + f_{X}(3) 3
\end{aligned}$$ but the above is the expected value of $X$, $\mathbb{E}(X)$, and so as $n$ gets larger the sample mean will become closer to the true expected value.LLN for transformations¶
Earlier we saw that by definition if we define a random variable and a function then
Because the above is equivalent to the expectation of a transformed random variable the LLN has a similar result for any transformation of a random variable.
As ,
where .
The above implies that the LLN applies to any transformation of a random variable, including
where .
Let us find a simple expression for .
Because , the LLN states that for any as
or that approaches the true variance of .
Statistics, Estimators, and the Method of Moments¶
Given a random sample or collection of random variables that are i.i.d, a statistic is a function of our sample . Because a statistic is a function of a collection of random variables, our statistic too can be characterized by a probability distribution over potential values of the statistic.
For a random sample all with the same probability density function where is a parameter, an , of is (i) a statistic that (ii) is meant get closer to as .
An estimate is an estimator applied to a realized sample, and an estimate for a parameter is often denoted as the parameter with a "hat". For example, an estimate of the parameter would bve denoted .
One way to develop an estimator for a parameter, or for several parameters, is to use the Method of Moments. For a random sample where each random variable follows the same probability density function with parameters , the Method of moments generates estimators for all parameters by solving this set of equations
replacing each exact, expected value by sample means. The expected value is replaced by , the expected value is replaced by its sample mean , etc.
Lets look at an example.
Suppose we are studying the probability of survival among patients who are treated with dialysis and experienced a myocardial infarction (see [10.1056/NEJM199809173391203](10.1056/NEJM199809173391203){.uri} for a manuscript on this topic). We collect data on 50 patients and model whether they survive or not as a random sample $(X_{1},X_{2},X_{3},\cdots,X_{50})$ where $X_{i} \sim Bern(\theta)$ and the value 1 represents survival and zero otherwise. We follow patients for a year and record a dataset $\mathcal{D} =(1,0,0,1,1,1,0,0,0,0,1,0,\cdots)$ that contains 36 ones and 14 zeros.
Because the Bernoulli distribution has a single parameter we only need a single equation that related the expected value and our parameter $\theta$. Because the Bernoulli distribution has a single parameter we only need a single equation that related the expected value and our parameter $\theta$.
The expected value is $\matbb{E}(X) = \theta$ and so we can derive a MoM estimator by replacing the exact $\mathbb{E}(X)$ with the sample mean $\overline{X}$. Our estimator for $\theta$ is $\hat{\theta} = \overline{X} = \sum_{i=1}^{N} x_{i} / N = 36/50 = 72\%$.Suppose $(Y_{1},Y_{2},\cdots,Y_{10})$ is a random sample such that $Y_{i} \sim U(\alpha,\beta)$. We collect a dataset (realized sample) $\mathcal{D} = (0.22,0.45,0.12,0.32,0.56,0.73,0.91,0.51,0.11,0.67)$. To develop an estimate for $\alpha$ and an estimate for $\beta$ using the method of moments, we will need to look at the following two equations: $$\begin{aligned}
\mathbb{E}(X) &= \frac{\alpha+\beta}{2}\\
\mathbb{E}(X^{2}) &= g(\alpha,\beta)
\end{aligned}$$
On first glance, the second equation sounds difficult to solve. However, we found an expression for the variance that depends on $\mathbb{E}(X^{2})$ and on $\mathbb{E}(X)$ in chapter 2, exercise 9.
$$\begin{aligned}
V(X) &= \mathbb{E}(X^2) - \left[\mathbb{E}(X)\right]^{2} \\
\mathbb{E}(X^2) &= V(X) + \left[\mathbb{E}(X)\right]^{2}
\end{aligned}$$
We know that $V(X) = \frac{(b-a)^{2}}{12}$ and so
$$\begin{aligned}
\mathbb{E}(X^2) &= V(X) + \left[\mathbb{E}(X)\right]^{2} \\
&= \frac{(\beta-a)^{2}}{12} + \left[ \frac{(\alpha+\beta)}{2} \right]^{2} \\
&= \frac{\beta^{2} + \alpha^{2} - 2\alpha\beta}{12} + \frac{\alpha^{2}+\beta^{2}+2\alpha\beta}{4} \\
&= \frac{\beta^{2} + \alpha^{2} + \alpha\beta}{3}
\end{aligned}$$
Now our MoM equations are $$\begin{aligned}
\mathbb{E}(X) &= \frac{\alpha+\beta}{2}\\
\mathbb{E}(X^{2}) &= \frac{\beta^{2} + \alpha^{2} + \alpha\beta}{3}
\end{aligned}$$ and we will replace $\mathbb{E}(X)$ with the sample mean $\overline{X}$ and replace $\mathbb{E}(X^{2})$ with $\overline{X^{2}}$, and then solve for $\alpha$ and $\beta$. $$\begin{aligned}
\overline{X} &= \frac{\alpha+\beta}{2}\\
\overline{X^{2}} &= \frac{\beta^{2} + \alpha^{2} + \alpha\beta}{3}
\end{aligned}$$
From the first equation we find $\alpha = 2\overline{X} - \beta$. We can plug the above into the second equation to find
$$\begin{aligned}
\overline{X^{2}} &= \frac{\beta^{2} + (2\overline{X} - \beta)^{2} + (2\overline{X} - \beta)\beta}{3}\\
3\overline{X^{2}} &= \beta^{2} + 4 \overline{X}^{2} + \beta^{2} - 4\overline{X} \beta + 2\overline{X} \beta - \beta^{2}\\
3\overline{X^{2}} &= \beta^{2} + 4 \overline{X}^{2} - 2\overline{X} \beta \\
0&= \beta^{2} - (2\overline{X}) \beta + (4 \overline{X}^{2} - 3\overline{X^{2}})\\
\hat{\beta} &= 2\overline{X} \pm \frac{\sqrt{ (2\overline{X})^{2} - 4(1)(4 \overline{X}^{2} - 3\overline{X^{2}}) } }{2} \\
\hat{\beta} &= 2\overline{X} \pm \frac{\sqrt{ 4\overline{X}^{2} - (16 \overline{X}^{2} - 12\overline{X^{2}}) } }{2} \\
\hat{\beta} &= 2\overline{X} \pm \frac{\sqrt{ - 12 \overline{X}^{2} + 12\overline{X^{2}} } }{2} \\
\hat{\beta} &= 2\overline{X} \pm \frac{ 2\sqrt{3} \sqrt{ \overline{X^{2}} -\overline{X}^{2} } }{2} \\
\hat{\beta} &= 2\overline{X} \pm \sqrt{3} \sqrt{ \overline{X^{2}} -\overline{X}^{2} } \\
\end{aligned}$$
and so for our problem above $\hat{\beta} = 1.37$ and so $\alpha = -0.45$.Central limit theorem¶
Given a random sample , we used the LLN and method of moments to produce point estimates---a single number---for a parameter that assigned probabilities to value of . However the LLN only guarantees that our estimator will grow closer to the true parameter value as . The LLN does not describe how close we are to the true parameter value for any specific .
The Central limit theorem (CLT) describes the statistical distribution of the sample mean , allowing us to describe how close we are to the true parameter value of interest.
For a random sample the Central Limit Theorem states
or that
where , and .
Suppose we wish to study a random sample of $n$ Bernoulli distributed random variables $(Y_{1},Y_{2},\cdots,Y_{n}) \sim Bern(\theta)$.
We know that $\mathbb{E}(Y) = \theta$ and $V(Y) = \theta(1-\theta)$, and so $$\begin{aligned}
\overline{Y}_{n} \sim \mathcal{N}\left(\theta, \frac{\theta (1-\theta)}{n} \right)
\end{aligned}$$
We saw in the previous section on the LLN and MoM that an estimate for $\theta$ is the sample mean so then $$\begin{aligned}
\hat{\theta} \sim \mathcal{N}\left(\theta, \frac{\theta (1-\theta)}{n} \right)
\end{aligned}$$ However, we still cannot compute probabilities that $\hat{\theta}$ is in some interval because the Normal distribution on the right hand side involves the true, unknowable, $\theta$.
$$\begin{aligned}
\hat{\theta}(Y) - \theta \sim \mathcal{N}\left(0, \frac{\theta (1-\theta)}{n} \right)
\end{aligned}$$ here we introduce the notation $\hat{\theta}(Y)$ to reinforce that this is a random variable and not a single value.
To approximate the difference $\hat{\theta}(Y) - \theta$ we can replace $\theta$ with our MoM estimate $\overline{y}$. $$\begin{aligned}
\hat{\theta}(Y) - \theta \sim \mathcal{N}\left(0, \frac{\overline{Y}_{n} (1-\overline{Y}_{n})}{n} \right)
\end{aligned}$$
We can use the above to approximate the probability that the difference between our estimated $\hat{\theta}$ and the true $\theta$ is inside some interval. Suppose we collect the data $\mathcal{D} = (1,1,0,1,0,1,1,1,0,0,1,1,0,1,0)$. Then the CLT says $$\begin{aligned}
\hat{\theta}(Y) - \theta \sim \mathcal{N}\left(0, \frac{\overline{y}_{n} (1-\overline{y}_{n})}{n} \right) \\
\hat{\theta}(Y) - \theta \sim \mathcal{N}\left(0, \frac{ \frac{9}{15} \cdot \frac{6}{15}} {15} \right) \\
\end{aligned}$$
and we can compute for example the probability that our estimate is 0.1 away from the truth. $$\begin{aligned}
P( -0.1 < \hat{\theta}(Y) - \theta < 0.1) = F(0.1) - F(-0.1) \approx 0.57
\end{aligned}$$ In other words, there is a $0.57$ probability that our estimate is within 0.1 of the true parameter value $\theta$.Confidence intervals: the CLT in action¶
Given a random sample , a confidence interval for a parameter is a pair of statistics such that . The number is called the confidence coefficient and we often say that the interval is a confidence interval for the parameter .
A confidence interval provides a range of values that the true parameter is likely to be between.
Suppose we decide to study the prevalence of tuberculosis among people who have diabetes mellitus. Our model supposes we can represent each person in our sample with a random variable where is the probability of an active tuberculosis infection. Given a random sample where , we find 34 people had an active infection and 3,456 did not. If we generate a 95% confidence interval for the parameter that is [0.05%, 2%] then there are tow claims. Claim one: The confidence interval applied to a random sample that follows all of our assumptions will have a 95% probability that the parameter value is within our confidence interval. Claim two: the confidence interval that was produced from our data either does or does not contain the true parameter value, and we are 95% confident that this interval contains the true parameter value.
Z values¶
Suppose we assumed a random sample generated an observed dataset
The following transformation
is called standardizing a random variable.
We can show that a standardized variable has an expected value of zero and variance of one using expected value and variance properties.
The expected value of our standardized random variable is zero.
The variance of our standardized random variable is one.
In practice, we can transform our individual data points into standard, or "z" scores by subtracting from each point the sample mean and sample standard deviation.
Suppose we are given a dataset . To transform these four points into four z-scores we need to follow three steps: (i) compute the sample mean, (ii) compute the sample standard deviation, and (iii) subtract from each point the sample mean and divide this difference by the sample standard deviation.
The sample mean is
.
The sample standard deviation is
.
Our four z-scores are then
Z-scores are useful for characterizing the probability of sample points in a dataset and for eliminating measurement units from a set of sample points. The z score for a sample point
can be interpreted as the number of standard deviations the sample point is from the expected value of the random variable .
Chebychev’s inequality tells us that values generated by a random variable are likely close to the expected value, and so large z-scores are improbable while z-scores close to zero are probable. A z-score is meant to map values to the probability that this observation occurred. Large z values should denote a small probability that this event occurred and small z values should denote a large probability that this event occurred.
Z-scores also eliminate measurement units from an observation by mapping to units of standard deviation. Mapping the units of two or more variables to the number of standard deviations from their mean is a convenient way to compare two variables (i) where one variable has large values and the second has small values (ii) where one variable has a large variance and the second has a small variance. Large, small values and large, small variances associated with a variable are often because of the chosen units.
Using the CLT to build a confidence interval¶
The method of moments (MoM) has given us an algorithm for estimating parameter values, however the MoM only provides a single estimate. Because we compute our estimated parameter values from a sample of data, we know that our estimate is not exact and will vary for every data set we collect.
A confidence interval for a parameter, or parameters, is a set of statistics---a lower bound and upper bound ---where we expect the true parameter values to lie with high probability. Confidence intervals take into account the size of our sample dataset, the variability in our estimate of parameter values, and should accompany a point estimate for a parameter.
More formally, given a random sample , a confidence interval for the parameter is a pair of statistics such that . The value is called the confidence coefficient and the interval is called a confidence interval.
One way to build a confidence interval is to use the Central Limit Theorem. The CLT states that
where is and is .
Suppose . The CLT states that
We can subtract from our random variable the expected value
and divide by to find that
where and .
The translated and scaled quantity above, a new random variable , has a standard normal distribution. A random variable has a standard normal distribution if . That is, a normal distribution with expected value zero and variance one.
One way to form a confidence for a parameter is to find two values and such that and then solve for .
Lets suppose we found these two values and
The normal distribution is symmetric about 0 and so if then . To bound such that we will split evenly.
Suppose we find values and such that
then
We define the symbol as the value such that the probability that a random variable with a standard normal distribution, , is less than equals .
So then
Often a confidence for is written
Suppose and . The variance for , is . Then a confidence interval for is . Given a dataset we can estimate and so a sample confidence interval is
Below is a table of common values
z\_0.025 -1.96 0.050 -1.64 0.100 -1.28 0.500 0 0.900 1.28 0.950 1.64 0.975 1.96
A 95% confidence interval will use the values -1.96 and 1.96, a 90% confidence interval will use the values -1.64 and 1.64, and a 80% confidence interval will use the values -1.28 and 1.28.
Hypothesis Testing¶
The goal of statistical hypothesis testing is to support or deny a claim about a parameter. We first generate a set of statements about a parameter---called a hypotheses---that can we test. Second, we collect data that will help us make a decision about whether one statement or the other is true. Third, we decide which statement can be refuted.
A hypothesis is typically a pair of statements about a parameter. The null hypothesis () is a statement about a parameter value that allows us to characterize data generated by that parameter.
Suppose the following random sample . Then a null hypothesis might be . This statement about a parameter would allow us to characterize samples of data we may see from our random sample .
The alternative hypothesis () is a statement about ta parameter value that is contrary to the null hypothesis.
Suppose the sample sample and distribution as in the above example. Then an alternative hypothesis may be . This statement about a parameter would also allow us to characterize samples of data we may see from our random sample .
We will say that a hypothesis must contain a null and alternative statement.
A hypothesis may be vs
Though we plan to collect data and create a test that will support or deny the above hypothesis, we may make a mistake. We will never know the true parameter value from any finite given random sample and so our test will be imperfect. Mistakes in hypothesis testing are categorized into two types: types I and II. A type I error (informally called a false positive) is when we decide to accept the alternative hypothesis however the null hypothesis is the truth. A type II error (informally called a false negative) is when we decide to accept the null hypothesis however the alternative hypothesis is true. Related to type I and II errors is the power of a hypothesis. The power of a hypothesis test is the probability that we decide on the alternative hypothesis given that the alternative hypothesis is true.
Define a random sample and . We define the space, , of our random sample as . The space of a random sample is the set of all possible tuples that our random sample could generate, or all possible data sets.
A hypothesis test is a decision criteria such that we reject the null hypothesis if a realization from our random sample satisfies some criteria. The set of all possible realizations that lead us to reject the null hypothesis is called the critical region.
Suppose and . We can form the hypothesis vs . Intuitively we may decide to collect realizations , compute , and decide to reject the null hypothesis if . The set of all samples where would be our critical region.
Z-test for Normally distributed data¶
A two-sided one-sample test supposes that given a random samples the following null and alternative hypotheses
where is a constant, we can form the following statistic---called a test statistic
A test statistic is a statistic that is used to help determine whether a sample is or is not in a pre-specified critical region.
If the was true, we would expect to be close to the value , then our test statistic should be close to the value zero. When is far from zero then we would reject and suspect that is the more plausible conclusion.
Then we can define a critical region () as
The value can be chosen by limiting our potential type I error, the error that we accept given that is true. If is true then the probability that we accept is all the possible samples such that
or samples where is smaller than negative and larger than positive .
Lets limit our type I error to so that we need to find a value such that
We will split the probability in half so that
We know from the CLT that the random variable has a standard normal distribution if , in other words, if is true. This means that we can compute the probability that
This is by definition the value .
Suppose we collect a dataset . We assume that the data was generated from a random sample where . We wish to test the following hypotheses:
with the critical region
We first compute our Z sample statistic . We used the MoM estimate for . Because our sample Z statistic is we cannot reject the null hypothesis.
Z-test for a Bernoulli sample¶
The Z-test can be applied to any random sample. For example, suppose we take a random sample where .
We can build a Z test statistic for hypotheses of the form
as
where is the MoM estimator for .
The p-value¶
Exercises¶
Suppose we collect the following dataset and further we assume that each data point was generated by sampling from a sequence of i.i.d random variables where .
State the LLN for the above problem
Compute the sample mean of
What can we say about the sample mean, using the LLN, if we collect 13,14, data points?
Suppose we collect the following sample and further we assume that each data point was generated by sampling from a sequence of i.i.d random variables where .
State the LLN for the above problem
Compute the sample variance
What can we say about the sample variance, using the LLN, if we collect 13,14, data points?
Define independent and identically distributed random variables . Suppose we sample these rvs and collect .
Use the method of moments to develop an estimator for .
Estimate from the above sample .
What is the estimated expected value?
What is the estimated variance?
What is the estimated
Assume are a random sample where . Further assume we collected the data set .
Use the method of moments to develop an estimator for and for .
Estimate and from the above sample .
What is the estimated expected value?
What is the estimated variance?
What is the estimated
Lets assume we decide to study the incubation period for the influenza virus. The incubation period is defined as the number of days between when the virus infects a host and when that host becomes symptomatic. We collect from 5 individuals the date they came in contact with someone who was infected with influenza and the date they themselves were symptomatic.
$$\begin{aligned} \mathcal{D} = \begin{bmatrix} Date of contact & Date of Symptoms\ 02/20 & 02/21\ 04/12 & 04/17\ 03/22 & 03/25\ 10/24 & 10/26\ 07/15 & 07/18\ \end{bmatrix}
\end{aligned}$$
Provide a statistical setup for this data. Define a sample, assumptions about the sample, and a distribution for each random variable that is a part of the sample
Estimate the parameters in your statistical setup using the Method of Moments
Describe your results
Suppose is a random sample where .
Define an estimator for using the MoM
Characterize the distribution of using the CLT.
The Aedes mosquito is a vector for yellow and dengue fever, the Zika virus, and Chikungunya. Tracking the daily incidence of Aedes mosquitoes in a given location is one signal associated with the incidence of these four diseases. Mosquitoes are routinely captured and counted and the daily frequency of mosquitoes is reported to departments of public health.
Suppose we capture and count the number of mosquitoes in a specific county for two weeks, and compile this data in the following dataset where one data point represents the number of mosquitoes collected in one day.
Define a set of random variables that we will use to model the daily frequency of mosquitoes. Include notation for the random sample and define a common Poisson distribution for all random variables.
Use the method of moments to estimate parameter value from the given dataset
Estimate the probability that we observe 124 mosquitoes
Estimate the probability that we observe 120 to 125 mosquitoes
Estimate the expected value and the variance
Let’s rework the above model and assume that each random variable follows a Normal distribution. Use the method of moments to estimate parameters value from the given dataset .
Estimate the expected value and the variance for the Normal model
A Randomized Control trial (RCT) is a common study design to compare the efficacy and safety of a novel device. Suppose the sponsor for a new cardiovascular device wishes to compare the safety of their device, which they define as the percent of patients who survive 7 days after the procedure, and the efficacy, which they define as the percent of patients who survive at one year after the procedure.
The trial enrolls 50 patients to receive the device (the device group) and 50 patients who receive optimal medical therapy (the control group). The trial enrolls these 100 patients over the course of two years. At year 3 all 100 patients have been contacted at one year after their procedure (called a patient’s one year followup).
We find that in the device group 8 patients did not survive at or after 7 days from the date of their procedure and 18 patients did not survive one year after the date of their procedure. In the control group 9 patients did not survive at or after 7 days and 33 patients did not survive one year after the procedure.Define a set of random variables that we will use to model the number of patients in the device group who survive 7 days after the procedure out of a total of 50 patients and a second set of random variables to model the number of patients in the control group who survive 7 days after the procedure out of a total of 50 patients. Include mathematical notation for the random sample and a common distribution for both sets of random variables.
Use the Method of Moments to estimate the parameters for the distribution you chose for survival at or after 7 day for patients in the device group. Report the parameter estimate.
Use the Method of Moments to estimate the parameters for the distribution you chose for survival at or after 7 days for patients in the control group. Report the parameter estimate.
What can you conclude about the safety of the novel device compared to the safety of optimal medical therapy?
Use the Method of Moments to estimate the parameters for the distribution you chose for survival at one year for patients in the device group. Report the parameter estimate.
Use the Method of Moments to estimate the parameters for the distribution you chose for survival at one year for patients in the control group. Report the parameter estimate.
What can you conclude about the efficacy of the novel device compared to the efficacy of optimal medical therapy?
Suppose a random sample generates the following dataset . Assume that and compute the corresponding ten z-scores.
Suppose we collect the following dataset . Further, lets assume .
Please compute a confidence interval for . The symbol should appear in this interval.
Please compute a 95% confidence interval for .
Please compute a 80% confidence interval for .
Why is your 95% confidence interval larger than your 80% confidence interval?
Suppose we collect the following dataset . Further, lets assume .
Please compute a confidence interval for . The symbol should appear in this interval.
Please compute a 95% confidence interval for .
Please compute a 80% confidence interval for .
Suppose we collect the following dataset . Further, lets assume .
Please compute a confidence interval for . The symbol should appear in this interval.
Please compute a 95% confidence interval for .
Please compute a 80% confidence interval for .
Suppose we collect the following dataset . Further, lets assume .
Please compute a confidence interval for . The symbol should appear in this interval.
Please compute a 95% confidence interval for .
Please compute a 80% confidence interval for .
Suppose we collect the following dataset . Further, lets assume .
Please compute a confidence interval for . The symbol should appear in this interval.
Please compute a 95% confidence interval for .
Please compute a 80% confidence interval for .
Consider two random samples and where and . Please compute a confidence interval for .
Suppose we collect the following dataset corresponding to a random sample where and a dataset corresponding to a random sample where .
Please compute a 95% confidence interval for .
Please compute a 95% confidence interval for .
Please compute a 80% confidence interval for .
Suppose we collect the following dataset corresponding to a random sample where and a dataset corresponding to a random sample where .
Please compute a 95% confidence interval for .
Please compute a 80% confidence interval for .
Suppose we collect the following dataset corresponding to a random sample where and a dataset corresponding to a random sample where .
Please compute a 95% confidence interval for .
Please compute a 80% confidence interval for .
Suppose we collect a dataset . Assume that this data was generated from a random sample where .
Our null and alternative hypotheses for the parameter are $$\begin{aligned} H_{0} : \lambda = 4 \ H_{1} : \lambda > 4
\end{aligned}$$
Suppose we are asked to analyze the primary safety endpoint for a clinical trial at a point when half of the patients were enrolled and followed for one year. The trial plans to enroll a total of 70 patients. At one year we find that of patient experienced the safety endpoint, defined as a combination of all cause mortality, myocardial infarction, or stroke. The trial is assumed safe if the true proportion of events is smaller than 10%.
Please develop a statistical setup for the above dataset. Include a sequence of random variables and define a common distribution for this sample.
Derive a method of moments [estimator]{.underline} for the above parameter(s) of your common distribution.
Compute an estimate of your parameters using your MoM estimator.
Compute a 95% confidence interval for your parameter(s).
State a reasonable null and alternative hypothesis to test if your parameter is below 0.10.
Please compute a test statistic for the above sample and your hypotheses.
Given a critical region , would we reject the null hypothesis?
Would the pvalue that corresponds to this test statistic be greater than or smaller than 0.05? Why?