SlideShare a Scribd company logo
1 of 12
Assignment #9
First, we recall some definitions that will be helpful in
answering questions 1-3
A population parameter is a single value that describes a
population characteristic (such as center, spread, location etc.)
EXAMPLES:
· The proportion
p
of adults in the United States who worry about money
· The mean lifetime
m
of a certain brand of computer hard disks
· The lower quartile
1
q
of a population of incomes
· The standard deviation
s
of the nicotine content per cigarette produced by a certain
manufacture.
In real life, population parameters are usually unknown. An
important objective of statistical inference is to use information
obtained from random sample or samples (depending on the
design of the study) to estimate parameters and to test claims
made about them.
A statistic is a number computed form the sample data only. The
resulting sample value must be independent of the population
parameters.
Statistics are used as numerical estimates of population
parameters.
Example: A random sample of 1500 national adults shows that
33% of Americans worry about money. The margin of error is
+/- 3 percentage points.
Statistics have variation. Different random samples of size
n
from the same population will usually yield different values of
the same statistic. This is called sampling variability.
The sampling distribution of a statistic is the distribution of the
values taken by the statistic over all possible random samples of
the same size from a given population.
What do we look for in a sampling distrinution?
Bias: A statistic is unbiased if its sampling distribution has a
mean that is equal to the true value of the parameter being
estimated by that statistic.
Variability: How much variation is there in the sampling
distribution?
The goal of this assignment is to simulate the sampling
distribution of some statistics.
Question 1:
An urn contains 50 beads. The beads are identical in shape and
have one of two colors: blue and orange. We would like to
estimate the proportion
p
of blue beads. We select without replacement a sample of 10
beads. The relevant statistics is the sample proportion
p
ˆ
of blue beads (i.e., the number of blue beads in the sample
divided by 10.
For the purpose of the simulation exercise, we will assume that
the box contains exactly 15 blue beads or, equivalently, the
proportion of blue beads is
30
.
0
=
p
.
i) Select 100 samples of size 10 from the box.
ii) Compute the sample proportion
p
ˆ
of blue beads for each of the 100 samples found in (i).
iii) Make a histogram of the values of
p
ˆ
found in (ii) (that is the approximate sampling distribution of
p
ˆ
.)
iv) Find the summary statistics of the 100 values of
p
ˆ
.
v) Base yourself on the histogram and the summary statistics to
describe the approximate sampling distribution of
p
ˆ
.
vi) Is
p
ˆ
an unbiased estimator of
p
? Hint: Evaluate the difference between
30
.
0
=
p
and the mean value.
vii) Based on the histogram, estimate the probability that
40
.
0
ˆ
>
p
and the probability that
20
.
0
ˆ
<
p
?
Rcmdr instructions: (No data set needed)
Upload the package Rcmdr (refer to the general instructions on
the first page) with the command library(Rcmdr).
· For (i) and (ii): To select 100 random samples and to compute
the sample proportions, choose
· Distributions → Discrete distributions → Hypergeometric
distribution → Sample from hypergeometric distribution
· Enter 15 (the number of blue beads in the urn) in the “m” box
· Enter 35 (the number of orange beads in the urn) in the “n”
box
· Enter 1 (selecting 1 bead at a time) in the “k”box
· Enter 100 in the “Number of samples” box
· Enter 10 in the “Number of columns” box
· Select Sample means in the Add to data set list (it’s actually
the default selection)
· Click OK
Click on the View data set to see the result of the simulation.
The 1 signifies “blue” and 0 “orange”. Each row is a random
sample of size 10 and its mean (last column) is the sample
proportion (do you see why?).
· To find the histogram of the 100 sample proportions:
· Choose Graphs → Histogram
· Pick the “mean” variable
· Click on Options and
· select “Percentages” from Axis Scaling
· in the x-label box, enter Sample proportion (n=10)
· Leave the y-label box empty
· Insert a title in the Graph title field (for e.g., Approximate
Sampling Distribution of the Sample Proportion) and click OK.
Copy and paste to your Word document
· Click OK. The output appears in a separate graph window
· To find the summary statistics:
· Choose Statistics → Summaries → Numerical summaries
· Pick the “mean” variable
· Click on Options and choose Mean, Standard deviation and
quantiles (these are the percentiles) and deselect everything
else.
· Click OK. The output will be found in the Output part of the R
Commander window. Copy and paste.
Plain R instructions (Important skip if you used Rcmdr)
Starting R: Double click on the R icon. The R console appears.
Copy and paste the program in the box below to the R console
and press Enter. Note the R code is in blue. The comments
follow the # sign. Take them along as they are not executable.
n=10 #sample size
b=15 #number of blue beads
o=35 #number of orange beads
k=1 #number of beads selected from the box
phat=c() #storage for the 100 phat values we will be generating
below
for (i in 1:100){
y=rhyper(n, b, o, k) #selects a random sample of size n
phat[i]=mean(y) #computes the proportion of blue beads in the
samoke
}
hist(phat, labels=T, col="grey", main="Sampling distribution of
phat") #gives histograms with counts on top of bin
summary(phat) #gives the 5-number summary and the mean of
phat
sd(phat) #gives the standard deviation of phat
length(phat) #gives the number phat values we simulated
The output consists of two parts:
a) The histogram of the 100 sample proportions that R
simulated
b) The summary statistics of the 100 sample proportions
Copy and paste the output and answer the questions.
Question 2:
Repeat question 1, but this time we select without replacement a
sample of size 20.
Rcmdr instructions:
· Repeat the Rcmdr instructions for question, except for the
number of columns. That line becomes Enter 20 in the “Number
of columns” box
Plain R instructions: (skip if you are using Rcmdr)
· Replace the line n=10 with n=20 in the box above in the plain
R script provided for question 1.
Question 3:
Assume your boss has asked you to estimate the proportion of
blue beads in the urn described above. Based on your findings
in questions 1 and 2, which of the two sampling distributions
would you prefer to work with. Explain your choice.
In questions 4-6, we have R simulate confidence intervals for a
normal population mean.
Question 4: (R)
i) Generate 25 samples of size 16 from a normal population with
mean
460
=
m
and standard deviation
100
=
s
. (nothing to take to your Word file)
ii) For each sample found in a), construct a 95% confidence
interval for the population mean.
iii) Verify by hand and for sample 1 only the results obtained by
R. Note that the sample mean is the midpoint of the confidence
interval.
iv) How many intervals contain
m
. Would you expect all 25 confidence intervals to contain
m
? Explain your answer.
R instructions (We are not using the Rcmdr package for this
problem)
Starting R: Double click on the R icon. The R console appears.
Copy and paste the program in the box below to the R console
and press Enter. Note the R code is in blue. The comments
follow the # sign. Take them along as they are not executable.
mu=460;sigma=100;n=16; #we are declaring the constants in the
simulation
k=25 #number of samples we will be selecting in this simulation
se=sigma/sqrt(n) #the yard stick, aka standard error of the
sample mean
lcb=c() #we are reserving a column for the lower confidence
bound
ucb=c() #we are reserving a column for the upper confidence
bound)
#We are going to generate k samples of size n from a normal
population with mean mu and standard deviation sigma
for (i in 1:k)
{
xbar=mean(rnorm(n,mu,sigma))#we are selecting a ample of
size n and computing its mean
lcb[i]=xbar-1.96*se #formula for the lower confidence bound
ucb[i]=xbar+1.96*se #formula for the upper confidence bound
}
#we print the confidence interval
ci=data.frame(lcb,ucb) #we create a data frame that consistts of
sample number and the lcb and ucb obtained from that sample
ci #print the data frame
#we plot the confidence intervals
matplot(rbind(lcb,ucb),
rbind(1:k,1:k),type="l", lty=1)#plots the ci's as line segments
abline(v=mu) #add a vertical line that represents the population
mean
c) The output consists of two parts:
d) the 25 confidence intervals (lower confidence bound, upper
confidence bound) to be found in the R console
e) a graphical representation of the intervals (in a separate
window)
Copy and paste the output and answer the questions.
Question 5: (R)
Repeat question 4, but this time use an 80% confidence level.
Instructions: Since we are dealing with a new confidence level,
modify the
*
z
value acccordingly in the lcb[i] and ucb[i] equations in the
program above and run it again.
Question 6: (R)
Based on the simulations you conducted in questions 4 and 5,
what are the differences between 80% and a 95% confidence
intervals for a population mean?
1
_1488732988.unknown
_1488733024.unknown
_1488734247.unknown
_1488739611.unknown
_1488772138.unknown
_1488904921.unknown
_1489391004.unknown
_1488732900.unknown
_1488732818.unknown
_1485108772.unknown
_1076310090.unknown
_1076310071.unknown
_1076309942.unknown
_1076309916.unknown

