You are on page 1of 5

The University of Hong Kong

Department of Statistics & Actuarial Science


STAT1600A Statistics: Ideas and Concepts
2016-2017 First Semester

Core course for Risk Management Major and Statistics Major (4-year curriculum):

STAT1600A Statistics: Ideas and Concepts (2016-2017 First Semester)

Assignment 4

Due Date: Nov 19, 2016 (17:00)

Assessment Criteria
In order to fight against plagiarism, assessment would also be based on your participation, not
only accuracy.

When you encounter any difficulty, write down your obstacles in your work and show how you
can/cannot tackle them. If it is reasonable, and you have shown your effort in attempting the
question, you may still score partial marks despite of the incompleteness.

Another important consideration is the way you present your work. The logical flows, organi-
zational skills and presentation methods will also count.

You are allowed to discuss your work with your friends, but you cannot directly copy the work
of your classmates, even with their consent.

Late submission is not accepted.

Please indicate your tutorial group in your submitted work.

Assignment Questions
This assignment has a total of 100 points. Answer ALL FOUR questions.

1. (40 marks)
Eric is applying for a job at Google. From the past, he observes that acceptance letters and
rejection letters were received in the following pattern (e.g., probability of receiving mail on
Monday is 0.16 given that the mail is an acceptance letter):

Day P(receive mail|acceptance) P(receive mail|rejection)


Monday 0.16 0.15
Tuesday 0.21 0.13
Wednesday 0.24 0.19
Thursday 0.18 0.21
Friday 0.11 0.25

STAT1600A Statistics: Ideas and Concepts Page 1 Y.K. CHUNG, E. LI


Assignment 4 Department of Statistics & Actuarial Science
The University of Hong Kong
The University of Hong Kong
Department of Statistics & Actuarial Science
STAT1600A Statistics: Ideas and Concepts
2016-2017 First Semester

Assume that P(acceptance) = 0.4 for all applicants. Calculate the following probabilities:

(a) Eric receives mail on Monday.


ans:P (M on) = P (M on|acc) P (acc) + P (M on|rej) P (rej) = 0.16 0.4 + 0.15
(1 0.4) = 0.154

(b) Eric receives mail on Tuesday given that he does not receive mail on Monday.

ans:
  P (T ueM onC ) P (T ue)
P T ue|M onC = P (M onC )
= 1P (M on)

We have P(Mon) from part (a) and:


P (T ue) = P (T ue|acc) P (acc) + P (T ue|rej) P (rej) = 0.21 0.4 + 0.13 (1 0.4) =
0.162

Therefore:
 
P (T ue) 0.162
P T ue|M onC = 1P (M on)
= 10.154
= 0.191

(c) Eric is accepted by Google given that there is no mail from Monday to Wednesday.

ans:
Let T = no mail from Mon to Wed.
P (accT ) P (T |acc)P (acc)
P (acc|T ) = P (T )
= P (T |acc)P (acc)+P (T |rej)P (rej)

Now,
P (T |acc) = 1 P (M on T ue W ed|acc) = 1 (0.16 + 0.21 + 0.24) = 0.39
P (T |rej) = 1 P (M on T ue W ed|rej) = 1 (0.15 + 0.13 + 0.19) = 0.53

Therefore
0.390.4
P (acc|T ) = 0.390.4+0.530.6
= 0.329

(d) Eric is accepted by Google given that the mail comes on Thursday.

ans:
P (accT hu) P (T hu|acc)P (acc)
P (acc|T hu) = P (T hu)
= P (T hu|acc)P (acc)+P (T hu|rej)P (rej)

Therefore
0.180.4
P (acc|T hu) = 0.180.4+0.210.6
= 0.364

STAT1600A Statistics: Ideas and Concepts Page 2 Y.K. CHUNG, E. LI


Assignment 4 Department of Statistics & Actuarial Science
The University of Hong Kong
The University of Hong Kong
Department of Statistics & Actuarial Science
STAT1600A Statistics: Ideas and Concepts
2016-2017 First Semester

(e) Eric is accepted by Google given that the no mail comes through out the whole week.

ans:
Let N = no mail whole week
P (accN ) P (N |acc)P (acc)
P (acc|N ) = P (N )
= P (N |acc)P (acc)+P (N |rej)P (rej)

Now,
P (N |acc) = 1P (M on T ue W ed T hu F ri|acc) = 1(0.16 + 0.21 + 0.24 + 0.18 + 0.11) =
0.1
P (T |rej) = 1P (M on T ue W ed T hu F ri|rej) = 1(0.15 + 0.13 + 0.19 + 0.21 + 0.25) =
0.07

