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

  A binomial process has a probability of success of 015 if

a binomial process has a probability of success of 0.15. if eight trials are run what are the mean number of successes

  The mean number of cigarettes smoked per day for the 298

researchers are testing the effectiveness of a new smoking cessation program. at the close of the program the mean

  Statistics and death penalty

In November 2009, 65% (0.65) of Americans favored the death penalty for a person convicted of murder. In November 2010, 1025 adult Americans were asked by the Gallup organization,

  Conclude that mean of four sample mean will be equal

x you then repeat this procedure three more times. you learned in class that u_x = u can you conclude that the mean of the four sample mean will be equal to the population mean, 65? why or why not?

  Two-tailed hypothesis testing at significance level

In a two-tailed hypothesis testing at significance level α of 0.05, the test statistic is calculated as 2. If P(X >2) = 0.03, then we have sufficient evidence to reject the null hypothesis.

  A sample of 40 women is obtained and their heights in

a sample of 40 women is obtained and their heights in inches and pulse rates in beats per minute are measured. the

  To address this question the professor gathers information

a professor is interested in determining if attending college influences the level at which an individual cooperates

  Find the median for the given sample data.

Find the mean for the given sample data. Unless otherwise specified, round your answer to one more decimal place than that used for the observations.

  Create an erd based on the crows foot model

Show the dependency diagram for each of the normal forms. Do not go beyond the 3rd normal form - Show the dependency diagram for each of the normal forms. Do not go beyond the 3rd normal form.

  Computing probability of high blood pressure

Of 1338 people who came into a blood bank to give blood, 253 people had high blood pressure. Estimate the probability that the next person who comes in to give blood will have high blood pressure.

  Determining confidence interval for mean growth rate

Bougainvilleas, mean growth rate was 2.23 inches/week and sample standard deviation was 0.77 inches/week. Determine a 90% confidence interval for mean growth rate of all Bougainvilleas.

  Practical uses of regression analysis

Can you think of an example where regression analysis can be used? How is regression analysis being used in a retail environment, or how should it be used?

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