Question

In: Statistics and Probability

* Descriptive statistics: o Find the mean, median, mode, range, and standard deviation for the data...

* Descriptive statistics:

o Find the mean, median, mode, range, and standard deviation for the data set.

o Create a scatter plot for the data set.

* Regression Analysis:

o Perform a linear regression analysis onto the data set.

o Report the correlation coefficient, the equation of the regression function, and make a few predictions base on hypnotical input values.

o Write down a summary of your conclusions (How well does the regression fit the values? How correlated are the independent and dependent variables? What does the prediction tell you?).

X Y
108 392.5
19 46.2
13 15.7
124 422.2
40 119.4
57 170.9
23 56.9
14 77.5
45 214
10 65.3
5 20.9
48 248.1
11 23.5
23 39.6
7 48.8
2 6.6
24 134.9
6 50.9
3 4.4
23 113
6 14.8
9 48.7
9 52.1
3 13.2
29 103.9
7 77.5
4 11.8
20 98.1
7 27.9

Solutions

Expert Solution

###R code

x=c(108,19,13,124,40,57,23,14,45,10,5,48,11,23,7,2,24,6,3,23,6,9,9,3,29,7,4,20,7)

x

y=c(392.5,46.2,15.7,422.2,119.4,170.9,56.9,77.5,214,65.3,20.9,248.1,23.5,39.6,48.8,6.6,134.9,50.9,4.4,113,14.8,48.7,52.1,13.2,103.9,77.5,11.8,98.1,27.9)

y

####Descriptive Statistics#########

###For X

summary(x)

mean(x)

mode(x)

median(x)

range(x)

a=var(x)

sd=sqrt(a)###standard deviation

sd

####For Y

summary(y)

mean(y)

mode(y)

median(y)

range(y)

a=var(y)

sd=sqrt(a) ###standard deviation

sd

### a scatter plot

plot(x,y)

###a linear regression analysis#############

fit=lm(y~x)

summary(fit)

###the correlation coefficient, the equation of the regression function

cor(x,y)

#####answer###

> x=c(108,19,13,124,40,57,23,14,45,10,5,48,11,23,7,2,24,6,3,23,6,9,9,3,29,7,4,20,7)

> x

[1] 108 19 13 124 40 57 23 14 45 10 5 48 11 23 7 2 24 6 3

[20] 23 6 9 9 3 29 7 4 20 7

> y=c(392.5,46.2,15.7,422.2,119.4,170.9,56.9,77.5,214,65.3,20.9,248.1,23.5,39.6,48.8,6.6,134.9,50.9,4.4,113,14.8,48.7,52.1,13.2,103.9,77.5,11.8,98.1,27.9)

> y

[1] 392.5 46.2 15.7 422.2 119.4 170.9 56.9 77.5 214.0 65.3 20.9 248.1

[13] 23.5 39.6 48.8 6.6 134.9 50.9 4.4 113.0 14.8 48.7 52.1 13.2

[25] 103.9 77.5 11.8 98.1 27.9

> ####Descriptive Statistics#########

> ###For X

>

> summary(x)

Min. 1st Qu. Median Mean 3rd Qu. Max.

2.0 7.0 13.0 24.1 24.0 124.0

> mean(x)

[1] 24.10345

> mode(x)

[1] "numeric"

> median(x)

[1] 13

> range(x)

[1] 2 124

> a=var(x)

> sd=sqrt(a)

> sd

[1] 29.37728

> ####For Y

>

> summary(y)

Min. 1st Qu. Median Mean 3rd Qu. Max.

4.40 23.50 52.10 93.77 113.00 422.20

> mean(y)

[1] 93.76897

> mode(y)

[1] "numeric"

> median(y)

[1] 52.1

> range(y)

[1] 4.4 422.2

> a=var(y)

> sd=sqrt(a)

> sd

[1] 106.1344

> ### a scatter plot

> plot(x,y)

> summary(fit)

Call:

lm(formula = y ~ x)

Residuals:

Min 1Q Median 3Q Max

-50.335 -18.669 -6.492 18.836 71.300

Coefficients:

Estimate Std. Error t value Pr(>|t|)   

(Intercept) 10.0193 7.1630 1.399 0.173   

x 3.4746 0.1905 18.242 <2e-16 ***

---

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 29.61 on 27 degrees of freedom

