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

1.CODE SCREENSHOT:

2.OUTPUT:

RGui (64-bit) File Edit View Misc Packages Windows Help STOP R Console > source (D:\\java\\R PROGRAMMING EXAMPLES\\StockPric

3.CODE:

# Create the function.
getmode <- function(v) {
t <- unique(v)
t[which.max(tabulate(match(v, t)))]
}
stock=c(10,7,20,12,75,15,9,18,4,12,8,14)
print(stock)
Mean=mean(stock);
print(c("Mean :",Mean))
Median=median(stock);
print(c("Median :",Median))
Mode=getmode(stock);
print(c("Mode",Mode));
Sdd=0.0+sd(stock);
print(c("Standard Deviation",Sdd))
x=20;
xVal=(x-min(stock))/(max(stock)-min(stock));
print(c("The value $20 after Min-Max Normalization",xVal));
print("The Z scores of $20");
print(scale(c(stock))[3,]);
d=floor(log10(x)) + 1;
DecScaliing=stock/10^d
print("The Stock Price $20After Decaling");
print(DecScaliing[3]);
skewness=3*(Mean-Median)/Sdd;
print(c("Skewness of the stock price",skewness));

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