- The elements in the data set are food items of various sizes, ranging from a
teaspoon of cinnamon to an entire carrot cake.
a. Sort the data set by the saturated fat (saturated_fat) and produce a listing of
the five food items highest in saturated fat.
b. Comment on the validity of comparing food items of different sizes. - Derive a new variable, saturated_fat_per_gram, by dividing the amount of
saturated fat by the weight in grams.
a. Sort the data set by saturated_fat_per_gram and produce a listing of the
five food items highest in saturated fat per gram.
b. Which food has the most saturated fat per gram? - Derive a new variable, cholesterol_per_gram.
a. Sort the data set by cholesterol_per_gram and produce a listing of the five
food items highest in cholesterol fat per gram.
b. Which food has the most cholesterol fat per gram?
Validity of comparing food items of different sizes.
Full Answer Section
- Saturated Fat per Gram Calculation
- Dividing saturated_fat by weight in grams will provide a more accurate picture of saturated fat concentration. Sort the data set by saturated_fat_per_gram to identify the top 5 items.
- This analysis will reveal the food items with the highest concentration of saturated fat per gram, regardless of their overall size.
- Cholesterol per Gram Calculation
- Similar to saturated fat, calculate cholesterol_per_gram by dividing cholesterol content by weight in grams. Sort the data set by this new variable to find the top 5 items.
- This analysis will identify the food items with the highest concentration of cholesterol per gram.
Sample Answer
Analyzing Food Data Set
1. Saturated Fat Comparison by Weight
a. Sorting by saturated_fat
wouldn't necessarily reflect which foods have the most saturated fat per gram. A large carrot cake with high total saturated fat might rank higher than a smaller steak with a lower total fat content but a higher concentration per gram.
b. It's not valid to compare saturated fat content directly for items with different weights. This approach doesn't account for portion size.