Multiple R-squared: 0.925, Adjusted R-squared: 0.9222

F-statistic: 332.8 on 1 and 27 DF, p-value: < 2.2e-16

> cor(x,y)

[1] 0.9617441

###conclusions:

R-sequared Value is 0.925 that means the model explains 92.5% variation

in the data ,thus our model is well fitted

& the correlation of our data is perfect positive

thus,our model is adequate.


Related Solutions

Use Descriptive Statistics in Excel to find the mean, median, range and standard deviation of the...
Use Descriptive Statistics in Excel to find the mean, median, range and standard deviation of the data below. Table 1: Health Expenditures as a Percentage of GDP of countries around the world 3.35 5.96 10.64 5.24 3.79 5.65 7.66 7.38 5.87 11.15 5.96 4.78 7.75 2.72 9.50 7.69 10.05 11.96 8.18 6.74 5.89 6.20 5.98 8.83 6.78 6.66 9.45 5.41 5.16 8.55
For the following distribution find the mean, median, mode, range and standard deviation: 13, 10, 16,...
For the following distribution find the mean, median, mode, range and standard deviation: 13, 10, 16, 20, 10, 14, 13, 25
Use the following list of data to find the mean, median, mode, rande and standard deviation....
Use the following list of data to find the mean, median, mode, rande and standard deviation. Show all of your work 78, 90, 88, 98, 97, 80, 80, 80, 93, 85
Find the mean, median, mode, and standard deviation of the following set of data: 2, 3,...
Find the mean, median, mode, and standard deviation of the following set of data: 2, 3, 3, 4, 5, 6, 9 Mean_____________________ Median____________________ Mode_____________________ Standard Deviation__________ You roll two fair dice, a green one and a red one. Find the probability of getting a sum of 6 or a sum of 4. ___________________ You draw two cards from a standard deck of 52 cards without replacing the first one before drawing the second. Find the probability of drawing an ace...
How do you find the mean, median, range, variance, standard deviation and mode in Excel? Say...
How do you find the mean, median, range, variance, standard deviation and mode in Excel? Say for example you have 2 columns. One column the numbers are 4, 51, 27, 89, 15, 61 The 2nd column, the numbers are 33, 2, 90, 54, 31, 7
Find the mean, median, mode, and standard deviation (round standard deviation to the nearest whole number)...
Find the mean, median, mode, and standard deviation (round standard deviation to the nearest whole number) for the following SAMPLE set of test scores.             90 85 75 70 80 80 Using the above information and the Empirical Rule: What percent of scores would you expect to fall between 66 and 87?                    ____________ 68% of the time you would expect scores between what two values?                     ____________ Determine the z-score for a test score of 64.                                                             ____________...
1. Find the mean, median, mode, population standard deviation and variance of the given data: Items:...
1. Find the mean, median, mode, population standard deviation and variance of the given data: Items: 3,5,6,9,10,12,15 Frequency: 1,4,2,12,5,4,2 2.Find the mean, median, mode, sample standard deviation and variance of the discrete frequency distribution: Items: 2,5,6,7,12 Frequency:1,3,10,4,2
Descriptive statistics (mean, median, range, standard deviation, and coefficient of variation) to summarize each of the three variables for the all Domestic cars.
  1 Descriptive statistics (mean, median, range, standard deviation, and coefficient of variation) to summarize each of the three variables for the all Domestic cars. Use z-scores to determine if there any outliers in the data set for any of the three variables. If there are any outliers in any category, please list them and state for which category they are an outlier. If a result is an outlier, state whether it is below or above the mean. 2 Descriptive...
Calculate the mean, median, mode, range, and standard deviation of the following sample: 12, 14, 15,...
Calculate the mean, median, mode, range, and standard deviation of the following sample: 12, 14, 15, 23, 22, 26, 28, 19, 17, 18, 25, 28, 29, 19, 12, 19, 22, 19, 23, 24, 19, 25, 19 Mean = Median = Mode = Range = Standard Deviation =
Write short notes on Harmonic Mean, Arithmetic Mean, Geometric Mean, Median, Mode, Range, Standard Deviation, Interquartile...
Write short notes on Harmonic Mean, Arithmetic Mean, Geometric Mean, Median, Mode, Range, Standard Deviation, Interquartile Deviation, Skewness, Kurtosis and using practical examples, explain how these measures are useful in the field of Business Administration. (10marks)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT