## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6 ✔ purrr 0.3.4
## ✔ tibble 3.1.8 ✔ dplyr 1.0.10
## ✔ tidyr 1.2.0 ✔ stringr 1.4.1
## ✔ readr 2.1.2 ✔ forcats 0.5.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## Loading required package: airports
##
## Loading required package: cherryblossom
##
## Loading required package: usdata
## Warning in data("fastfood", package + "openintro"): data set 'package +
## "openintro"' not found
## # A tibble: 6 × 17
## restaur…¹ item calor…² cal_fat total…³ sat_fat trans…⁴ chole…⁵ sodium total…⁶
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Mcdonalds Arti… 380 60 7 2 0 95 1110 44
## 2 Mcdonalds Sing… 840 410 45 17 1.5 130 1580 62
## 3 Mcdonalds Doub… 1130 600 67 27 3 220 1920 63
## 4 Mcdonalds Gril… 750 280 31 10 0.5 155 1940 62
## 5 Mcdonalds Cris… 920 410 45 12 0.5 120 1980 81
## 6 Mcdonalds Big … 540 250 28 10 1 80 950 46
## # … with 7 more variables: fiber <dbl>, sugar <dbl>, protein <dbl>,
## # vit_a <dbl>, vit_c <dbl>, calcium <dbl>, salad <chr>, and abbreviated
## # variable names ¹restaurant, ²calories, ³total_fat, ⁴trans_fat,
## # ⁵cholesterol, ⁶total_carb
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Based on the plots, the center for mcdonalds seems to be skewed to the right. Because of this I dont think we can call this a normal distribution.
based on the plot, the curves seems to have close to a normal distribution.
All the points deviate from the diagonal slightly. It is very similar to the plot of the real data as it has some major deviations at the top of the curve.
The normal probability plot for the calories look very similar to the simulated normal data with the same type of deviations towards the top and bottom of the graph. I think we can conclude that the plots prove that the evidence is nearly normal.
The calories from the Mcdonalds menu do not appear to come from a normal
distribution as it deviates too far from the diagonal.
The two questions I asked were would be the probability that a McDonalds item have more more than 300 calories and the probability that I will get more than one gram of trans fat in an item in Dairy Queen.
## [1] 0.7963677
## # A tibble: 1 × 1
## percent
## <dbl>
## 1 0.842
## [1] 0.3263255
## # A tibble: 1 × 1
## percent
## <dbl>
## 1 0.143
The calories in Mcdonalds greater had a closer agreement in method.
The distribution from Dairy Queen seems to be closer to the normal for sodium.
The most “normal” distributions seem to be either from Burger King or Arby’s.
Some of the items may have the same sodium amount.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Based on the plots,, the data seems to be skewed slightly to the right which is confirmed by the histogram.