Question

In: Statistics and Probability

Consider the following Data: Year Tea (L per person) Coffee (L per person) 1994 42.4 95.85...

Consider the following Data:

Year

Tea
(L per person)

Coffee
(L per person)

1994

42.4

95.85

1995

42.12

97.28

1996

47.61

87.62

1997

60.86

92.04

1998

55.58

99.21

1999

50.61

95.63

2000

49.89

97.42

2001

56.77

93.93

2002

62.53

95.67

2003

68.31

99.25

2004

69.88

101.31

2005

72.99

101.68

2006

71.36

104.02

2007

90.78

106.09

2008

74.7

105.8

2009

67.15

102.15

2010

67.03

101.15

2011

87.83

104.05

2012

93.4

102.7

2013

78.9

105.28

2014

111.32

106.3

2015

98.39

104.96

2016

105.25

103.57

  1. Calculate measures of central tendency and spread for coffee and tea.
  2. Create Histograms and Box-Plots for both coffee and tea, displaying the number of years in each interval of consumption in L/person.
  3. Create scatter plots for Coffee vs. Year and Tea vs. Year and Coffee vs. Tea.  
  4. Create and record the lines of best fit for each and the correlation coefficient.

Solutions

Expert Solution

Here I attach the R code with output

tea=c(42.4,42.12,47.61,60.86,55.58,50.61,49.89,56.77,62.53,68.31,69.88,72.99,71.36,90.78,74.7,67.15,67.03,87.83,93.4,78.9,111.32,98.39,105.25)
coffee=c(95.85,97.28,87.62,92.04,99.21,95.63,97.42,93.93,95.67,99.27,101.31,101.68,104.02,106.09,105.8,102.15,101.15,104.05,102.7,105.28,106.3,104.96,103.57)

year=c(1994:2016)  
mean(tea)
median(tea)
mfv1(tea)
range(tea)
mean(coffee)
median(coffee)
mfv1(coffee)
range(coffee)
hist(coffee)
hist(tea)
boxplot(coffee)
boxplot(tea)
plot(coffee,tea)

plot(year,coffee)
plot(year,tea)

m=lm(coffee~tea)
summary(m)
cor(coffee,tea)

The measure of central tendency are mean, median , mode(mfv-most frequent observation) etc..

Measure of spread is range

range(tea)=111.32-42.12=69.2

range(coffee)=106.30-87.62=18.68

Boxplot of coffee

From the plot it is clear that the distribution is negatively skewed and there is no outliers in the data.

Boxplot of tea

From the plot we can infer that the distribution is positively skewed and there is no outliers in the model.


The correlation between Coffee and tea is 0.769, which implies there is positive linear relatioship exist between the variable tea and coffee.

The obtained model is:

coffee=86.3200+0.1954*tea


Related Solutions

