Statistics Assignment: Probability, Z-scores, R, and Sampling
VerifiedAdded on 2022/10/19
|7
|1246
|10
Homework Assignment
AI Summary
This statistics assignment, completed on September 18, 2019, addresses probability and statistical concepts. The assignment is divided into two parts, with the first part focusing on probability calculations using a provided table of joint probabilities, including finding marginal and conditional probabilities. The second part of the assignment delves into the application of the normal distribution, z-scores, and standard error, using R programming to calculate probabilities related to heart rates. Questions cover calculating z-scores, determining probabilities for heart rates above and below certain values, computing standard error, and analyzing the impact of sample size on probabilities. The document includes the R code used to solve the problems and the corresponding outputs, providing a comprehensive solution to the assignment.

Statistics
Student Name:
Instructor Name:
Course Number:
18th September 2019
Student Name:
Instructor Name:
Course Number:
18th September 2019
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

____________________________________________________________________________
1. [Week 3] Each participant in an experiment was given one of three tasks. Let these three
tasks be symbolized by A1 , A2 ,and A3. The number of errors each participant made in
performing the task was recorded by use of the categories “0 errors,” “1 error,” and “2 or
more errors.” Thus, every participant was classified in two ways, by task and by number
of errors. The following table shows the probabilities for these joint events for any
participant drawn at random.
Task
Errors A1 A2 A3 Total
0 .05 .02 .13 .20
1 .08 .17 .10 .35
2 or more .20 .15 .10 .45
Total .33 .34 .33
Use these probabilities to find
a. The marginal probabilities of the task events A1 , A2 ,and A3
Answer
P ( A1 )=0.05+0.08+0.20=0.33
P ( A2 )=0.02+ 0.17+0.15=0.34
P ( A3 ) =0.13+0.10+0.10=0.33
b. The marginal probabilities for numbers of errors
Answer
P ( Error=0 )=0.05+ 0.02+0.13=0.20
P ( Error=1 )=0.08+0.17 +0.10=0.35
P ( Error=2∨more )=0.20+ 0.15+0.10=0.45
c. The conditional probability for zero errors given task A1
Answer
P ( Error=0∨ A1 ) = P ( Error∧ A1 )
P( A1 )
P ( Error∧A1 )=0.05
P ( A1 ) =0.33
P ( Error=0∨ A1 )= P ( Error∧ A1 )
P( A1 ) =0.05
0.33 =0.1515
d. The conditional probability for two or more errors given task A2
Answer
P ( 2∨more errors∨ A2 ) = P ( 2∨more errors∧ A2 )
P( A2)
P ( 2∨more errors∧ A2 ) =0.15
1. [Week 3] Each participant in an experiment was given one of three tasks. Let these three
tasks be symbolized by A1 , A2 ,and A3. The number of errors each participant made in
performing the task was recorded by use of the categories “0 errors,” “1 error,” and “2 or
more errors.” Thus, every participant was classified in two ways, by task and by number
of errors. The following table shows the probabilities for these joint events for any
participant drawn at random.
Task
Errors A1 A2 A3 Total
0 .05 .02 .13 .20
1 .08 .17 .10 .35
2 or more .20 .15 .10 .45
Total .33 .34 .33
Use these probabilities to find
a. The marginal probabilities of the task events A1 , A2 ,and A3
Answer
P ( A1 )=0.05+0.08+0.20=0.33
P ( A2 )=0.02+ 0.17+0.15=0.34
P ( A3 ) =0.13+0.10+0.10=0.33
b. The marginal probabilities for numbers of errors
Answer
P ( Error=0 )=0.05+ 0.02+0.13=0.20
P ( Error=1 )=0.08+0.17 +0.10=0.35
P ( Error=2∨more )=0.20+ 0.15+0.10=0.45
c. The conditional probability for zero errors given task A1
Answer
P ( Error=0∨ A1 ) = P ( Error∧ A1 )
P( A1 )
P ( Error∧A1 )=0.05
P ( A1 ) =0.33
P ( Error=0∨ A1 )= P ( Error∧ A1 )
P( A1 ) =0.05
0.33 =0.1515
d. The conditional probability for two or more errors given task A2
Answer
P ( 2∨more errors∨ A2 ) = P ( 2∨more errors∧ A2 )
P( A2)
P ( 2∨more errors∧ A2 ) =0.15