More Related Content

Similar to Assignment #9First, we recall some definitions that will be help.docx

Part 1 of 16 -Question 1 of 231.0 PointsThe data presented i.docx
Part 1 of 16 -Question 1 of 231.0 PointsThe data presented i.docxPart 1 of 16 -Question 1 of 231.0 PointsThe data presented i.docx
Part 1 of 16 -Question 1 of 231.0 PointsThe data presented i.docxodiliagilby
 
Advanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptxAdvanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptxakashayosha
 
Advanced Statistics Homework Help
Advanced Statistics Homework HelpAdvanced Statistics Homework Help
Advanced Statistics Homework HelpExcel Homework Help
 
Probability sampling
Probability samplingProbability sampling
Probability samplingPaul Grima
 
Week7 Quiz Help 2009[1]
Week7 Quiz Help 2009[1]Week7 Quiz Help 2009[1]
Week7 Quiz Help 2009[1]Brent Heard
 
Statistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docxStatistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docxdessiechisomjj4
 
L10 confidence intervals
L10 confidence intervalsL10 confidence intervals
L10 confidence intervalsLayal Fahad
 
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docx
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docxTSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docx
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docxnanamonkton
 
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docxInstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docxdirkrplav
 
Statistical thinking
Statistical thinkingStatistical thinking
Statistical thinkingmij1120
 
