In: Math
Stock prices: Following are the closing prices of a particular stock for each trading day in May and June of a recent year.
May | |||||
884.74 |
900.68 |
900.62 |
886.25 |
820.43 |
875.04 |
877.00 |
871.98 |
879.81 |
890.22 |
879.73 |
864.64 |
859.70 |
859.10 |
867.63 |
880.37 |
877.07 |
873.65 |
866.20 |
869.79 |
829.61 |
June | |||||
906.97 |
908.53 |
909.18 |
903.87 |
915.89 |
887.10 |
877.53 |
880.23 |
871.48 |
873.63 |
857.23 |
861.55 |
845.72 |
871.22 |
870.76 |
868.31 |
881.27 |
873.32 |
882.79 |
(a) Find the mean and median price in May. Round the answers to
at least two decimal places.
(b) Find the mean and median price in June. Round the answers to at
least two decimal places.
(c) Does there appear to be a substantial difference in price
between May and June, or are the prices about the same?
R CODE:-
> x1
[1] 884.74 900.68 900.62 886.25 820.43 875.04 877.00 871.98 879.81
890.22
[11] 879.73 864.64 859.70 859.10 867.63 880.37 877.07 873.65 866.20
869.79
[21] 829.61
> x2
[1] 906.97 908.53 909.18 903.87 915.89 887.10 877.53 880.23 871.48
873.63
[11] 857.23 861.55 845.72 871.22 870.76 868.31 881.27 873.32
882.79
> mean(x1)
[1] 872.1076
> mean(x2)
[1] 881.3989
> sort(x1)
[1] 820.43 829.61 859.10 859.70 864.64 866.20 867.63 869.79 871.98
873.65
[11] 875.04 877.00 877.07 879.73 879.81 880.37 884.74 886.25 890.22
900.62
[21] 900.68
> sort(x2)
[1] 845.72 857.23 861.55 868.31 870.76 871.22 871.48 873.32 873.63
877.53
[11] 880.23 881.27 882.79 887.10 903.87 906.97 908.53 909.18
915.89
> median(x1)
[1] 875.04
> median(x2)
[1] 877.53