P ( A2 )=0.34
P ( 2∨more errors∨ A2 ) = P ( 2∨more errors∧ A2 )
P( A2) = 0.15
0.34 =0.4412
e. The conditional probability of task A3 given no errors
Answer
P ( A3∨No error ) = P ( A3 ∧no errors )
P (No Error)
P ( A3∧no errors ) =0.13
P ( No Error )=0.20
P ( A3∨No error ) = P ( A3 ∧no errors )
P ( No Error) = 0.13
0.20 =0.65
Answer the following questions using R (this has to be done in R and not by hand unless
you want to check your answers). Copy and paste code and output into document. Make
sure questions are clearly labeled. Do not write answers as comments in R.
2. [Week 3: (a)-(d), Week 4: (e)-(i)] Assume a normally distributed population of resting
heart rates with μ = 76 and σ = 5.
a. Compute the z-score for a heart rate of 72.
Answer
Therefore the z score is -0.8
b. What is the probability of randomly selecting
someone whose heart rate is below 72?
Answer
Therefore the probability of randomly selecting someone whose heart rate is
below 72 is 0.2119
c. What is the probability of randomly selecting someone whose heart rate above
80?
Answer
> mean_heartrate<-76
> stdev_heartrate<-5
> zscore<-(72-
mean_heartrate)/stdev_h
eartrate
> zscore
[1] -0.8
> pnorm(zscore)
[1] 0.2118554
> mean_heartrate<-76
> stdev_heartrate<-5
> zscore2<-(80-
mean_heartrate)/stdev_h
eartrate
> zscore2
[1] 0.8
> 1-pnorm(zscore2)
[1] 0.2118554
P ( 2∨more errors∨ A2 ) = P ( 2∨more errors∧ A2 )
P( A2) = 0.15
0.34 =0.4412
e. The conditional probability of task A3 given no errors
Answer
P ( A3∨No error ) = P ( A3 ∧no errors )
P (No Error)
P ( A3∧no errors ) =0.13
P ( No Error )=0.20
P ( A3∨No error ) = P ( A3 ∧no errors )
P ( No Error) = 0.13
0.20 =0.65
Answer the following questions using R (this has to be done in R and not by hand unless
you want to check your answers). Copy and paste code and output into document. Make
sure questions are clearly labeled. Do not write answers as comments in R.
2. [Week 3: (a)-(d), Week 4: (e)-(i)] Assume a normally distributed population of resting
heart rates with μ = 76 and σ = 5.
a. Compute the z-score for a heart rate of 72.
Answer
Therefore the z score is -0.8
b. What is the probability of randomly selecting
someone whose heart rate is below 72?
Answer
Therefore the probability of randomly selecting someone whose heart rate is
below 72 is 0.2119
c. What is the probability of randomly selecting someone whose heart rate above
80?
Answer
> mean_heartrate<-76
> stdev_heartrate<-5
> zscore<-(72-
mean_heartrate)/stdev_h
eartrate
> zscore
[1] -0.8
> pnorm(zscore)
[1] 0.2118554
> mean_heartrate<-76
> stdev_heartrate<-5
> zscore2<-(80-
mean_heartrate)/stdev_h
eartrate
> zscore2
[1] 0.8
> 1-pnorm(zscore2)
[1] 0.2118554
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Therefore the probability of randomly selecting someone whose heart rate is
above 80 is 0.2119
d. What is the probability of randomly selecting someone whose heart rate either
below 60 or above 90?
Answer
Therefore the probability of randomly selecting
someone whose heart rate either below 60 or
above 90 is 0.0032
e. Compute the standard error for a sample size
of 8.
Answer
From the above, the computed
standard error is 1.7678
f. What does the standard error measure?
Answer
Standard error measures the variation in random variables. It provides a
measure of the spread for a given variable.
g. What is the probability of selecting a random sample of 8 individuals whose
mean heart rate is below 72?
Answer
Therefore the probability of
selecting a random sample of 8
individuals whose mean heart rate
is below 72 is 0.0118
Answer
> mean_heartrate<-76
> stdev_heartrate<-5
> zscore3<-(60-
mean_heartrate)/stdev_h
eartrate
> zscore3
[1] -3.2
> zscore4<-(90-
mean_heartrate)/stdev_h
eartrate
> zscore4
[1] 2.8
> pnorm(zscore3) +(1-
pnorm(zscore4))
[1] 0.003242268
> stdev_heartrate<-5
> n<-8
> standard_error<-
(stdev_heartrate/sqrt(n))
> standard_error
[1] 1.767767
> mean_heartrate<-76
> stdev_heartrate<-5
> zscore5<-(72-
mean_heartrate)/standar
d_error
> zscore5
[1] -2.262742
> pnorm(zscore5)
[1] 0.01182581
above 80 is 0.2119
d. What is the probability of randomly selecting someone whose heart rate either
below 60 or above 90?
Answer
Therefore the probability of randomly selecting
someone whose heart rate either below 60 or
above 90 is 0.0032
e. Compute the standard error for a sample size
of 8.
Answer
From the above, the computed
standard error is 1.7678
f. What does the standard error measure?
Answer
Standard error measures the variation in random variables. It provides a
measure of the spread for a given variable.
g. What is the probability of selecting a random sample of 8 individuals whose
mean heart rate is below 72?
Answer
Therefore the probability of
selecting a random sample of 8
individuals whose mean heart rate
is below 72 is 0.0118
Answer
> mean_heartrate<-76
> stdev_heartrate<-5
> zscore3<-(60-
mean_heartrate)/stdev_h
eartrate
> zscore3
[1] -3.2
> zscore4<-(90-
mean_heartrate)/stdev_h
eartrate
> zscore4
[1] 2.8
> pnorm(zscore3) +(1-
pnorm(zscore4))
[1] 0.003242268
> stdev_heartrate<-5
> n<-8
> standard_error<-
(stdev_heartrate/sqrt(n))
> standard_error
[1] 1.767767
> mean_heartrate<-76
> stdev_heartrate<-5
> zscore5<-(72-
mean_heartrate)/standar
d_error
> zscore5
[1] -2.262742
> pnorm(zscore5)
[1] 0.01182581
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

