Explore airquality dataset available in the datasets library

Assignment Help Basic Statistics
Reference no: EM131146250

This assignment questions 1 - 4 make use of data that is provided by the ISwR package.

library(ISwR)

## Warning: package 'ISwR' was built under R version 3.2.5

Sample Question and Solution
Use seq() to create the vector (1, 2, 3, . . . , 10).

seq(1,10)

## [1] 1 2 3 4 5 6 7 8 9 10

Question 1

In this question you will explore the airquality dataset available in the datasets library in the ISwR package. a)Display the first 6 rows of the airquality dataset.

#Insert your code here.

b) Display the type of each column of the airquality dataset, use only one function in R to do so.

#Insert your code here.

c) Use a histogram to assess the normality of the Ozone variable.(In order to get the output diagram inserted in your answer use attach(dataframe name))

#Insert your code here.

d) Does it appear normally distributed?

e) Create a boxplot which shows the distribution of Ozone in each month.Use different colors for each month.

#Insert your code here.

f) Create one scatter plot matrix of the numeric variable(Ozone, Solar.R,Wind,Temp) within the airquality dataset. (Hint investigate pairs())

#Insert your code here

Question 2

a) Use simulation to estimate the mean and variance of a binomial random variable with n = 18 and p = 0.76.

#Insert your code here

b) Calculate the values using the theroy (state the value and the equation in your answer),compare the values you get with the values you got in (a), wirte one sentence sumurizing the comparision.

#Insert your answer here (Do not remove the #)

Question 3

a) Estimate the mean and variance of a Poisson random variable whose mean is 7.2 y simulating 10,000 Poisson random numbers.

#Insert your code here

b) Compare the mean value you got in (a),with the one stated in the question. wirte one sentence summarizing the comparision.

Question 4

Simulate 100 realizations of a normal random varialbe having a mean of 51 and a standard deviation of 5.2.

#Insert your code here

Question 5

This question makes use of pakcage "RCurl", accordingly carry out the following:

## Loading required package: bitops

First we read the computers.csv file and load the price using the following:

a) Display the first 6 rows of cprices and make note of all the variables.

#Insert your code here

b) Calculate the mean,variance and standard diviation of price by omitting the missing values, if any.

#Insert your code here

c) Use ram to predict price and build a univariate linear regression model, display a summary of your model indicating Residuals, Coefficients..etc.

#Insert your code here

d) Based on the output of your model, predicted the expected price when ram is set to 8 MB

#Insert your answer here

e) Find Pearson correlation between hard disk and speed.

#Insert your code here

f) Write the correlation matrix of the variables:price,speed,hd and ram.

Bonus Question

Π appears in the formula for the standard normal distribution, the most important probability distribution in statistics. Why not give it a try to calculate π using statistics! In fact, you'll use a simulation technique called the Monte Carlo Method.

Recall that the area of a circle of radius r is A = πr2. Therefore the area of a circle of radius 1, aka a unit circle, is π. You'll compute an approximation to the area of this circle using the Monte Carlo Method.

a) The Monte Carlo Method uses random numbers to simulate some process. Here the process is throwing darts at a square. Assume the darts are uniformly distributed over the square. Imagine a unit circle enclosed by a square whose sides are of length 2. Set an R variable area.square to be the area of a square whose sides are of length 2.

b) The points of the square can be given x-y coordinates. Let both x and y range from -1 to +1 so that the square is centred on the origin of the coordinate system. Throw some darts at the square by generating random numeric vectors x and y, each of length N = 10,000. Set R variables x and y each to be uniformly distributed random numbers in the range -1 to +1. (hint: runif() generates random number for the uniform distribution)

c) Now count how many darts landed inside the unit circle. Recall that a point is inside the unit circle when x2 + y2 < 1. Save the result of sucessfull hits in a variable named hit. (hint: a for loop over the length of x and y is one option to reach hit)

d) The probability that a dart hits inside the circle is proportional to the ratio of the area of the circle to the area of the square. Use this fact to calculate an approximation to Π and print the result.

Verified Expert

This task provides a clear working example of discrete and continuous distributions using R codes. The probability that a dart hits inside the circle is proportional to the ratio of the area of the circle to the area of the square. Use this fact to calculate an approximation to ? and print the result

