Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

4 The Macabre R has lots of built in data. For example: data (USAccDeaths) USAcc

ID: 3044947 • Letter: 4

Question

4 The Macabre R has lots of built in data. For example: data (USAccDeaths) USAccDeaths yields counts of accidental deaths for several years in the U.S. Using what you know about marginal and conditional distributions, comment on whether any month or year appears to be more accidentally deadly. Support your answer with the data The data data (USArrests) USArrests gives USArrests for 1973, by state and state.X77 gives state data, by state. Use these to point out some (any) interesting state-wise patterns

Explanation / Answer

The marginal distribution of a subset of a collection of random variables is the probability distribution of the variables contained in the subset. It gives the probabilities of various values of the variables in the subset without reference to the values of the other variables.

A conditional distribution is a probability distribution for a sub-population. In other words, it shows the probability that a randomly selected item in a sub-population has a characteristic you’re interested in.

In R for given data( USAccDeaths) we want to count accidental deaths for several years.

for this

x<- data(USAccDeaths)

sum(x$year) #for particular year count

for next data

y<- data(USArrests)

x$year #for the year 1973

now you can find the statistical measure by using function mean(), var()

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote