Você está na página 1de 5

Question One: Data Analysis and Decision Statistics:

a) Mathematically the sample mean is calculated with the formula:


∑𝑛𝑖=1 𝑥𝑖
𝑥=
𝑛
Where ‘n’ represents the number of data points in the sample, ‘xi’ represent each data values and ′𝑥′
represent the sample mean of the data.
The sample standard deviation is calculated mathematically using the formula:

∑𝑛 (𝑥𝑖 − 𝑥)2
𝑠𝑥 = √ 𝑖=1
𝑛−1

Where ‘n’ represents the number of data points in the sample, ‘xi’ represent each data values and ′𝑥′
represent the sample mean of the data.
However, for this exercise an EXCEL spreadsheet was given and the calculations were done with the
help of specific functions (=SUM for adding the given values; =AVERAGE for calculating the
standard mean; =VAR for variance; =STDV.S for standard deviation)
For the period July 2010 to June 2014 (48 months):

Sum (=SUM) 31411531.00


nx 48
Sample mean (nx) (=AVERAGE) 654,406.90
Variance (𝑠𝑥2 ) (=VAR) 49570042569.54
Standard deviation (sx) (=STDV.S) 222643.31

For the period July 2014 to July 2017 (37 months):

Sum (=SUM) 31,893,088.00


nx 37
Sample mean (nx) (=AVERAGE) 861,975.35
Variance (𝑠𝑥2 ) (=VAR) 41997888291.57
Standard deviation (sx) (=STDV.S) 204933.86

t-Test: Two-Sample Assuming Unequal Variances

Variable 1 Variable 2
Mean 654406.90 861975.35
Variance 49570042569.54 41997888291.57
Observations 48 37
Hypothesized Mean Difference 0.05
df 80
t Stat -4.46
P(T<=t) one-tail 1.33258E-05
t Critical one-tail 1.66
P(T<=t) two-tail 2.66516E-05
t Critical two-tail 1.990063421
b) Setting up the hypothesis:
Because the size of the two given samples are different (n1=48 months, n2=37 months), the samples
are independent. Considering µ1 and µ2 the means of the first and second sample, an appropriate test
of Hypothesis can be formulated:
H0, the Null Hypothesis for this problem, consider that the interest for the Santander London Bicycle
Hire Scheme has not changed, and the mean value for the first 48 months is equal to the mean value
for the following 38 months up to July 2017
𝐻0 : 𝜇1 − 𝜇2 = 0
H1, the Alternative Hypothesis considers that the mean value of the first 48 months is different from
the mean value of the next 37 months therefore the interest in the Santander London Bicycle Hire
Scheme has changed since its implementation.

𝐻1 : 𝜇1 − 𝜇2 ≠ 0

c) Testing hypothesis:

𝐻0 : 𝜇1 − 𝜇2 = 0
𝐻1 : 𝜇1 − 𝜇2 ≠ 0
Because the size of both sample is greater than 30, Z-statistic is calculated with the formula:
𝑥1 − 𝑥2 − (𝜇1 − 𝜇2 )
𝑍∗ =
𝜎2 𝜎2
√ 1 + 2
𝑛1 𝑛2

Where 𝑥̅1 is the mean of 1st sample (n1=48 months), 𝑥̅2 the mean of the 2nd sample (n2=37 months),
𝜎12 is the variance of the 1st sample, 𝜎22 is the variance of the 2nd sample.

654,406.9 − 861,975.35 − 0
𝑍∗ = = −4.4581
2 2
√222643.31 + 204933.86
48 37

For a 5% significance level two-tailed test, by looking at the normal distribution table, the critical
values of ±1.96 are obtained. Considering that -.4.4581< -1.96 the null hypothesis H0 is rejected.
Therefore, with a 95% confidence we can say that 𝑥̅1 ≠ 𝑥̅2 and the interest for the Santander London
Bicycle Hire Scheme has changed since its implementation.
Question Two: Discrete Statistics
a) Knowing that (X,Y) has the possibility density 𝑓(𝑥, 𝑦) = 𝛼𝑒 −0.1(𝑥+𝑦) if x>0 and y>0 and
zero otherwise, and since the continuous distribution from zero to infinity equals the
probability of unity, therefore:

𝛼𝑒 −0.1(𝑥+𝑦) , 𝑖𝑓 𝑥 > 0, 𝑦 > 0