Populations LabLAB #3, PART I ESTIMATING POPULATION SIZEO.docx
Populations LabLAB #3, PART I ESTIMATING POPULATION SIZEO.docxPopulations LabLAB #3, PART I ESTIMATING POPULATION SIZEO.docx
Populations LabLAB #3, PART I ESTIMATING POPULATION SIZEO.docxharrisonhoward80223
 
raghu veera stats.ppt
raghu veera stats.pptraghu veera stats.ppt
raghu veera stats.pptDevarajuBn
 
Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or VarianceEstimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or VarianceLong Beach City College
 
Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance Long Beach City College
 

Similar to Assignment #9First, we recall some definitions that will be help.docx (20)

Chapter10 Revised
Chapter10 RevisedChapter10 Revised
Chapter10 Revised
 
Chapter10 Revised
Chapter10 RevisedChapter10 Revised
Chapter10 Revised
 
Part 1 of 16 -Question 1 of 231.0 PointsThe data presented i.docx
Part 1 of 16 -Question 1 of 231.0 PointsThe data presented i.docxPart 1 of 16 -Question 1 of 231.0 PointsThe data presented i.docx
Part 1 of 16 -Question 1 of 231.0 PointsThe data presented i.docx
 
Advanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptxAdvanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptx
 
Session02
Session02Session02
Session02
 
Advanced Statistics Homework Help
Advanced Statistics Homework HelpAdvanced Statistics Homework Help
Advanced Statistics Homework Help
 
Probability sampling
Probability samplingProbability sampling
Probability sampling
 
Week7 Quiz Help 2009[1]
Week7 Quiz Help 2009[1]Week7 Quiz Help 2009[1]
Week7 Quiz Help 2009[1]
 
Statistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docxStatistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docx
 
L10 confidence intervals
L10 confidence intervalsL10 confidence intervals
L10 confidence intervals
 
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docx
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docxTSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docx
TSTD 6251  Fall 2014SPSS Exercise and Assignment 120 PointsI.docx
 
lecture8.ppt
lecture8.pptlecture8.ppt
lecture8.ppt
 
Lecture8
Lecture8Lecture8
Lecture8
 
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docxInstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
 
Statistical thinking
Statistical thinkingStatistical thinking
Statistical thinking
 
Estimating a Population Mean
Estimating a Population Mean  Estimating a Population Mean
Estimating a Population Mean
 
Populations LabLAB #3, PART I ESTIMATING POPULATION SIZEO.docx
Populations LabLAB #3, PART I ESTIMATING POPULATION SIZEO.docxPopulations LabLAB #3, PART I ESTIMATING POPULATION SIZEO.docx
Populations LabLAB #3, PART I ESTIMATING POPULATION SIZEO.docx
 
raghu veera stats.ppt
raghu veera stats.pptraghu veera stats.ppt
raghu veera stats.ppt
 
Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or VarianceEstimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance
 
Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance
 

