Question 1
##A. Use ?rivers to learn about the data.
?rivers
## starting httpd help server ... done
B. Find the mean and sd of the rivers data.
mean(rivers)
## [1] 591.1844
sd(rivers)
## [1] 493.8708
C. Make a histogram of the rivers data.
hist(rivers)

D. Get the five number summary of rivers data.
summary(rivers)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 135.0 310.0 425.0 591.2 680.0 3710.0
E. Find the longest and shortest river in the set.
The min and max functions show the minimum and maximum values of a given dataset.
min(rivers)
## [1] 135
max(rivers)
## [1] 3710
F. Make a list of all the lengths of the rivers longer than 1000 miles.
rivers[rivers > 1000]
## [1] 1459 1450 1243 2348 1171 3710 2315 2533 1306 1054 1270 1885 1100 1205 1038
## [16] 1770
Question 2
According to the data frame airquality , There are a total of 6 variables in the data frame. These variables are used to perform the analysis of the daily air quality.
The Names of the variables are as follows :-
- Ozone :- It is used for mean Ozone concentration .
- Solar R. :- It is used for Solar Radiation.
- Wind :- It is used for average wind speed.
- Temp :- It is used for maximum daily temperature.
- Month :- It is used for the Month of observation.
- Day :- It is used for the Day of month.
- The Type of data of each Variable is as follows :-
- Ozone :- The data type of Ozone variable is Numeric (int). It’s Unit is parts per billion.
- Solar R. :- The data type of Solar Radiation is Numeric (int).
- Wind :- The data type of Wind is Numeric (double). It’s Unit is miles per hour.
- Temp. :- The data type of Temperature is Numeric (int). It’s Unit is Fahrenheit.
- Month :- The data type of Month is Numeric (int).
- Day :- The data type of Day is Numeric (int).
- I think the data set and varables are reasonable
question 3
y<-.14
r<-.13
o<-.20
Br<-.12
g<-.20
B<-.21
PartA<-1-g
PartB<-r+o+y
Partc<-1-(1-B)^4
Partd<-r*o*Br*g*B*y