𝑓(𝑥, 𝑦) {
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
For all x and y ≠0, P(S) = 1 we know that:

∬ 𝑓(𝑥, 𝑦) 𝑑𝑦 𝑑𝑥 = 1

∞ ∞
∫ ∫ 𝛼𝑒 −0.1(𝑥+𝑦) 𝑑𝑦 𝑑𝑥 = 1
0 0

By bringing α out of the integrals we get:


∞ ∞
𝛼 ∫ ∫ 𝑒 −0.1(𝑥+𝑦) 𝑑𝑦 𝑑𝑥 = 1
0 0


𝛼 ∫ [−10𝑒 −0.1(𝑥+𝑦) ]0 𝑑𝑥 = 1
0

𝛼 ∫ [−10𝑒 −∞ + 10𝑒 −0.1𝑥 ] 𝑑𝑥 = 1
0

But 𝑒 −∞ → 0 therfore:

𝛼 ∫ [10𝑒 −0.1𝑥 ] 𝑑𝑥 = 1
0

∝ [−100𝑒 −0.1𝑥 ]∞
0 =1

𝛼[−100𝑒 −∞ + 100𝑒 0 ] = 1
𝑒 −∞ → 0 𝑎𝑛𝑑 𝑒 0 = 1 therfore:

100𝛼 = 1
𝟏
𝜶= = 𝟎. 𝟎𝟏
𝟏𝟎𝟎
𝛼𝑒 −0.1(𝑥+𝑦) , 𝑖𝑓 𝑥 > 0, 𝑦 > 0
b) 𝑓(𝑥, 𝑦) {
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
If f(x,y)=f1(x)f2(x), for all (x,y), then X and Y are independent.
The marginal distribution of X:
∞ ∞
0.01𝑒 −0.1(𝑥+𝑦) ∞
𝑓1 (𝑥) = ∫ 0.01𝑒 −0.1(𝑥+𝑦) 𝑑𝑦 = [ ] = [−0.1𝑒 −0.1(𝑥+𝑦) ]0
0 −0.1 0
= −0.1𝑒 −∞ − (−0.1𝑒 −0.1(𝑥) )

𝑓1 (𝑥) = 0.1𝑒 −0.1(𝑥)


The marginal distribution of Y:
∞ ∞
−0.1(𝑥+𝑦)
0.01𝑒 −0.1(𝑥+𝑦) ∞
𝑓2 (𝑦) = ∫ 0.01𝑒 𝑑𝑥 = [ ] = [−0.1𝑒 −0.1(𝑥+𝑦) ]0
0 −0.1 0
= −0.1𝑒 −∞ − (−0.1𝑒 −0.1(𝑦) )

𝑓2 (𝑦) = 0.1𝑒 −0.1(𝑦)


By multiplying the two values:

𝑓(𝑥)𝑓(𝑦) = (0.1𝑒 −0.1(𝑥) ) × (0.1𝑒 −0.1(𝑦) )

𝑓(𝑥)𝑓(𝑦) = 0.01𝑒 −0.1(𝑥+𝑦)

∴ 𝑓(𝑥)𝑓(𝑦) = 0.01𝑒 −0.1(𝑥+𝑦) = 𝑓(𝑥, 𝑦)


In conclusion it can be said that X and Y are independent.

c) The densities of the marginal distributions have been calculated in the point b) as:

𝟎. 𝟏𝒆−𝟎.𝟏𝒙 𝒇𝒐𝒓 𝒙 > 𝟎


Marginal distribution of X: 𝒇𝟏 (𝒙) = {
𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
𝟎. 𝟏𝒆−𝟎.𝟏𝒚 𝒇𝒐𝒓 𝒚 > 𝟎
Marginal distribution of Y: 𝒇𝟐 (𝒚) = {
𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆

d) The probability that the first component has a lifetime of 10 months or longer:
∞ ∞
−0.1𝑥
0.1 −0.1𝑥 ∞ ∞
𝑃(𝑋 ≤ 10) = ∫ 𝑓(𝑥) 𝑑𝑥 = ∫ 0.1𝑒 𝑑𝑥 = [− 𝑒 ] = [−𝑒 −0.1𝑥 ]10 = 0.3679
10 10 0.1 10

𝑷(𝑿 ≥ 𝟏𝟎) = 𝟎. 𝟑𝟔𝟕𝟗


Alternatively, we can calculate 𝑃(𝑋 < 10) (value 0.6321) and after performing 1 − 𝑃(𝑥 < 10) with
the same result
e) The probability that the second component will fail before the first one, means that X, the
lifetime of the first component, will be greater than Y, the lifetime of the second component
or X>Y:
∞ ∞
𝑃(𝑋 > 𝑌) = ∫ ∫ 0.01𝑒 −0.1(𝑥+𝑦) 𝑑𝑥 𝑑𝑦
0 𝑦
∞ ∞ ∞
0.01𝑒 −0.1(𝑥+𝑦) ∞
1𝑒 −0.1(2𝑦)
=∫ [ ] = ∫ (0 − 0.1𝑒 −0.1(2𝑦) ) 𝑑𝑦 = [− ]
0 −0.1 𝑦 0 2 0
1𝑒 −0.1(∞) 1𝑒 −0.1(0) 1
= (− ) + (− )=
2 2 2

Therefore:
𝟏
𝑷(𝑿 > 𝒀) =
𝟐

Você também pode gostar