More from fredharris32

A report writingAt least 5 pagesTitle pageExecutive Su.docx
A report writingAt least 5 pagesTitle pageExecutive Su.docxA report writingAt least 5 pagesTitle pageExecutive Su.docx
A report writingAt least 5 pagesTitle pageExecutive Su.docxfredharris32
 
A reflection of how your life has changedevolved as a result of the.docx
A reflection of how your life has changedevolved as a result of the.docxA reflection of how your life has changedevolved as a result of the.docx
A reflection of how your life has changedevolved as a result of the.docxfredharris32
 
A Princeton University study argues that the preferences of average.docx
A Princeton University study argues that the preferences of average.docxA Princeton University study argues that the preferences of average.docx
A Princeton University study argues that the preferences of average.docxfredharris32
 
A rapidly growing small firm does not have access to sufficient exte.docx
A rapidly growing small firm does not have access to sufficient exte.docxA rapidly growing small firm does not have access to sufficient exte.docx
A rapidly growing small firm does not have access to sufficient exte.docxfredharris32
 
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docx
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docxA psychiatrist bills for 10 hours of psychotherapy and medication ch.docx
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docxfredharris32
 
A project to put on a major international sporting competition has t.docx
A project to put on a major international sporting competition has t.docxA project to put on a major international sporting competition has t.docx
A project to put on a major international sporting competition has t.docxfredharris32
 
A professional services company wants to globalize by offering s.docx
A professional services company wants to globalize by offering s.docxA professional services company wants to globalize by offering s.docx
A professional services company wants to globalize by offering s.docxfredharris32
 
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docx
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docxA presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docx
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docxfredharris32
 
a presentatiion on how the over dependence of IOT AI and robotics di.docx
a presentatiion on how the over dependence of IOT AI and robotics di.docxa presentatiion on how the over dependence of IOT AI and robotics di.docx
a presentatiion on how the over dependence of IOT AI and robotics di.docxfredharris32
 
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docx
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docxA P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docx
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docxfredharris32
 
A nursing care plan (NCP) is a formal process that includes .docx
A nursing care plan (NCP) is a formal process that includes .docxA nursing care plan (NCP) is a formal process that includes .docx
A nursing care plan (NCP) is a formal process that includes .docxfredharris32
 
A nurse educator is preparing an orientation on culture and the wo.docx
A nurse educator is preparing an orientation on culture and the wo.docxA nurse educator is preparing an orientation on culture and the wo.docx
A nurse educator is preparing an orientation on culture and the wo.docxfredharris32
 
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docx
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docxA NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docx
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docxfredharris32
 
A Look at the Marburg Fever OutbreaksThis week we will exami.docx
A Look at the Marburg Fever OutbreaksThis week we will exami.docxA Look at the Marburg Fever OutbreaksThis week we will exami.docx
A Look at the Marburg Fever OutbreaksThis week we will exami.docxfredharris32
 
A network consisting of M cities and M-1 roads connecting them is gi.docx
A network consisting of M cities and M-1 roads connecting them is gi.docxA network consisting of M cities and M-1 roads connecting them is gi.docx
A network consisting of M cities and M-1 roads connecting them is gi.docxfredharris32
 
