In: Statistics and Probability
roblem 1) Try creating 100 normally disributed random numbers with an average of 10 and standard deviation of 1. How close is the average to 10? How close is the standard deviation to 1?
Problem 2) Try creating 100 normally disributed random numbers with a true average of 10 and true standard deviation of 1. What is the confidence interval for the measured average? Is it higher or lower than the confidence interval for 20 samples?
1.
TRADITIONAL METHOD
given that,
sample mean, x =20
standard deviation, s =1
sample size, n =100
I.
standard error = sd/ sqrt(n)
where,
sd = standard deviation
n = sample size
standard error = ( 1/ sqrt ( 100) )
= 0.1
II.
margin of error = t α/2 * (standard error)
where,
ta/2 = t-table value
level of significance, α = 0.05
from standard normal table, two tailed value of |t α/2| with n-1 =
99 d.f is 1.984
margin of error = 1.984 * 0.1
= 0.198
III.
CI = x ± margin of error
confidence interval = [ 20 ± 0.198 ]
= [ 19.802 , 20.198 ]
-----------------------------------------------------------------------------------------------
DIRECT METHOD
given that,
sample mean, x =20
standard deviation, s =1
sample size, n =100
level of significance, α = 0.05
from standard normal table, two tailed value of |t α/2| with n-1 =
99 d.f is 1.984
we use CI = x ± t a/2 * (sd/ Sqrt(n))
where,
x = mean
sd = standard deviation
a = 1 - (confidence level/100)
ta/2 = t-table value
CI = confidence interval
confidence interval = [ 20 ± Z a/2 ( 1/ Sqrt ( 100) ]
= [ 20-(1.984 * 0.1) , 20+(1.984 * 0.1) ]
= [ 19.802 , 20.198 ]
-----------------------------------------------------------------------------------------------
interpretations:
1) we are 95% sure that the interval [ 19.802 , 20.198 ] contains
the true population mean
2) If a large number of samples are collected, and a confidence
interval is created
for each sample, 95% of these intervals will contains the true
population mean
2.
TRADITIONAL METHOD
given that,
sample mean, x =20
standard deviation, s =1
sample size, n =20
I.
standard error = sd/ sqrt(n)
where,
sd = standard deviation
n = sample size
standard error = ( 1/ sqrt ( 20) )
= 0.224
II.
margin of error = t α/2 * (standard error)
where,
ta/2 = t-table value
level of significance, α = 0.05
from standard normal table, two tailed value of |t α/2| with n-1 =
19 d.f is 2.093
margin of error = 2.093 * 0.224
= 0.468
III.
CI = x ± margin of error
confidence interval = [ 20 ± 0.468 ]
= [ 19.532 , 20.468 ]
-----------------------------------------------------------------------------------------------
DIRECT METHOD
given that,
sample mean, x =20
standard deviation, s =1
sample size, n =20
level of significance, α = 0.05
from standard normal table, two tailed value of |t α/2| with n-1 =
19 d.f is 2.093
we use CI = x ± t a/2 * (sd/ Sqrt(n))
where,
x = mean
sd = standard deviation
a = 1 - (confidence level/100)
ta/2 = t-table value
CI = confidence interval
confidence interval = [ 20 ± Z a/2 ( 1/ Sqrt ( 20) ]
= [ 20-(2.093 * 0.224) , 20+(2.093 * 0.224) ]
= [ 19.532 , 20.468 ]
-----------------------------------------------------------------------------------------------
interpretations:
1) we are 95% sure that the interval [ 19.532 , 20.468 ] contains
the true population mean
2) If a large number of samples are collected, and a confidence
interval is created
for each sample, 95% of these intervals will contains the true
population mean
conclusion :
1.
we are 95% sure that the interval [ 19.802 , 20.198 ]
2.
we are 95% sure that the interval [ 19.532 , 20.468 ]
In the second one sample size is 20 so that lower interval is lower
than first one but upper interval
is higher than the first one .