+1-415-670-9189
info@expertsmind.com
Explore airquality dataset available in the datasets library
Course:- Basic Statistics
Reference No.:- EM131146250




Assignment Help
Expertsmind Rated 4.9 / 5 based on 47215 reviews.
Review Site
Assignment Help >> Basic Statistics

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.

Answered:-

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



Put your comment
 
View Conversion
Minimize
  1. user image
    inf1146250

    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.



Ask Question & Get Answers from Experts
Browse some more (Basic Statistics) Materials
In a class roster of 18 students, what are the chances that there are at least 2 people with the same birthday (same day, not same year)?
The fill volume of cans produced by a certain machine is normally distributed with mean 12 oz and standard deviation .03 oz. [4] a. What proportion of cans contain less than
A single observation of a random variable having a uniform density with α = 0 is used to test the null hypothesis β = β0 against the alternative hypothesis β = β0 + 2.
Carry out an appropriate text at a 5% level of significance to test george and Jerry's theory. Interpret the p-value you calculated in part A. Construct and interpret a 92% co
A local Real Estate agent was compiling an overview of the Rental Market in his Suburb, to determine the profile of the length of rental contracts. In order to determine thi
Assume the branch manager requested estimates of the mean selling price of Gulf View condominiums with a margin of error of $40,000 and the mean selling price of No Gulf Vie
The snow tire company wants to advertise 10% of their snow tires last longer than 45,000 miles.  If the standard deviation remains at 2500 miles, what must the mean life-spa
Students in the industrial statistics lab at ASU calculate a lot of confidence intervals on mu. Suppose all these CIs are independent of each other.