Question

R studio #Exercise : Calculate the following probabilities : #1. Probability that a normal random variable...

R studio

#Exercise : Calculate the following probabilities :

#1. Probability that a normal random variable with mean 22 and variance 25
#(i)lies between 16.2 and 27.5

#(ii) is greater than 29


#(iii) is less than 17


#(iv)is less than 15 or greater than 25


#2.Probability that in 60 tosses of a fair coin the head comes up
#(i) 20,25 or 30 times

#(ii) less than 20 times


#(iii) between 20 and 30 times


#3.A random variable X has Poisson distribution with mean 7. Find the probability that

# (i) X is less than or equal to 5:

#less than 4:

#(ii) X is greater than 10

# (iii)X is between 4 and 16


#Quantiles
# The following examples show how obtain the quantiles
# of some common distributions for the values (vector) given:

#Normal(0,1) Distribution :

y <- c(.01,.05,.1,.2,.5,.8,.95,0.975, .99)


#BinomialDistribution size = 30, prob = 0.2:

y <- c(.01,.05,.1,.2,.5,.8,.95,.99)

#Poisson($\lambda$) Distribution with mean (lambda) = 6:

y <- c(.01,.05,.1,.2,.5,.8,.95,.99)


#Random Variable generation

# Generate 10 random numbers from the normal (0,1) distribution

# Generate 10 random numbers from the normal distribution with mean 5 and a standard deviation of 2.5

# Generate 20 random numbers from the binomial with a size of 5 and probability of 20 percent
# Generate 20 random numbers from the poisson with a lambda of 6


# Exercise (Advanced) : Generate 500 samples from Student's $t$ distribution with 5 degrees of freedom and plot the historgam.
# (Note: $t$ distribution is going to be covered in class). The corresponding function is rt . hist(rt(500,5),40)
#Density Plots

#Plotting the probability density function (pdf) of a Normal distribution :
# over the x vector given; and plot it

x <- seq(-4.5,4.5,.1)

#Plotting the probablity mass function for the following 2 variables distributed Binomially with size 30;
# the first one with probability 0.15 and the second with probability 0.4:
# Split the screen into 2 and generate the two plots on the same screen
k <- c(1:15)


#================================================================================================

#Using the dataset "USAarrests" available in base R; answer the questions below.
# This data set contains statistics about violent crime rates by us state; it is available in base R


#Make a scatterplot of Murder and UrbanPop. Describe the relationship between these two variables.

# display histograms of Murder and Rape

# Find the mean and standard deviation of both Murder and Rape

# Identify the 27th percentile of the Assault series; the 50th percentile

# # Identify the 27th percentile of the Rape data, the 50th percentile AND the 97the percentile

# display a barchart of the 27th, 50th, and 97th percentiles

# Determine what proportion of the data
# are within one standard deviation of the mean

# Display a histogram of Assault and Rape and identify the mean and the mean +/- one standard deviation

# Provide a title and properly label the x and y axes for all your charts.

#========================================================================================================

# Compare monthly data for the "market" (eg DJI) and for General Electric for the period 2015-01 till September
# #Rebase both sector series to 100 in 2015-01-01
# How was GE performed relative to the market over the period examined?
# Do this by rebasing the two series to 100 = 2015-01-01
# add an appropriate legend to the graph
# Color one line purple and the other red

#========================================================================================================

#===============================================================================================
# Display the distribution of the mean of the data for Size,below (hint: use a for loop)
# this means that we are using the collected sample (shown below) to simulate the p

# Example Widgets
# Generate a sequence of number from 1 to 20; call it Count
# Generate a sequence of 20 numbers from 200.5 to 355.125; add to it numbers from a random normal of
# mean 5 and standard deviation 10; call it Size
# first find the mean of Size
# Identify the mean in the histogram of the distribution of the mean - with a red line; and label the graph properly

#display the generated data for Size in a boxplot

# What is the probability that someone is less than 270 in size?
#5 What is the probability that a man is greater than 300 in size?
#6 What is the probaiblity of being between 280 and 300 in size?

# If being at 20% of the scale is the cutting point for being hefty when it comes to size, what is the "hefty cut-off point"?

# load library e1071; find measures of skewness and kurtosis of the Size variable.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:-

1)

Mean = 22, variance = 25

(i) The probability that mean lies between 16.2 and 27.5 is 0.741.

x1 = 16.2

x2 = 27.5

By applying normal distribution:-

z = \frac{x-\mu }{\sigma }

z1 = - 1.16

z2 = 1.10

P( -1.16 < z < 1.10) = P(z > - 1.16) - P(z > 1.10)  

P( -1.16 < z < 1.10) = 0.877 - 0.136

P( -1.16 < z < 1.10) = 0.74

(ii) P(x > 29) = 0.081.

x = 29

By applying normal distribution:-

z = \frac{x-\mu }{\sigma }

z = 1.40

P(z > 1.40) = 0.081

(iii) P(x < 17) = 0.159

x = 17

By applying normal distribution:-

z = \frac{x-\mu }{\sigma }

z = - 1.0

P(z < -1.0) = 0.159

iv) P(15 > x > 25) = 0.355.

x1 = 15

x2 = 25

By applying normal distribution:-

z = \frac{x-\mu }{\sigma }

z1 = - 1.40

z2 = 0.60

P( -1.40 > z > 0.60) = P(z < -1.40) + P(z > 0.60)  

P( -1.40 > z > 0.60) = 0.081 + 0.274

P( -1.40 > z > 0.60) =  0.355

Add a comment
Know the answer?
Add Answer to:
R studio #Exercise : Calculate the following probabilities : #1. Probability that a normal random variable...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT