8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
1/28
RANBAXY LABORATORIES LTD.RANBAXY LABORATORIES LTD.
Statistical Analysis of Stock PricesStatistical Analysis of Stock Prices
Presented byPresented by
Anushka Kiran PGDMB8/03Anushka Kiran PGDMB8/03
Arun Vats PGDMB8/05Arun Vats PGDMB8/05
Kanu Priya PGDMB8/16Kanu Priya PGDMB8/16
Manish Jain PGDMB8/18Manish Jain PGDMB8/18
Rajnish Yadav PGDMB8/26Rajnish Yadav PGDMB8/26
Sunil Gaur PGDMB8/38Sunil Gaur PGDMB8/38
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
2/28
Descriptive Statistical Analysis ofDescriptive Statistical Analysis of
PopulationPopulation Close Price BSE_SENSEX Open Price
Mean 418.93 10893.13 421.04Standard Error 2.75 103.44 2.78
Median 401.68 10855.82 403.88
Mode 393.15 #N/A 390.00
Standard Deviation 61.56 2312.94 62.16Sample Variance 3789.87 5349674.91 3864.10
Kurtosis -0.58 -1.24 -0.60
Skewness 0.68 -0.11 0.68
Range 247.70 7996.53 250.00Minimum 309.50 6655.56 314.00
Maximum 557.20 14652.09 564.00
Sum 209462.55 5446563.33 210518.88
Count 500.00 500.00 500.00Confidence Level(95.0%) 5.41 203.23 5.46
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
3/28
Descriptive Statistical Analysis of theDescriptive Statistical Analysis of the
SampleSampleOpen Price Close Price
Mean 408.74Mean 407.28Standard Error 10.21Standard Error 10.11
Median 392.50Median 397.03
Mode 385.00Mode #N/A
Standard Deviation 55.91Standard Deviation 55.37
Sample Variance 3126.37Sample Variance 3065.61Kurtosis -0.06Kurtosis -0.21
Skewness 0.74Skewness 0.64
Range 215.00Range 211.90
Minimum 316.00Minimum 311.05
Maximum 531.00Maximum 522.95
Sum 12262.25Sum 12218.35
Count 30.00Count 30.00
Confidence Level(95.0%) 20.88Confidence Level(95.0%) 20.67
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
4/28
Variation of the closingVariation of the closing
price with BSE priceprice with BSE price
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
5/28
Difference between twoDifference between two
population means-smallpopulation means-small
samplesampleT testT test
Null Hypothesis: H0: 1>=2Null Hypothesis: H0: 1>=2
Avg Price of (Closing Price>=Opening Price)Avg Price of (Closing Price>=Opening Price)
Alternate Hypothesis: H1: 1
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
6/28
ContCont
t = (X1 - X2) / SQRT ( S^2*(1/n1 + 1/n2))t = (X1 - X2) / SQRT ( S^2*(1/n1 + 1/n2))= -0.10186= -0.10186
Note:Note:
S^2 =[(n1-1)*S1^2 + (n2-1)*S2^2]/(n1+n2-2)S^2 =[(n1-1)*S1^2 + (n2-1)*S2^2]/(n1+n2-2)=3095.989=3095.989
n1= 30, n2=30n1= 30, n2=30
t computed = 0.10186t computed = 0.10186t critical = 1.6991 (5% level oft critical = 1.6991 (5% level of
significance )significance )
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
7/28
Cont..Cont..
Here, t critical > t computedHere, t critical > t computed
Thus, we will accept the nullThus, we will accept the nullHypothesis andHypothesis and
conclude that average Closing priceconclude that average Closing price
>= average>= averageOpening price.Opening price.
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
8/28
Difference in twoDifference in two
population meanspopulation means
(small sample)(small sample)Paired T Test is conducted for a small sample sizePaired T Test is conducted for a small sample size
of 10 nos.of 10 nos.
Sample size of 10 is taken from the populationSample size of 10 is taken from the population
Closing price after and before the acquisition ofClosing price after and before the acquisition of
Terapia by Ranbaxy in May 2006Terapia by Ranbaxy in May 2006
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
9/28
HypothesisHypothesis
Null Hypothesis H0:1=2Null Hypothesis H0:1=2
Alternative Hypothesis H1:12Alternative Hypothesis H1:12
Where,Where,1: Population Mean after acquisition1: Population Mean after acquisition
2: Population Mean before acquisition2: Population Mean before acquisition
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
10/28
Closing price before andClosing price before and
after Acquisitionafter Acquisition
CLOSING PRICE
Sr. No. Before Acquisition After Acquisition
1 351.65 365.252 550.08 349.45
3 379.8 411
4 442 370.8
5 393.15 398.4
6 439.85 357.4
7 419 414.05
8 357.65 375.05
9 432.75 412.25
10 384.85 345.3
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
11/28
t-Test: Paired Two Sample fort-Test: Paired Two Sample for
MeansMeansbefore acquisition after acquisitionMean 415.078 379.895
Variance 3316.873396 719.3080278
Observations 10 10
Pearson Correlation -0.248656817
Hypothesized Mean Difference 0
Df 9
t Stat 1.605150988
P(T
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
12/28
t-Test: Paired Two Sample fort-Test: Paired Two Sample for
Means (cont..)Means (cont..)
Calculated "t" is less than critical "t".Calculated "t" is less than critical "t".
Hence we accept the null HypothesisHence we accept the null Hypothesis
i.e. acquisition has no effect on sharei.e. acquisition has no effect on share
price and population mean after andprice and population mean after and
before acquisition is the samebefore acquisition is the same
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
13/28
Chi-Square TestChi-Square Test
Null hypothesis: There is 80% or greaterNull hypothesis: There is 80% or greaterassociation between Ranbaxys closingassociation between Ranbaxys closingprices and BSE sensexprices and BSE sensex
Alternate hypothesis: There is less thanAlternate hypothesis: There is less than80% association between Ranbaxys80% association between Ranbaxysclosing prices and BSE sensexclosing prices and BSE sensex
NOTE: we have assumed that an association of 80% orNOTE: we have assumed that an association of 80% ormore represents a high dependence.more represents a high dependence.
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
14/28
Chi Square TestChi Square Test
Observedfreq.
Expectedfreq.
(O-E) (O-E)^2 (O-E)^2)/E
YES 18 24 -6 36 1.5
NO 12 6 6 36 6
Total 30 30 CHI-SQUARE 7.5
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
15/28
InferenceInference
Calculated Chi Square = 7.5Calculated Chi Square = 7.5
Critical Chi Square = 3.8414 at 5%Critical Chi Square = 3.8414 at 5%level of significance.level of significance.
Since, calculated Chi square is greaterSince, calculated Chi square is greaterthan critical Chi Square. Thus ,we rejectthan critical Chi Square. Thus ,we rejectthe null hypothesis.the null hypothesis.
Hence, the degree of associationHence, the degree of associationbetween the growth of Ranbaxys sharebetween the growth of Ranbaxys shareprice and BSE sensex is very low.price and BSE sensex is very low.
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
16/28
REGRESSION MODELREGRESSION MODELDifference high-
lowNo. of Trades per
Day
6.1 3614
6.3 2908
6.9 2480
7.45 8999
7.95 2897
9.3 3009
9.5 6256
10.4 6171
10.8 1550
11.45 5373
11.5 1444
11.5 3367
12.4 4841
12.7 1100
14.4 6806
14.5 5069
15.65 7613
18.3 11113
18.6 6285
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
17/28
HypothesisHypothesis
Null Hypothesis:Null Hypothesis:
There is no linear relationship between no. ofThere is no linear relationship between no. oftrades per day & difference in high and lowtrades per day & difference in high and lowvalue in the population regression linevalue in the population regression line
Alternative Hypothesis:Alternative Hypothesis:
There is linear relationship between no. ofThere is linear relationship between no. of
trades per day & difference in high and lowtrades per day & difference in high and lowvalue in the population regression linevalue in the population regression line
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
18/28
Summary OutputSummary Output
Regression Statistics
Multiple R 0.470970693
R Square 0.221813394
Adjusted R Square 0.178580804
Standard Error 2382.355489
Observations 20
ANOVAANOVA
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
19/28
ANOVAANOVA
Analysis of VarianceAnalysis of Variancedf F Significance F
Regression 1 29119884.78 2911988 5.13069 0.036082365
Residual 18 102161118.2 5675618
Total 19 131281003
Coefficients Standard Error t Stat P-value Lower 95% Upper 95% Lower 95% Upper 95%
Intercept 1115.539 1689.846 0.660 0.517 2434.69 4665.77 2434.69 4665.77
difference of high n low 326.958 144.345 2.265 0.036 23.69 630.21 23.69 630.21
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
20/28
INFERENCEINFERENCE
1) Here, F calculated > F critical1) Here, F calculated > F critical
Therefore, we reject the null Hypothesis.Therefore, we reject the null Hypothesis.
2) In our case R^2 is2) In our case R^2 is 0.221.The interpretation.The interpretation
is 22% of the variation in no. of trades peris 22% of the variation in no. of trades perday is explained by difference in high andday is explained by difference in high and
low price and about 78% is explained by thelow price and about 78% is explained by the
residual term.residual term.
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
21/28
SCATTER DIAGRAMSCATTER DIAGRAMPOSITIVE CORRELATIONPOSITIVE CORRELATION
scattered data
0
2000
4000
6000
8000
10000
12000
0 5 10 15 20
difference High-Low
no.oftrad
e
Series1
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
22/28
ANOVA TESTANOVA TEST
Null Hypothesis:Null Hypothesis:
Average Closing Price on different week days isAverage Closing Price on different week days is
SameSame
Alternative Hypothesis:Alternative Hypothesis:
Average Closing Price on different week days isAverage Closing Price on different week days is
DifferentDifferent
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
23/28
Closing Price on differentClosing Price on different
week daysweek daysS. No. Monday Tuesday Wednesday Thursday Friday
1 394.8 525.1 338.2 404.6 343.2
2 375.9 395.5 381.5 381.7 442.95
3 413.95 502.55 411.15 387.35 351.954 554.78 350.1 373.85 416.75 403
5 383.6 406.6 431.5 344 384.85
6 354.75 383.1 399 406.55 427.15
7 402.3 386.65 513.45 473.1 419.58 400.85 532.7 508.95 365.35 396.45
9 462.35 349.45 539.95 436.4 539
10 316.85 399.7 412.7 458.4 412.4
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
24/28
Summary OutputSummary Output
ANOVA:Single Factor
SUMMARY
Groups Count Sum Average Variance
Monday 10 4060.13 406.013 4169.08
Tuesday 10 4231.45 423.145 4887.993
Wednesday 10 4310.25 431.025 4536.186
Thursday 10 4074.2 407.42 1633.858
Friday 10 4120.45 412.045 2974.687
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
25/28
Cont..Cont..ANOVA
Source of Variation SS df MS F Pvalue F crit
Between Groups 4657.7546 4 1164.43 0.31986 0.8631 2.57873
Within Groups 163816.24 45 3640.36
Total 168473.99 49
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
26/28
Cont..Cont..
Here, F calculated > F critical,Here, F calculated > F critical,
We will reject the Null HypothesisWe will reject the Null Hypothesis
Therefore, average closing price onTherefore, average closing price on
different weekdays is different.different weekdays is different.
Also, by comparing the population averageAlso, by comparing the population average
closing price on different week days isclosing price on different week days isdifferentas shown in the next slidedifferentas shown in the next slide
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
27/28
8/14/2019 Ranbaxy Laboratories Ltd. Statistical Analysis of Stock
28/28
THANK YOUTHANK YOU