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

The article cited in Exercise 11 also gave the following values of the variables

ID: 3052813 • Letter: T

Question

The article cited in Exercise 11 also gave the following values of the variables y = number of culs-de-sac and z = number of intersections:

(y): 1, 0, 1, 0, 0, 2, 0, 1, 1, 1, 2, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2, 0, 1, 2, 2, 1, 1, 0, 2, 1, 1, 0, 1, 5, 0, 3, 0, 1, 1, 0, 0

(z): 1, 8, 6, 1, 1, 5, 3, 0, 0, 4, 4, 0, 0, 1, 2, 1, 4, 0, 4, 0, 3, 0, 1, 1, 0, 1, 3, 2, 4, 6, 6, 0, 1, 1, 8, 3, 3, 5, 0, 5, 2, 3, 1, 0, 0, 0, 3

Construct a histogram for the y data. What proportion of these subdivisions had no culs-de-sac? At least one cul-de-sac?

Construct a histogram for the z data. What proportion of these subdivisions had at most five intersections? Fewer than five intersections?

My question is that How to R programming and show me the code

This is the important link for the answer

https://www.chegg.com/homework-help/article-cited-exercise-20-also-gave-following-values-variabl-chapter-1-problem-21e-solution-9780538733526-exc

Explanation / Answer

The R code, along with comment lines, is given below. The comment lines start with # symbol and have been provided for your understanding of the R code.

# INPUTTING THE DATA
y = c(1, 0, 1, 0, 0, 2, 0, 1, 1, 1, 2, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2, 0, 1, 2, 2, 1, 1, 0, 2, 1, 1, 0, 1, 5, 0, 3, 0, 1, 1, 0, 0)
z = c(1, 8, 6, 1, 1, 5, 3, 0, 0, 4, 4, 0, 0, 1, 2, 1, 4, 0, 4, 0, 3, 0, 1, 1, 0, 1, 3, 2, 4, 6, 6, 0, 1, 1, 8, 3, 3, 5, 0, 5, 2, 3, 1, 0, 0, 0, 3)

# HISTOGRAM FOR "Y" DATA
hist(y)

# PROPORTION OF THE SUBDIVISIONS THAT HAD NO CULS-DE-SAC
length(y[y == 0])/length(y)
# PROPORTION OF THE SUBDIVISIONS THAT HAD AT LEAST 1 CULS-DE-SAC
length(y[y >= 1])/length(y)

# HISTOGRAM FOR "Z" DATA
hist(z)

# PROPORTION OF THE SUBDIVISIONS THAT HAD AT MOST 5 INTERSECTIONS
length(z[z <= 5])/length(z)
# PROPORTION OF THE SUBDIVISIONS THAT HAD FEWER THAN 5 INTERSECTIONS
length(z[z < 5])/length(z)

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