h. What is the probability of selecting a random sample of 16 individuals whose
mean heart rate is below 72?
Answer
Therefore, the probability of
selecting a random sample of 16
individuals whose mean heart rate
is below 72 is 0.00069
i. What is happening to the probabilities as the sample size increases? Briefly
explain why.
Answer
As the sample size increases, the probabilities decreases. This is because an
increase in sample size results in a decrease in the standard error which has a
direct effect on the z score. This therefore results to the observed behavior.
3. [Week 4] Consider a population of size 11 and samples of size 4.
a. Compute the total possible samples using theoretical sampling.
Answer
Theoretically, the total possible samples would be 4.
b. Compute the total possible samples using experimental sampling.
Answer
The total possible samples using experimental sampling would be 11.
> mean_heartrate<-76
> stdev_heartrate<-5
> n<-16
> standard_error<-
(stdev_heartrate/sqrt(n))
> standard_error
[1] 1.25
> zscore6<-(72-
mean_heartrate)/standar
d_error
> zscore6
[1] -3.2
> pnorm(zscore6)
[1] 0.0006871379
mean heart rate is below 72?
Answer
Therefore, the probability of
selecting a random sample of 16
individuals whose mean heart rate
is below 72 is 0.00069
i. What is happening to the probabilities as the sample size increases? Briefly
explain why.
Answer
As the sample size increases, the probabilities decreases. This is because an
increase in sample size results in a decrease in the standard error which has a
direct effect on the z score. This therefore results to the observed behavior.
3. [Week 4] Consider a population of size 11 and samples of size 4.
a. Compute the total possible samples using theoretical sampling.
Answer
Theoretically, the total possible samples would be 4.
b. Compute the total possible samples using experimental sampling.
Answer
The total possible samples using experimental sampling would be 11.
> mean_heartrate<-76
> stdev_heartrate<-5
> n<-16
> standard_error<-
(stdev_heartrate/sqrt(n))
> standard_error
[1] 1.25
> zscore6<-(72-
mean_heartrate)/standar
d_error
> zscore6
[1] -3.2
> pnorm(zscore6)
[1] 0.0006871379

Appendix
R codes
#Question 2
#part a
mean_heartrate<-76
stdev_heartrate<-5
zscore<-(72-mean_heartrate)/stdev_heartrate
zscore
#part b
pnorm(zscore)
#part c
mean_heartrate<-76
stdev_heartrate<-5
zscore2<-(80-mean_heartrate)/stdev_heartrate
zscore2
1-pnorm(zscore2)
#part d
mean_heartrate<-76
stdev_heartrate<-5
zscore3<-(60-mean_heartrate)/stdev_heartrate
zscore3
zscore4<-(90-mean_heartrate)/stdev_heartrate
zscore4
pnorm(zscore3) +(1-pnorm(zscore4))
#part e
stdev_heartrate<-5
n<-8
standard_error<-(stdev_heartrate/sqrt(n))
standard_error
#part g
mean_heartrate<-76
stdev_heartrate<-5
zscore5<-(72-mean_heartrate)/standard_error
zscore5
pnorm(zscore5)
#part h
mean_heartrate<-76
stdev_heartrate<-5
n<-16
standard_error<-(stdev_heartrate/sqrt(n))
standard_error
zscore6<-(72-mean_heartrate)/standard_error
zscore6
pnorm(zscore6)
R codes
#Question 2
#part a
mean_heartrate<-76
stdev_heartrate<-5
zscore<-(72-mean_heartrate)/stdev_heartrate
zscore
#part b
pnorm(zscore)
#part c
mean_heartrate<-76
stdev_heartrate<-5
zscore2<-(80-mean_heartrate)/stdev_heartrate
zscore2
1-pnorm(zscore2)
#part d
mean_heartrate<-76
stdev_heartrate<-5
zscore3<-(60-mean_heartrate)/stdev_heartrate
zscore3
zscore4<-(90-mean_heartrate)/stdev_heartrate
zscore4
pnorm(zscore3) +(1-pnorm(zscore4))
#part e
stdev_heartrate<-5
n<-8
standard_error<-(stdev_heartrate/sqrt(n))
standard_error
#part g
mean_heartrate<-76
stdev_heartrate<-5
zscore5<-(72-mean_heartrate)/standard_error
zscore5
pnorm(zscore5)
#part h
mean_heartrate<-76
stdev_heartrate<-5
n<-16
standard_error<-(stdev_heartrate/sqrt(n))
standard_error
zscore6<-(72-mean_heartrate)/standard_error
zscore6
pnorm(zscore6)
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

1 out of 7
Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2026 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.