Therefore
0.10.4
P (acc|N ) = 0.10.4+0.070.6
= 0.488

STAT1600A Statistics: Ideas and Concepts Page 3 Y.K. CHUNG, E. LI


Assignment 4 Department of Statistics & Actuarial Science
The University of Hong Kong
The University of Hong Kong
Department of Statistics & Actuarial Science
STAT1600A Statistics: Ideas and Concepts
2016-2017 First Semester

2. (25 marks)
Suppose we take a random sample of 1234 stock market trading days and find that 650 days
are up days.

(a) Calculate the sample proportion of updays for this random sample.
ans: p = 1234
650
= 0.5267
(b) Now, we wish to test the null hypothesis that any given trading day can be up or down
with equal chance, against the alternative that there are more up days than down
days. Write down the Null and Alternative Hypotheses using the notation p = population
proportion of updays.

ans: H0 : p = 0.5.
H1 : p > 0.5.
(c) Calculate a test statistic based on your answer in part (b).
ans: z = q ppp(1p0 ) = q0.52670.5 = 1.8788
0 0 0.5(10.5)
p0 0.5

(d) We calculated that the p-value of the test statistic in part (c) is 0.0301. How would you
draw your conclusion if the level of significance is set at 5%?
ans: Since 0.0301 < 5%, reject H0: p = 0.5.
(e) Now, we repeat part (b) except that the alternative hypothesis is changed to the following:
the number of up days and number of down days are different. Again write down the
Null and Alternative Hypotheses using the notation p = population proportion ofupdays.

ans: H0 : p = 0.5.
H1 : p6=0.5.
(f) Calculate the p-value of the test statistic in part (c) based on your answer in part (e).
ans: p value = 0.0301 2 = 0.0602
(g) Now, how would you draw your conclusion if the level of significance is again set at 5%?
ans: Since 0.0602 > 5%, cannot reject H0: p = 0.5.

3. (10 points)

(a) Which of the following is more likely to happen? Explain.


(i) Eric will discover a lucrative trading strategy on the stock market and become a
billionaire next year.
(ii) Eric will become a billionaire next year.
(b) Very few good computer programmers are female. Therefore, many tech companies ignore
female applicants when hiring top programmers.
Whats wrong with this statement?

STAT1600A Statistics: Ideas and Concepts Page 4 Y.K. CHUNG, E. LI


Assignment 4 Department of Statistics & Actuarial Science
The University of Hong Kong
The University of Hong Kong
Department of Statistics & Actuarial Science
STAT1600A Statistics: Ideas and Concepts
2016-2017 First Semester

(a) ans: The event that Eric will discover a lucrative trading strategy on the stock market
and become a billionaire next year. is a subset of the event Eric will become a billionaire
next year. Therefore, event (ii) has a higher chance of happening.
(b) ans: This statement is sufferring from the confusion of inverse. The proportion of girls
among top programmers is not the same as the proportion of top programmers among
girls. Information about the base rate of good programmers is needed in order to draw a
conclusion.

4. (25 marks)
Eric and Gabrielle have different trading strategies when it comes to trading on the stock
market. We randomly take a sample of 50 trading days from Erics trading activity and
independently take another random sample of 60 trading days from Gabrielles trading activity.
The daily profits that they made from these sampled trading days are contained in an Excel
file called Trading.xlsx. This file can be found in moodle next to this assignment.
(a) Calculate the sample mean and sample standard deviation of daily profits for Eric. Do
the same for Gabrielle.
ans:
sample mean for Eric = 3.8
sample sd for Eric = 60.8015
sample mean for Gabrielle = 59.6167
sample sd for Gabrielle = 92.4220
(b) Calculate the difference in sample mean daily profits between Eric and Gabrielle, i.e.,
calculate Erics sample mean - Gabrielles sample mean.
ans: Erics sample mean - Gabrielles sample mean = -55.8167
(c) Now, calculate the standard error of the diference in two means you calculated in part
(b).
q
ans: Eric0 s sample sd2
50
+ Gabrielle0 s sample sd2
60
= 14.7072
(d) Hence, calculate a 95% confidence interval for the diference in two means.
ans: -55.8167214.7072=(85.2310, 26.4024)
(e) Based on your answer in part (d), what conclusion can you draw regarding whose strategy
is superior? Erics strategy or Gabrielles strategy? Explain.
ans: Since the entire confidence interval lies below zero,
we are fairly confident (95%) that Gabrielles strategy
is more superior than Erics strategy.

End of Assignment 4

STAT1600A Statistics: Ideas and Concepts Page 5 Y.K. CHUNG, E. LI


Assignment 4 Department of Statistics & Actuarial Science
The University of Hong Kong