Consider the following Data: Year Tea (L per person) Coffee (L per person) 1994 42.4 95.85...
Consider the following Data: Year Tea (L per person) Coffee (L per person) 1994 42.4 95.85 1995 42.12 97.28 1996 47.61 87.62 1997 60.86 92.04 1998 55.58 99.21 1999 50.61 95.63 2000 49.89 97.42 2001 56.77 93.93 2002 62.53 95.67 2003 68.31 99.25 2004 69.88 101.31 2005 72.99 101.68 2006 71.36 104.02 2007 90.78 106.09 2008 74.7 105.8 2009 67.15 102.15 2010 67.03 101.15 2011 87.83 104.05 2012 93.4 102.7 2013 78.9 105.28 2014 111.32 106.3 2015 98.39 104.96 2016...
Year Tea (L per person) Coffee (L per person) 1994 42.4 95.85 1995 42.12 97.28 1996...
Year Tea (L per person) Coffee (L per person) 1994 42.4 95.85 1995 42.12 97.28 1996 47.61 87.62 1997 60.86 92.04 1998 55.58 99.21 1999 50.61 95.63 2000 49.89 97.42 2001 56.77 93.93 2002 62.53 95.67 2003 68.31 99.25 2004 69.88 101.31 2005 72.99 101.68 2006 71.36 104.02 2007 90.78 106.09 2008 74.7 105.8 2009 67.15 102.15 2010 67.03 101.15 2011 87.83 104.05 2012 93.4 102.7 2013 78.9 105.28 2014 111.32 106.3 2015 98.39 104.96 2016 105.25 103.57 By using...
The following table presents data on wine consumption (in liters per person per year) and death...
The following table presents data on wine consumption (in liters per person per year) and death rate from heart attacks (in deaths per 100,000 people per year) in 19 developed Western countries. Country Alcohol from Wine Heart disease Deaths Australia 2.5 211 Austria 3.9 167 Belgium 2.9 131 Canada 2.4 191 Denmark 2.9 220 Finland 0.8 297 France 9.1 71 Iceland 0.8 211 Ireland 0.7 300 Italy 7.9 107 Netherlands 1.8 167 New Zealand 1.9 266 Norway 0.8 227 Spain...
Predicting if income exceeds $50,000 per year based on 1994 US Census Data with Simple Classification...
Predicting if income exceeds $50,000 per year based on 1994 US Census Data with Simple Classification Techniques Linear Discriminant Analysis: Perform cross-validated LDA (LOOCV) with variable income.cat as response, and all the numeric variables as predictors. Compute and display the resulting (cross-validated) contingency table as well as the corresponding classification accuracy and classification error. Comment on the result. Use Rstudio
Vintage Coffee Co. produces three products: coffee beans, tea bags, and chai. The following monthly information...
Vintage Coffee Co. produces three products: coffee beans, tea bags, and chai. The following monthly information is available regarding Vintage's manufacturing costs and production volumes. Month Total Manufacturing Costs Pounds of coffee beans produced Number of tea bags produced Boxes of chai produced April 2019 $1,709,880 13,800 15,000 1,500 May 2019 $1,708,550 13,350 11,250 2,100 June 2019 $1,667,130 12,750 7,500 2,400 July 2019 $2,647,000 14,780 10,150 5,400 Aug 2019 $1,918,680 14,330 7,500 3,160 Sept 2019 $1,907,030 13,950 10,500 3,600 Oct...
Consider the following data on real GDP per capita in: Year Per Capita Real GDP 1950...
Consider the following data on real GDP per capita in: Year Per Capita Real GDP 1950 14 339 1960 17 351 1970 23 790 1980 30 732 1990 35 868 2000 43 288 2010 46 406 2011 47 554 2012 47 741 2013 48 066 2014 48 780 a) Calculate the percentage growth rates in real GDP per capita in each of the years 2011 through 2014, from the previous year. b) Now, instead of calculating the annual percentage growth...
We consider data on weekly sales for coffee. Data has n = 18 weeks of coffee...
We consider data on weekly sales for coffee. Data has n = 18 weeks of coffee sales in Q units, the deal rate (D = 1 for usual price, = 1.05 in weeks with 5% price reduction, and = 1.15 in weeks with 15% price reduction), and advertisement (A = 1 with advertisement, = 0 otherwise) Model = log(Q) = B0 + B1D + B2A + u estimate by OLS -> log(Q) = 0.701 (0.415) + 0.756D (0.091) + 0.242A...
We consider data on weekly sales for coffee. Data has n = 18 weeks of coffee...
We consider data on weekly sales for coffee. Data has n = 18 weeks of coffee sales in Q units, the deal rate (D = 1 for usual price, = 1.05 in weeks with 5% price reduction, and = 1.15 in weeks with 15% price reduction), and advertisement (A = 1 with advertisement, = 0 otherwise) Model = log(Q) = B0 + B1D + B2A + u estimate by OLS -> log(Q) = 0.701 (0.415) + 0.756D (0.091) + 0.242A...
The data below show the consumption of alcohol (X, liters per year per person, 14 years...
The data below show the consumption of alcohol (X, liters per year per person, 14 years or older) and the death rate from cirrhosis, a liver disease (Y, death per 100,000 population) in 15 countries (each country is an observation unit). Country Alcohol Consumption (x) Death Rate from Cirrhosis (y) France 24.7 46.1 Italy 15.2 23.6 Germany 12.3 23.7 Australia 10.9 7.0 Belgium 10.8 12.3 USA 9.9 14.2 Canada 8.3 7.4 England 7.2 3.0 Sweden 6.6 7.2 Japan 5.8 10.6...
Consider the following 3-person encryption scheme based on RSA. L (can be trusted in this case)...
Consider the following 3-person encryption scheme based on RSA. L (can be trusted in this case) generates two large primes p and q, calculates both n and φ(n). L also chooses k1, k2 and k3 such that GCD(ki,n) = 1 and k1k2k3 ≡ 1 mod φ(n). Keys are securely distributed to three others as follows: G: <n,k1,k2 > J: < n, k2, k3 > Z: < n, k3, k1 > Answer the following questions. (a) G has a message M1...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT