Question

In: Statistics and Probability

I want to use R markdown to do the following questions and render a pdf for...

I want to use R markdown to do the following questions and render a pdf for all the answers!!!

Q1.

Suppose we toss 4 coins (each having heads probability = (1/2). Let X denote the random variable: (number of heads) - (number of tails).

(a) What is the range of X? (give exact upper and lower bounds along with a line of explanation)

(b) What is the probability mass function of

(c) What is the cumulative density function of X

Q2. Using R, simulate tossing 4 coins as above, and compute the random variable X defined in problem 1. Estimate the probability mass function you computed in part (b) of problem 1 by simulating 1000 times and averaging.

Solutions

Expert Solution

X = Number of heads - number of tails

If we toss 4 coins, then possible number of heads we can get : 0,1,2,3,4

Similarly, possible number of tails we can get : 0,1,2,3,4

Then the random variable can take the values :

-4,-2,0,2,4

(The values listed above are calculated in the following way:

if we get 4 tails and no heads, then X = 0-4 = -4 , if we get 3 tails and 1 head, X = 1-3 = -2 , 2 heads and 2 tails gives us X = 2- 2 =0 and so on)

Hence, upper bound of X is 4 (when we get 4 heads and no tails) and lower bound is -4 (when we get 4 tails and no heads)

Hence range of the random variable X is (Upper bound - Lower bound) = (4 - (-4) ) = 8

b)

X can take value -4 when all the outcomes are tail , and probability of this event is

= 0.0625

X can take value +4 when all the outcomes are head, probability of this event is

=0.0625 ( as we are considering an unbiased coin where probability of getting a head and probability of getting a tail is same and is 0.5)

Now , X can take value -2 when there are 3 tails and 1 head. Here we can consider a binomial distribution with n=4 and probability of success = 0.5 where success is considered as getting a head when a coin is flipped.

Hence, we know the pmf of a binomial distribution with n= 4 and p = 0.5 is

Hence for this event, our required probability is

= 0.25

where the random variable Y denotes the number of heads.

also,

random variable X takes the value 0 when we get 2 heads and 2 tail and probability of this event is

Again, random variable X takes the value 2 when there are 3 heads and 1 tail and probability of this event is

Hence, the probability distribution of the random variable X is given by

Cumulative Density Function of X


Related Solutions

i want R code for draw this density (pdf) Ailamujia poisson distribution Ailamujia logarithic distribution Ailamujia...
i want R code for draw this density (pdf) Ailamujia poisson distribution Ailamujia logarithic distribution Ailamujia Geometric distribution
When do I use: Geometric cdf Geometric pdf binomial cdf Binomial pdf Thank you
When do I use: Geometric cdf Geometric pdf binomial cdf Binomial pdf Thank you
Instructions: You are not required to use R markdown for the lab assignment. Please include ALL...
Instructions: You are not required to use R markdown for the lab assignment. Please include ALL R commands you used to reach your answers in a word or pdf document. Also, report everything you are asked to do so. Problem 3 : In lab lecture notes and demo code, I simulated random samples from Exp(1) to verify classical central limit theorem numerically. I also stressed that no matter what type of random samples you use, the standardized partial sum Sn...
Instructions: You are not required to use R markdown for the lab assignment. Please include ALL...
Instructions: You are not required to use R markdown for the lab assignment. Please include ALL R commands you used to reach your answers in a word or pdf document. Also, report everything you are asked to do so. Problem 1 : Consider a binomial random variable X ∼ Bin(100, 0.01). 1. Report P(X = 7), P(X = 8), P(X = 9), try to use one ONE R command to return all these three values. 2. Find the probability P(0...
I want a report on facility safety. Civil Engineering Department (PDF)
I want a report on facility safety. Civil Engineering Department (PDF)
What strategies and questions can i use if i want to interview a people in leadership...
What strategies and questions can i use if i want to interview a people in leadership roles in educational leadership? And how can i consider the strengths and weaknesses of the interview?
I am making google slide presentation and want to insert a pdf into it and cannot...
I am making google slide presentation and want to insert a pdf into it and cannot figure out how to do it
I have GIS class. I want to do project, and I need to use ARCmap to...
I have GIS class. I want to do project, and I need to use ARCmap to search population of homeless at Denver Colorado. Can you help me to explain how to find the Population of homeless? Please
I have questions on how to do this in R/Rstudio or smoothing methods. I have been...
I have questions on how to do this in R/Rstudio or smoothing methods. I have been struggling with using the codes. I have been practicing and tryign to do it, but I am really unsure at where I am with it. Just need something to compare it too! I don't understand why there isn't any information under the demand section! (1) A memo written to the Chief Operations Officer of Transantiago that describes the model and method and presents the...
Use the R script to answer the following questions: (write down your answers in the R...
Use the R script to answer the following questions: (write down your answers in the R script with ##) (1). Import FarmSize.csv to Rstudio. Use the correct function to build a linear regression model predicting the average size of a farm by the number of farms; Give the model a name (e.g. FarmSize_Model). Call the model name to inspect the intercept and slope of the regression model. Verify the answers in your manual calculation. (2). Use the correct function to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT