Question

Consider the following stock price data (in dollars) to answer the questions in this section. Use R. 10 7 20 12 75 15 9 18 4
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#defining vector
x = c(10,7,20,12,75,15,9,18,4,12,8,14)

1.

# 1. calculate mean , median and mode
mean_x = mean(x)
median_x = median(x)

# Create the function.
getmode <- function(x) {
uniqv <- unique(x)
uniqv[which.max(tabulate(match(x, uniqv)))]
}
mode_x = getmode(x)

#printing
> mean_X
[1] 17
> median_x
[1] 12
> mode_x
[1] 12

2.

> #standard deviation of x
> standard_dev_X = sd(x)
> standard_dev_X

[1] 18.82938

Interpretation: There is alot of variation in stock prices and standard deviation is $18.83

3.

> #min max normalisation for stock price $20
> min_max_normalised_value = (20 - min(x))/(max(x) - min(x))
> min_max_normalised_value

[1] 0.2253521

4.

> #mid range stock value
> mid_range = (max(x) - min(x))/2
> mid_range

[1] 35.5

5.

> #computing z score
> z_score_value = scale(20, center = mean_x, scale = standard_dev_X)
> z_score_value

[,1]
[1,] 0.1593255
attr(,"scaled:center")
[1] 17
attr(,"scaled:scale")
[1] 18.82938

6.

> #decimal scaling
> decimal_scaled_value = 20/(10^2)
> decimal_scaled_value

[1] 0.2

7.

> #skewness
> skewness_x = 3*(mean(x) - median(x))/(sd(x))
> skewness_x

[1] 0.7966275

Please rate my answer and comment for doubt

Add a comment
Know the answer?
Add Answer to:
Consider the following stock price data (in dollars) to answer the questions in this section. Use...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT