ผลต่างระหว่างรุ่นของ "Week11 practice 2"

จาก Theory Wiki
ไปยังการนำทาง ไปยังการค้นหา
 
(ไม่แสดง 10 รุ่นระหว่างกลางโดยผู้ใช้คนเดียวกัน)
แถว 1: แถว 1:
== Sample ==
+
== Sampling and statistics ==
Consider a certain distribution. The mean <math>\mu</math> of the distribution is the expected value of a random variable <math>X</math> sample from the distribution.  I.e.,
+
We will work in pairs.
  
<center>
+
'''Generators''':  We shall perform sampling from two random distribution the normal distribution and a uniform distribution over some range <math>[a,b]</math>.  
<math>\mu=E[X]</math>.
 
</center>
 
  
Also recall that the variance of the distribution is
+
For a normal distribution, choose the mean <math>\mu</math> and its s.d. <math>\sigma</math>.  For a uniform distribution, choose ''a'' and ''b''.  (Don't forget to take note of the actual distribution that you use so that you can tell your statisticians the correct answers.)
  
<center>
+
Generate 10 sets of data:
<math>\sigma^2=Var(X)=E[(X-\mu)^2]=E[X^2] = E[X]^2.</math>.
 
</center>
 
  
And finally, the standard deviation is <math>\sigma = \sqrt{Var(X)}</math>.
+
* For normal distributions (with different parameters), generate samples of size <math>n = 5, 10, 50, 100, 500</math>.  We shall call these sets of data set 1, set 2,..., and set 5.
 +
* For uniform distributions (with different parameters), generate samples of size <math>n = 5, 10, 50, 100, 500</math>.  We shall call these sets of data set 6, set 7, ..., and set 10.
  
Suppose that you take <math>n</math> samples <math>X_1,X_2,\ldots,X_n</math> independently from this distribution(Note that <math>X_1,X_2,\ldots,X_n</math> are random variables.
+
For the normal distributions, you already know the variances and the standard deviationFor the uniform distributions, for each set of data, compute the real means, real variances, and  real standard deviations.  
  
=== Sample means ===
+
'''Statisticians''':  Take your friend's generated data, and for each set of data compute the sample mean <math>\bar{X}</math>, the sample variance <math>S^2</math>, and the sample standard deviation <math>S</math>.
  
The statistic
+
Compare your estimates of means and s.d. with the actual values from your generator.
  
<center>
+
== Confidence intervals, known variance <math>\sigma^2</math> ==
<math>\bar{X} = \frac{X_1+X_2+\cdots+X_n}{n} = \frac{1}{n}\sum_{i=1}^n X_i</math>  
+
For each of the data set, ask your friend for the real <math>\sigma</math>.
</center>
 
  
is called a '''sample mean.'''
+
For each of the data set, compute the confidence interval for the levels of confidence of 80%, 90%, 95%, and 99%.
 
 
We can compute:
 
 
 
<math>E[\bar{X}]= E\left[\frac{1}{n}\sum_{i=1}^n X_i\right] = \frac{1}{n}E\left[\sum_{i=1}^n X_i\right] = \frac{1}{n}\sum_{i=1}^n E[X_i] = \frac{1}{n} n\mu = \mu</math>
 
 
 
 
 
 
 
=== Sample variances and sample standard deviations ===
 

รุ่นแก้ไขปัจจุบันเมื่อ 02:08, 6 พฤศจิกายน 2557

Sampling and statistics

We will work in pairs.

Generators: We shall perform sampling from two random distribution the normal distribution and a uniform distribution over some range .

For a normal distribution, choose the mean and its s.d. . For a uniform distribution, choose a and b. (Don't forget to take note of the actual distribution that you use so that you can tell your statisticians the correct answers.)

Generate 10 sets of data:

  • For normal distributions (with different parameters), generate samples of size . We shall call these sets of data set 1, set 2,..., and set 5.
  • For uniform distributions (with different parameters), generate samples of size . We shall call these sets of data set 6, set 7, ..., and set 10.

For the normal distributions, you already know the variances and the standard deviation. For the uniform distributions, for each set of data, compute the real means, real variances, and real standard deviations.

Statisticians: Take your friend's generated data, and for each set of data compute the sample mean , the sample variance , and the sample standard deviation .

Compare your estimates of means and s.d. with the actual values from your generator.

Confidence intervals, known variance

For each of the data set, ask your friend for the real .

For each of the data set, compute the confidence interval for the levels of confidence of 80%, 90%, 95%, and 99%.