Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE R CODE Initialize the city of Boston earnings dataset as shown below: boston

USE R CODE

Initialize the city of Boston earnings dataset as shown below:

boston <- read.csv( "https://people.bu.edu/kalathur/datasets/bostonCityEarnings.csv", colClasses = c("character", "character", "character", "integer", "character"))

Generate a subset of the dataset from Boston earnings dataset with only the top 5 departments based on the number of employees working in that department. The top 5 departments should be computed using R code. Then, use %in% operator to create the required subset.

Use a sample size of 50 for each of the following.

Set the start seed for random numbers as the last 4 digits of 1000

a) Show the sample drawn using simple random sampling without replacement.

Show the frequencies for the selected departments.

Show the percentages of these with respect to sample size.

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_2

Step: 3

blur-text-image_3

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

Essential Partial Differential Equations Analytical And Computational Aspects

Authors: David F Griffiths, John W Dold, David J Silvester

1st Edition

3319225693, 9783319225692

More Books

Students also viewed these Mathematics questions

Question

What is the biggest challenge facing the organization?

Answered: 1 week ago