A minimum 20-page (not including cover page, abstract, table of cont.docx
A minimum 20-page (not including cover page, abstract, table of cont.docxA minimum 20-page (not including cover page, abstract, table of cont.docx
A minimum 20-page (not including cover page, abstract, table of cont.docxfredharris32
 
A major component of being a teacher is the collaboration with t.docx
A major component of being a teacher is the collaboration with t.docxA major component of being a teacher is the collaboration with t.docx
A major component of being a teacher is the collaboration with t.docxfredharris32
 
a mad professor slips a secret tablet in your food that makes you gr.docx
a mad professor slips a secret tablet in your food that makes you gr.docxa mad professor slips a secret tablet in your food that makes you gr.docx
a mad professor slips a secret tablet in your food that makes you gr.docxfredharris32
 
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docx
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docxA New Mindset for   Leading Change [WLO 1][CLO 6]Through.docx
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docxfredharris32
 
A N A M E R I C A N H I S T O R YG I V E M EL I B.docx
A N  A M E R I C A N  H I S T O R YG I V E  M EL I B.docxA N  A M E R I C A N  H I S T O R YG I V E  M EL I B.docx
A N A M E R I C A N H I S T O R YG I V E M EL I B.docxfredharris32
 

More from fredharris32 (20)

A report writingAt least 5 pagesTitle pageExecutive Su.docx
A report writingAt least 5 pagesTitle pageExecutive Su.docxA report writingAt least 5 pagesTitle pageExecutive Su.docx
A report writingAt least 5 pagesTitle pageExecutive Su.docx
 
A reflection of how your life has changedevolved as a result of the.docx
A reflection of how your life has changedevolved as a result of the.docxA reflection of how your life has changedevolved as a result of the.docx
A reflection of how your life has changedevolved as a result of the.docx
 
A Princeton University study argues that the preferences of average.docx
A Princeton University study argues that the preferences of average.docxA Princeton University study argues that the preferences of average.docx
A Princeton University study argues that the preferences of average.docx
 
A rapidly growing small firm does not have access to sufficient exte.docx
A rapidly growing small firm does not have access to sufficient exte.docxA rapidly growing small firm does not have access to sufficient exte.docx
A rapidly growing small firm does not have access to sufficient exte.docx
 
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docx
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docxA psychiatrist bills for 10 hours of psychotherapy and medication ch.docx
A psychiatrist bills for 10 hours of psychotherapy and medication ch.docx
 
A project to put on a major international sporting competition has t.docx
A project to put on a major international sporting competition has t.docxA project to put on a major international sporting competition has t.docx
A project to put on a major international sporting competition has t.docx
 
A professional services company wants to globalize by offering s.docx
A professional services company wants to globalize by offering s.docxA professional services company wants to globalize by offering s.docx
A professional services company wants to globalize by offering s.docx
 
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docx
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docxA presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docx
A presentation( PowerPoint) on the novel, Disgrace by J . M. Coetzee.docx
 
a presentatiion on how the over dependence of IOT AI and robotics di.docx
a presentatiion on how the over dependence of IOT AI and robotics di.docxa presentatiion on how the over dependence of IOT AI and robotics di.docx
a presentatiion on how the over dependence of IOT AI and robotics di.docx
 
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docx
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docxA P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docx
A P P L I C A T I O N S A N D I M P L E M E N T A T I O Nh.docx
 
A nursing care plan (NCP) is a formal process that includes .docx
A nursing care plan (NCP) is a formal process that includes .docxA nursing care plan (NCP) is a formal process that includes .docx
A nursing care plan (NCP) is a formal process that includes .docx
 
A nurse educator is preparing an orientation on culture and the wo.docx
A nurse educator is preparing an orientation on culture and the wo.docxA nurse educator is preparing an orientation on culture and the wo.docx
A nurse educator is preparing an orientation on culture and the wo.docx
 
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docx
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docxA NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docx
A NOVEL TEACHER EVALUATION MODEL 1 Branching Paths A Nove.docx
 
A Look at the Marburg Fever OutbreaksThis week we will exami.docx
A Look at the Marburg Fever OutbreaksThis week we will exami.docxA Look at the Marburg Fever OutbreaksThis week we will exami.docx
A Look at the Marburg Fever OutbreaksThis week we will exami.docx
 
A network consisting of M cities and M-1 roads connecting them is gi.docx
A network consisting of M cities and M-1 roads connecting them is gi.docxA network consisting of M cities and M-1 roads connecting them is gi.docx
A network consisting of M cities and M-1 roads connecting them is gi.docx
 
A minimum 20-page (not including cover page, abstract, table of cont.docx
A minimum 20-page (not including cover page, abstract, table of cont.docxA minimum 20-page (not including cover page, abstract, table of cont.docx
A minimum 20-page (not including cover page, abstract, table of cont.docx
 
A major component of being a teacher is the collaboration with t.docx
A major component of being a teacher is the collaboration with t.docxA major component of being a teacher is the collaboration with t.docx
A major component of being a teacher is the collaboration with t.docx
 
a mad professor slips a secret tablet in your food that makes you gr.docx
a mad professor slips a secret tablet in your food that makes you gr.docxa mad professor slips a secret tablet in your food that makes you gr.docx
a mad professor slips a secret tablet in your food that makes you gr.docx
 
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docx
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docxA New Mindset for   Leading Change [WLO 1][CLO 6]Through.docx
A New Mindset for   Leading Change [WLO 1][CLO 6]Through.docx
 
A N A M E R I C A N H I S T O R YG I V E M EL I B.docx
A N  A M E R I C A N  H I S T O R YG I V E  M EL I B.docxA N  A M E R I C A N  H I S T O R YG I V E  M EL I B.docx
A N A M E R I C A N H I S T O R YG I V E M EL I B.docx
 

Recently uploaded

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 

Assignment #9First, we recall some definitions that will be help.docx

  • 1. Assignment #9 First, we recall some definitions that will be helpful in answering questions 1-3 A population parameter is a single value that describes a population characteristic (such as center, spread, location etc.) EXAMPLES: · The proportion p of adults in the United States who worry about money · The mean lifetime m of a certain brand of computer hard disks · The lower quartile 1 q of a population of incomes · The standard deviation s
  • 2. of the nicotine content per cigarette produced by a certain manufacture. In real life, population parameters are usually unknown. An important objective of statistical inference is to use information obtained from random sample or samples (depending on the design of the study) to estimate parameters and to test claims made about them. A statistic is a number computed form the sample data only. The resulting sample value must be independent of the population parameters. Statistics are used as numerical estimates of population parameters. Example: A random sample of 1500 national adults shows that 33% of Americans worry about money. The margin of error is +/- 3 percentage points. Statistics have variation. Different random samples of size n from the same population will usually yield different values of the same statistic. This is called sampling variability. The sampling distribution of a statistic is the distribution of the values taken by the statistic over all possible random samples of the same size from a given population. What do we look for in a sampling distrinution? Bias: A statistic is unbiased if its sampling distribution has a mean that is equal to the true value of the parameter being estimated by that statistic.
  • 3. Variability: How much variation is there in the sampling distribution? The goal of this assignment is to simulate the sampling distribution of some statistics. Question 1: An urn contains 50 beads. The beads are identical in shape and have one of two colors: blue and orange. We would like to estimate the proportion p of blue beads. We select without replacement a sample of 10 beads. The relevant statistics is the sample proportion p ˆ of blue beads (i.e., the number of blue beads in the sample divided by 10. For the purpose of the simulation exercise, we will assume that the box contains exactly 15 blue beads or, equivalently, the proportion of blue beads is 30 . 0 = p . i) Select 100 samples of size 10 from the box.
  • 4. ii) Compute the sample proportion p ˆ of blue beads for each of the 100 samples found in (i). iii) Make a histogram of the values of p ˆ found in (ii) (that is the approximate sampling distribution of p ˆ .) iv) Find the summary statistics of the 100 values of p ˆ . v) Base yourself on the histogram and the summary statistics to describe the approximate sampling distribution of p ˆ . vi) Is
  • 5. p ˆ an unbiased estimator of p ? Hint: Evaluate the difference between 30 . 0 = p and the mean value. vii) Based on the histogram, estimate the probability that 40 . 0 ˆ > p and the probability that 20 . 0 ˆ < p
  • 6. ? Rcmdr instructions: (No data set needed) Upload the package Rcmdr (refer to the general instructions on the first page) with the command library(Rcmdr). · For (i) and (ii): To select 100 random samples and to compute the sample proportions, choose · Distributions → Discrete distributions → Hypergeometric distribution → Sample from hypergeometric distribution · Enter 15 (the number of blue beads in the urn) in the “m” box · Enter 35 (the number of orange beads in the urn) in the “n” box · Enter 1 (selecting 1 bead at a time) in the “k”box · Enter 100 in the “Number of samples” box · Enter 10 in the “Number of columns” box · Select Sample means in the Add to data set list (it’s actually the default selection) · Click OK Click on the View data set to see the result of the simulation. The 1 signifies “blue” and 0 “orange”. Each row is a random sample of size 10 and its mean (last column) is the sample proportion (do you see why?). · To find the histogram of the 100 sample proportions: · Choose Graphs → Histogram · Pick the “mean” variable · Click on Options and
  • 7. · select “Percentages” from Axis Scaling · in the x-label box, enter Sample proportion (n=10) · Leave the y-label box empty · Insert a title in the Graph title field (for e.g., Approximate Sampling Distribution of the Sample Proportion) and click OK. Copy and paste to your Word document · Click OK. The output appears in a separate graph window · To find the summary statistics: · Choose Statistics → Summaries → Numerical summaries · Pick the “mean” variable · Click on Options and choose Mean, Standard deviation and quantiles (these are the percentiles) and deselect everything else. · Click OK. The output will be found in the Output part of the R Commander window. Copy and paste. Plain R instructions (Important skip if you used Rcmdr) Starting R: Double click on the R icon. The R console appears. Copy and paste the program in the box below to the R console and press Enter. Note the R code is in blue. The comments follow the # sign. Take them along as they are not executable. n=10 #sample size b=15 #number of blue beads o=35 #number of orange beads k=1 #number of beads selected from the box phat=c() #storage for the 100 phat values we will be generating
  • 8. below for (i in 1:100){ y=rhyper(n, b, o, k) #selects a random sample of size n phat[i]=mean(y) #computes the proportion of blue beads in the samoke } hist(phat, labels=T, col="grey", main="Sampling distribution of phat") #gives histograms with counts on top of bin summary(phat) #gives the 5-number summary and the mean of phat sd(phat) #gives the standard deviation of phat length(phat) #gives the number phat values we simulated The output consists of two parts: a) The histogram of the 100 sample proportions that R simulated b) The summary statistics of the 100 sample proportions Copy and paste the output and answer the questions. Question 2: Repeat question 1, but this time we select without replacement a sample of size 20. Rcmdr instructions: · Repeat the Rcmdr instructions for question, except for the number of columns. That line becomes Enter 20 in the “Number of columns” box Plain R instructions: (skip if you are using Rcmdr) · Replace the line n=10 with n=20 in the box above in the plain
  • 9. R script provided for question 1. Question 3: Assume your boss has asked you to estimate the proportion of blue beads in the urn described above. Based on your findings in questions 1 and 2, which of the two sampling distributions would you prefer to work with. Explain your choice. In questions 4-6, we have R simulate confidence intervals for a normal population mean. Question 4: (R) i) Generate 25 samples of size 16 from a normal population with mean 460 = m and standard deviation 100 = s . (nothing to take to your Word file) ii) For each sample found in a), construct a 95% confidence interval for the population mean. iii) Verify by hand and for sample 1 only the results obtained by R. Note that the sample mean is the midpoint of the confidence interval. iv) How many intervals contain m . Would you expect all 25 confidence intervals to contain
  • 10. m ? Explain your answer. R instructions (We are not using the Rcmdr package for this problem) Starting R: Double click on the R icon. The R console appears. Copy and paste the program in the box below to the R console and press Enter. Note the R code is in blue. The comments follow the # sign. Take them along as they are not executable. mu=460;sigma=100;n=16; #we are declaring the constants in the simulation k=25 #number of samples we will be selecting in this simulation se=sigma/sqrt(n) #the yard stick, aka standard error of the sample mean lcb=c() #we are reserving a column for the lower confidence bound ucb=c() #we are reserving a column for the upper confidence bound) #We are going to generate k samples of size n from a normal population with mean mu and standard deviation sigma for (i in 1:k) {
  • 11. xbar=mean(rnorm(n,mu,sigma))#we are selecting a ample of size n and computing its mean lcb[i]=xbar-1.96*se #formula for the lower confidence bound ucb[i]=xbar+1.96*se #formula for the upper confidence bound } #we print the confidence interval ci=data.frame(lcb,ucb) #we create a data frame that consistts of sample number and the lcb and ucb obtained from that sample ci #print the data frame #we plot the confidence intervals matplot(rbind(lcb,ucb), rbind(1:k,1:k),type="l", lty=1)#plots the ci's as line segments abline(v=mu) #add a vertical line that represents the population mean c) The output consists of two parts: d) the 25 confidence intervals (lower confidence bound, upper confidence bound) to be found in the R console e) a graphical representation of the intervals (in a separate window) Copy and paste the output and answer the questions. Question 5: (R) Repeat question 4, but this time use an 80% confidence level. Instructions: Since we are dealing with a new confidence level,
  • 12. modify the * z value acccordingly in the lcb[i] and ucb[i] equations in the program above and run it again. Question 6: (R) Based on the simulations you conducted in questions 4 and 5, what are the differences between 80% and a 95% confidence intervals for a population mean? 1 _1488732988.unknown _1488733024.unknown _1488734247.unknown _1488739611.unknown _1488772138.unknown _1488904921.unknown _1489391004.unknown _1488732900.unknown _1488732818.unknown _1485108772.unknown _1076310090.unknown _1076310071.unknown _1076309942.unknown _1076309916.unknown