R代写:STAT311_homework4

This assignment does not use any data sets but will include a few parts of problems where you will
copy/paste R code with answers. Parts of a few problems are modified from McClave and Sincich,
Statistics , Ninth Edition and from Mendenhall, Beaver and Beaver, Introduction to Probability and
Statistics
, 13th Edition.

  • You may handwrite or type up this assignment and submit as a pdf file. Do not use rmarkdown for
    this assignment.
  • If you handwrite your assignment, you can write down your R code with the answers in the few places
    where you are to show your R code.
  • Be sure to show work as needed. If you simply put down a numeric answer it will be marked wrong,
    even if the number is correct.
  • All requested interpretations should be in complete sentences.
  • Round all probabilities to four decimal points if reporting as a decimal value. Okay to report fractions.
  1. A fair six-sided die is tossed, and the up face is noted. If the number is ≤ 2 the die is tossed again; if
    the number is > 2 , an unfair coin with 𝑃𝑃(𝐻𝐻)= 0 .3 is tossed. Define the events:
    𝐴𝐴: {A tail appears on the coin} and 𝐵𝐵: {The die is tossed only one time}
    a) List the sample points in the sample space [Hint: there are 20 sample points].
    b) Give the probability for each of the sample points.
    c) Find _P_ ( _A_ ) and _P_ ( _B_ ).
    d) Identify the sample points in _Ac_ , _Bc_ , 𝐴𝐴 ∩𝐵𝐵, and 𝐴𝐴 ∪𝐵𝐵.
    e) Find _P_ ( _Ac_ ), _P_ ( _Bc_ ), 𝑃𝑃(𝐴𝐴∩𝐵𝐵), 𝑃𝑃(𝐴𝐴∪𝐵𝐵), _P_ ( _A_ | _B_ ), and _P_ ( _B_ | _A_ ).
    f) Are _A_ and _B_ mutually exclusive events? Why?
    g) Are the events _A_ and _B_ independent? Justify your answer using an equation.
  2. A balanced six-sided die is thrown once. If a 2, 3, or 4 appears, a ball is drawn from urn 1; otherwise,
    a ball is drawn from urn 2. Urn 1 contains 18 red and 10 white balls. Urn 2 contains 15 red, 4 white,
    and 6 black balls.
    a) Find the probability that a white ball is drawn.
    b) Find the probability that urn 1 was used given that a white ball was drawn.
  3. Eighty-three percent of all women who submit to pregnancy tests are pregnant. A new pregnancy test
    gives a false positive result with probability 0.03 and a correct positive result with probability 0.98.
    Define the events: _P_ : {a woman is pregnant} and _+_ : {the pregnancy test is positive}.
    a) What is the sensitivity of this test? Explain in layperson terms what this means.
    b) What is the specificity of this test? Explain in layperson terms what this means.
    c) What is the false negative rate (FNR) for this test? Explain in layperson terms what this means.
1
2
3
4
d) What is the unconditional probability that this test produces a positive result? Explain in layperson
terms what this means.
e) For a randomly chosen woman who receives a positive result using this test, what is the probability
that she is not pregnant? Interpret this result.
  1. Bicycle accidents in Seattle are on the rise. City officials estimate that a busy right hand turn from a
    bike lane onto a busy arterial in the Roosevelt neighborhood has 0.7 bicycle accidents per week. Let
    𝑋𝑋 be the number of bicycle accidents that occur at this intersection over the next eight weeks.
    a) What probability distribution can you use to model 𝑋𝑋?
    b) Calculate the probability that are between two and four bicycle accidents, inclusive, occur at this
    intersection in the next eight weeks. Write out the equation you need with numbers substituted but
    solve using R. Copy/paste or write your R code here, with the answer.
    
  2. During a tight job market, recruiters have noticed that graduating seniors with an intermediate
    proficiency in a second language have a higher probability of getting a first interview following a
    screening call when seeking their first job out of college. For students with one language, the
    probability of getting a first interview following a screening call is 0.3, whereas for graduating seniors
    with a second language the probability is 0.45. Let 𝑋𝑋 be the number of screening calls a graduating
    senior with an intermediate proficiency in a second language must take up to and including getting
    their first interview.
    a) Name a probability distribution that you could use to find probabilities of _X_. Do not forget to
    include values of any parameters.
    
    b) On average, how many screening calls must a graduating senior with an intermediate proficiency
    in a second language go through before getting their first interview?
    
    c) What is the exact probability that a graduating senior with an intermediate proficiency in a second
    language must have at least five screening calls up to get their first interview? Write down the
    formula you would use with numbers substituted but use R to calculate the answer. Copy and paste
    your R code here with the answer from R.
    
  3. A psychiatrist believes that 55% of all people who visit doctors have problems that are of a
    psychosomatic nature. She selects 25 patients at random to test her theory. Let _X_ be the number of
    patients with psychosomatic problems out of the 25 patients.
    a) What is the sample space for 𝑋𝑋?
    b) What probability distribution can you use to model 𝑋𝑋? Make sure to name the distribution and
    the values of any parameters.
    
    c) Assuming the psychiatrist’s theory is true, what is the expected value of _X_ , the number of the 25
    patients who have psychosomatic problems?
    
    d) What is the standard deviation of _X_ , assuming the theory is true?
    e) What is the exact probability that 𝑋𝑋 ≤ 4 in any given case? Write down the formula you would
    use with numbers substituted but use R to calculate the answer. Copy and paste your R code here
    with the answer.
    
  1. A growing number of students seeking a teaching credential are choosing paid internships over
    traditional student teaching assignments. A group of 12 candidates for four local teaching positions
    consisted of seven candidates who had enrolled in paid internships and five who had enrolled in
    traditional student teaching positions. We will assume that all 12 candidates are equally qualified for
    the four open positions. Let 𝑋𝑋 be the number of internship-trained candidates that get hired for these
    four open positions.
    a) Name a probability distribution that you could use to find probabilities of _X_. Do not forget to
    include values of any parameters.
    
    b) What is the probability that three internship trained candidates are hired for the four positions.
    Write out the equation you need with numbers substituted but solve using R. Copy/paste your R
    code here, with the answer from R.
    
    c) What is the probability at least two of the internship-trained candidates are hired for the four
    positions. Write out the equation you need with numbers substituted but solve using R. Copy/paste
    your R code here, with the answer from R.