Balaji Statistics With R-Package Central Limit Theorem (CLT) : Solved Example
Balaji Statistics With R-Package Central Limit Theorem (CLT) : Solved Example
μȲ ¯¯¯=μx
and
σȲ ¯¯¯=σx/√n
Where,
μx = Population mean
σx = Population standard deviation
μȲ ¯¯ = Sample mean
σȲ ¯¯¯ = Sample standard deviation
n = Sample size
Solved Example
Question: The record of weights of the male population follows the normal distribution. Its mean
and standard deviations are 70 kg and 15 kg respectively. If a researcher considers the records
of 50 males, then what would be the mean and standard deviation of the chosen sample?
Solution:
Mean of the population μx = 70 kg
Standard deviation of the populationσ x = 15 kg
sample size n = 50
Mean of the sample is given by:
Ȳ ¯ = 70 kg
Standard deviation of the sample is given by:
σȲ ¯¯¯ = σx√n
σȲ ¯¯¯ = 15√50 =SE
σȲ ¯¯¯ = 2.122 = 2.1 kg (approx)=SE
abline(v=62,col="red")
iter<-500
n<-40
am<-rep(NA,iter)
for(i in 1:iter){
d<-sample(pdata,n)
d
am[i]<-mean(d)
}
hist(am,col="red")
n1<-length(am)
n1
#AM OF ALL 500 SAMPLE MEANS
sam<-mean(am)
sam
hist(am)
abline(v=sam,col="green")
#SD OF 500 SAMPLE MEANS
ssd<-sd(am)
ssd
#IT IS KNOW AS SE OF SAMPLE MEAN
#SE=sigma/sqrt(n)
se<-12/sqrt(40)
se
# probability distribution of sample mean is
#ND[MU,SE] is the conclusion.
Section-B
am<-rep(NA,iter)
for(i in 1:iter){
d<-sample(x,n)
d
am[i]<-mean(d)
}
hist(am,col="red")
n1<-length(am)
n1
#AM OF ALL 500 SAMPLE MEANS
sam<-mean(am)
sam
hist(am,col="green")
abline(v=sam,col="red")
#SD OF 500 SAMPLE MEANS
ssd<-sd(am)
ssd
#IT IS KNOW AS SE OF SAMPLE MEAN
#SE=sigma/sqrt(n)
se<-sigma/sqrt(n)
se
# probability distribution of sample mean is
#ND[MU,SE] is the conclusion.
Testing of hypothesis on Population mean[s].
General idea:- [i] Null hypothesis Ho
[ii] Alternate hypothesis H1
[iii] level of significance α.=P[reject Ho under
the assumption it is true.]
[iv] Critical /Rejection region for given α
[v] Critical value and then Decision rule.
data(sleep)
names(sleep)
x<-sleep$"extra"
y<-sleep$"group"
z<-sleep$"ID"
At the end of the year, each class took the same standardized test.
Mrs. Smith's students had an average test score of 78, with a
standard deviation of 10; and Mrs. Jones' students had an average
test score of 85, with a standard deviation of 15.
Test the hypothesis that Mrs. Smith and Mrs. Jones are equally
effective teachers. Use a 0.10 level of significance. (Assume that
student performance is approximately normal.)
AM 78 85
SD 10 15
Test the engineer's claim that the new batteries run at least 7
minutes longer than the old. Use a 0.05 level of significance.
(Assume that there are no outliers in either sample.)
AM 190 200
SD 20 40
****************************************
Notations:
1. Null hypothesis
H0: Claim on certain parameter. In the discussion
Mark=80, Need not be true.
2. Alternate hypothesis.
H1: It is negation of H0. It may be one sided or
two sided.
3. X1,X2,X3,….Xn is available information .Sample
data.
4. In test of hypothesis The probability of
acceptance is known as Acceptance region. Other
probability is Rejection region in the graph of
analysis. It is denoted by 1-α and α. In two sided
study the three probabilities are 1-α ,α/2, α/2.
This α in general is called LEVEL OF SIGNIFICANCE
IN testing of hypothesis.