Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use R 3. Comparing two proportions The following table gives the records of accidents in 1998 compiled by the Department of Highway Safety and Motor

use R image text in transcribed
3. Comparing two proportions The following table gives the records of accidents in 1998 compiled by the Department of Highway Safety and Motor Vehicles in Florida. Injury Safety Equipment in Use Fatal Nonfatal None 1601 162,527 Seat belt 510 412,368 Denote the number of accidents and fatalities when no safety equipment was in use by n n and yn, respectively. Similarly, let ns and ys denote the number of accidents and fatalities when a seat belt was in use. Assume that yn and ys are independent with yn distributed as binomial nn,PN) and ys distributed as binomialns, ps). Assume a uniform prior is placed on the vector of probabilities (Pn,ps). a) Show that pn and ps have independent beta posterior distributions. b) Use the function rbeta to simulate 1000 values from the joint posterior distribution of (PN, Ps). c) Using your sample, construct a histogram of the relative risk pn/ps. Find a 95% interval estimate of this relative risk. d) Construct a histogram of the difference in risks PN - Ps. 4.8 Exercises 83 e) Compute the posterior probability that the difference in risks exceeds 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

What should be included in the introduction to a formal report?

Answered: 1 week ago