Beauchamp Section #008 Week 7

.docx

School

Southern Illinois University, Edwardsville *

*We aren’t endorsed by this school

Course

107

Subject

Industrial Engineering

Date

Oct 30, 2023

Type

docx

Pages

4

Uploaded by AdmiralExploration11576

Report
Laboratory Exercise Week 7 Emma Beauchamp Section #008 10/05/2023 Directions : Write your R code inside the code chunks after each question. Write your answer comments after the # sign. To generate the word document output, click the button Knit and wait for the word document to appear. RStudio will prompt you (only once) to install the knitr package. Submit your completed laboratory exercise using Blackboard’s Turnitin feature. Your Turnitin upload link is found on your Blackboard Course shell under the Laboratory folder. For this exercise, you will need to use the package mosaic to find numerical and graphical summaries. # install package if necessary if ( ! require (mosaic)) install.packages ( ` mosaic ` ) # load the package in R library (mosaic) # load the package mosaic to use its functions 1. Consider the population of CEO salaries in the lesson this week. i) Select a random sample of 40 CEO’s and compute the sample mean salary and sample standard deviation salary. ii) Use the do() function to compute the sample mean of 100 randomly selected samples. Plot the histogram of these 100 sample means. iii) Compute the average and standard deviation of these 100 sample means. Are the values what you expect from the properties of the sampling distribution. Code chunk # start your code ceo_salary <- read.csv ( "https://www.siue.edu/~jpailde/CEO_Salary_2012.csv" ) # i head (ceo_salary) ## Rank Name Company Annual.pay Age ## 1 1 John H Hammergren McKesson 131.190 53 ## 2 2 Ralph Lauren Ralph Lauren 66.650 72
## 3 3 Michael D Fascitelli Vornado Realty 64.405 55 ## 4 4 Richard D Kinder Kinder Morgan 60.940 67 ## 5 5 David M Cote Honeywell 55.790 59 ## 6 6 George Paz Express Scripts 51.525 57 samp1 <- sample_n (ceo_salary, size = 40 , replace = F) mean.salary <- mean ( ~ Annual.pay, data = samp1) sd.salary <- sd ( ~ Annual.pay, data = samp1) # ii simulated.means <- do ( 100 ) * mean ( ~ Annual.pay, data = sample_n (ceo_salary, size = 40 )) head (simulated.means) ## mean ## 1 8.79490 ## 2 12.36057 ## 3 10.38793 ## 4 10.21055 ## 5 9.62955 ## 6 11.14570 histogram ( ~ mean, data = simulated.means, main = "Sample Mean Salary Distribution" , xlab = "Sample Mean Salary ($Mil) of 40 CEO's" )
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help

Browse Popular Homework Q&A

Q: The following table gives the weeks of gestation and corresponding birth weights for a sample of 5…
Q: A continuous and aligned fiber-reinforced composite is to be produced consisting of 33 vol% aramid…
Q: wing expenses were incurred by a merchandising business during the year. In which expense section of…
Q: Be sure to specify states such as (aq) or (s). If a box is not needed leave it blank. If no reaction…
Q: Ages Number of students 15-18 4 19-22 5 23-26 10 27-30 5 31-34 10 35-38 5 Find the relative…
Q: 7. Find the area of the region bounded by the graph of y= 2x-3x+2, the x-axis, and the vertical…
Q: Describe how the theories and work of the following people (Piaget, Gardner and Vygotsky) have…
Q: Write the quadratic function in the form y=a(x−h)^2+k and sketch its graph.   y=x^2−4x y=.......…
Q: 3. ( for ) Find the power series representation f(x) = Σen(x - a)" n=0 f(x) = = 1 about x=a=0. Also…
Q: Using 1% & 5% alphas, test the overall significance of the model on excel
Q: PR 4-1A Financial statements and closing Lamp Light Company maintains and repairs warning ligh radio…
Q: Provide an IUPAC name for the structure.
Q: For a certain drilling machine of the Putnam Manufacturing Company, control limits for an x−Chart…
Q: Find parametric equations representing the line segment joining P(-3, 2) to Q(2, -1) as (x(t),…
Q: this data, consider the equation of the regression line, y = bo + bix, for predicting the overall…
Q: The federal government changes its bank regulations in a way that makes it cheaper and easier for…
Q: The shaded region in D = 4 cos and lies inside the polar curve r outside the polar curve r = cos 0.…
Q: 5. Create a list letters, that contains all lowercase letters from a to e. a) Print the list. b)…
Q: Hermann Ebbinghaus (1850–1909) pioneered the study of memory. A 2011 article in the Journal of…
Q: 1000 grams of steel containing 1.5 weight percent carbon is heated to complete melting. After…
Q: J 10x + 14 50° 36° M What is the value of X?
Q: In order to start a small business, a student takes out a simple interest loan for $7000.00 for 6…