#1.) ?rivers
hist(rivers)
summary(rivers); data(rivers); long_rivers = rivers[rivers > 1000];
print(long_rivers);
#2.) ?airquality # a) 153 observations on 6 variables # b) nuemeric Ozone, numeric solar R, numeric wind, numeric temperature, numeric month, numeric day of month # c) quantitive data # d) I agree with some but not all. There should be a percentage of carbon dioxide and fossil fuels recorded for air quality.
#3.) yellow = 0.14; red = 0.13; orange = 0.2; brown = 0.12; green = 0.2; blue = 0.21;
p_not_green = 1-green; p_red_orange_yellow = red + orange + yellow; out_of_four = 1-blue^4; all_six = 6!/(6^6);
#4.) # a) n = 7 k = 3 p = 0.5 probability = dbinom(k, n, p); print(probability);
#5.) # a) value = c(0, 1, 2, 3); probabilities = c(1/4, 1/2, 1/8, 1/8); sample_size = 10000 sample_X = sample(values, sample_size, replace = TRUE, prob = probabilities) estimate = sum(sample_x == 1) / sample_size; print(estimate);
table_X = table(sample_x); pmf_estimate = table(sample_x); pmf_estimate = table_x / sample_size; print(pmf_estimate);