Reference no: EM131146250

Questions Cloud

Theories of international trade : Name 2 theories of international trade which claim that the government has an important role to play in international trade. Explain the role of the government in these theories. Why do we need the government to play this role?
Design a solid steel shaft supported in bearings : The length of the shaft is to be made equal to at least 30 times its diameter.
Brief synopsis of a study proposal''s hypothesis : Brief background information description of what areas of interest related to your proposal topic have been previously researched and what has been learned by those studies, Significance of knowledge to the field.
What can you learn from financial statements of competitors : What can you learn from the financial statements of competitors that determine the relative cost position of your company? What are some of the ways in which you can secure a sustainable cost advantage over the competition?
Explore airquality dataset available in the datasets library : Explore the airquality dataset available in the datasets library in the ISwR package. a)Display the first 6 rows of the airquality dataset - Create a boxplot which shows the distribution of Ozone in each month.Use different colors for each month.
Find the hidden premises and complex arguments : find the hidden premises and complex arguments.- Having great wealth is a worthy goal because it is difficult to attain and many famous people have pursued it.
Explore a certain topic in criminology and criminal justice : This will be an original scholarly paper on a specific topic that strongly interests you-one that you have studied extensively. By now, you should have taken several courses allowing you to explore a certain topic in criminology and criminal justi..
Determine weekly production plan for kelly industries : MANUFACTURING. Kelly Industries manufactures two different structural support products used in the construction of large boats and ships. Determine a weekly production plan for Kelly Industries. What interpretation can you give to the fractional valu..
Develop trust in communicating corporate ethics : Using the module readings, the Argosy University online library resources, and the Internet, research ways of developing trust. Explain how leaders and managers can overcome obstacles and develop trust in communicating corporate ethics.

Reviews

inf1146250

4/25/2018 5:46:26 AM

Thanks, this is the third paper that I have got done from expertsmind and like the first two asignments it is also same good quality. It is really wonderful job so thanks to the expert who did it. I just cant say enough about the work and explanation he did on my query. I am really thankful. Thank you so much, I will let you for my upcoming assignments soon. This is really helpful service for me.

Write a Review

Basic Statistics Questions & Answers

  You are given the accompanying response data on

you are given the accompanying response data on concentration of a chemical as a function of time. the six sets of

  State a hypothesis

State a hypothesis.

  Strength of the correlation coefficient

Pick any two variables that you feel may be related and estimate what you think the strength of the correlation coefficient would be for those two variables

  If you follow blumans advice and place the larger variance

an investor wants to compare the risks associated with two different stocks. one way to measure the risk of a given

  Transportation model using minimization method

The Martin Company is in the process of planning for new production facilities and developing a more efficient distribution system design. At present, it has one plant at St.Louis with a capacity of 30000 units.

  Correlation between hours spent in the course

The correlation between hours spent in the course and exam grades is .8. what percent f variation in exam grades can be explained by hours spent in the course?

  Confidence interval for the population proportion

In a survey of 474 US women, 365 said that the media has a negative effect on women's health because they set unattainable standards for appearance. Find a point estimate for p. Construct a 95% confidence interval for the population proportion p.

  The coach assemble if position within the subgroup

A hockey club has 7 forwards, 5 defensemen, and 3 goalies. Each can play only in his designated subgroup. A coach chooses a team of 3 forwards, 2 defense, and 1 goalie.

  Do students who do not plan to apply for financial aid have

a researcher wanted to know if students who do not plan to apply for financial aid had more variability in sat math

  Is there sufficient evidence to indicate that the mean

the weights of a fish in a certain pond that is regularly stocked are considered to be normally distributed with a mean

  Expect losses on nearly all such patients to fall

Natural tolerances. Table 27.6 (page 27-31) gives data on hospital losses for samples of DRG 209 patients. The distribution of losses has been stable over time. What are the natural tolerances within which you expect losses on nearly all such pati..

  Making decision using significance level

Below is the number of new cars sold at Sharkey in the last seven months and for the last eight months at Dave White. Do you agree with Mr. Sharkey? Use the .01 significance level."

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd