Please Indicate

  • Who you collaborated with. If no one, please indicate so:
  • Approximately how much time did you spend on this problem set:
  • What, if anything, gave you the most trouble:

Tips

  • Knit this file once first to read the questions.
  • Remember, pictures are worth a thousand words. Your responses should be a combination of written analysis/interpretation and graphics.
  • You will need to use Google a little to learn some background and for investigations, as any good data scientist would.
  • I can’t emphasize this enough: Look at and explore your data with the View() command and
    • play with the Filter button
    • sort each variable in increasing and decreasing order by clicking the arrow next to the variable name
  • The above was a mantra on my analyst team at Google: Always stay close to your data.

Question 1: Bitcoin and Gold

Imagine you are working for a foreign exchange company. You are presented with a data set currencies (which is loaded in the code block) below, which consists of data on two forms of tradable currency: bitcoin and gold. Give these pages a read:

a)

Your boss wants to know: “You took Intro to Statistical and Data Sciences right? Give me an executive summary of trends in these two forms of currency.”

# Write your code below:
summary(bitcoin$price)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   13.29  136.40  271.50  330.00  455.60 1132.00
summary(gold$price)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    1051    1190    1254    1278    1322    1692
ggplot(data=currencies, aes(x=date, y=price, color=type)) + 
geom_line()

Gold has been declining from around 1700 down to around 1100 in the past three years. For bitcoin the Lowest price was 13.29 on January 2, 2013 and the highest price was 1132.26 on Novermber 29, 2013. For Gold the highest price was 1692.5 on Jan 22, 2013 and the lowest proce was 1050.5 on December 3, 2015

b)

Your boss wants to know: “So we got an investor who has no stomach for volatility in currency prices; they like a nice stable currency to park their money in and not worry about it. What should they invest in?”

# Write your code below:
ggplot(data=currencies, aes(x=date, y=percent_diff, color=type)) + 
geom_line()
## Warning: Removed 2 rows containing missing values (geom_path).

Gold is definetly the less Volatile of the two currencies by far. Their highest precent difference was only 4.9 percent, while bitcoins’ was 29.76 percent. It would be safer to invest in gold since there is less likely of a chance of a large pricedrop.

c)

Your boss wants to know: “What day did bitcoin lose the most value in one day? What was a possible cause?”

Bitcoin lost the most value on Decemeber 6, 2013. This might have been related to the fact that it had recently reached its all time high on November 29 and it depends on the fact that it must a reliable, useful and a competitive method of payment. However, it seems that a warning from the Chinese Central Bank might have scared them and lowered their confidence on whether or not it should be reliable..therefore lowering their price

Question 2: Cheese and Milk Production

Imagine you are working for the US Department of Agriculture. You want to compare milk and cheese production in the United States since 1925 using the following data:

a)

Between cheese and milk, relatively speaking, which agricultural good has seen the bigger overall increases in production?

# Write your code below:
ggplot(data=food, aes(x=date, y=value, color=type)) + 
 geom_line()

Milk seems to have a greater increase in producion