# data[].attributes.body
Saw that there were different ways of doing this and wasnt sure if there was a difference.

I saw one where they worked out β1 by r*Sy/Sx where r is PMCC and S is standard deviation. Is this correct? or is it Cov(x,y)/var(x)

Sorry its late, thank you

# data[].attributes.body
How would you go about answering questions on a consistent estimator, such as Q. 7 on the problem set.

# data[].attributes.body
In t-distribution, does a negative t value have any effect when finding the confidence level or do we not need to acknowledge the negative sign?

# data[].attributes.body
Sir in Q8 of the tutorial set(power of the test), why is 5.041 the sample mean?

# data[].attributes.headline
Thought I'd just share this really cool website....

# data[].attributes.subject
Thought I'd just share this really cool website....

# data[].attributes.body
https://seeing-theory.brown.edu/probability-distributions/index.html

It's really interactive! Might be worth a check out (:

# data[].attributes.attachment_link.readable_text
Discrete and Continuous

There are two major classes of probability distributions.

A discrete random variable has a finite or countable number of possible values.

If \( X \) is a discrete random variable, then there exists unique nonnegative functions, \( f(x) \) and \( F(x) \), such that the following are true:

$$\begin{align*}P(X = x) &= f(x)\\P(X < x) &= F(x)\end{align*}$$

Choose one of the following major discrete distributions to visualize. The probability mass function \( f(x) \) is shown in yellow and the cumulative distribution function \( F(x) \) in orange (controlled by the slider).

A Bernoulli random variable takes the value 1 with probability of \(p\) and the value 0 with probability of \(1-p\). It is frequently used to represent binary experiments, such as a coin toss.

A binomial random variable is the sum of \(n\) independent Bernoulli random variables with parameter \(p\). It is frequently used to model the number of successes in a specified number of identical binary experiments, such as the number of heads in five coin tosses.

A negative binomial random variable counts the number of successes in a sequence of independent Bernoulli trials with parameter \(p\) before \(r\) failures occur. For example, this distribution could be used to model the number of heads that are flipped before three tails are observed in a sequence of coin tosses.

A geometric random variable counts the number of trials that are required to observe a single success, where each trial is independent and has success probability \(p\). For example, this distribution can be used to model the number of times a die must be rolled in order for a six to be observed.

A Poisson random variable counts the number of events occurring in a fixed interval of time or space, given that these events occur with an average rate \(\lambda\). This distribution has been used to model events such as meteor showers and goals in a soccer match.

The uniform distribution is a continuous distribution such that all intervals of equal length on the distribution's support have equal probability. For example, this distribution might be used to model people's full birth dates, where it is assumed that all times in the calendar year are equally likely.

The normal (or Gaussian) distribution has a bell-shaped density function and is used in the sciences to represent real-valued random variables that are assumed to be additively produced by many small effects. For example the normal distribution is used to model people's height, since height can be assumed to be the result of many small genetic and evironmental factors.

Student's t-distribution, or simply the t-distribution, arises when estimating the mean of a normally distributed population in situations where the sample size is small and population standard deviation is unknown.

A chi-squared random variable with \(k\) degrees of freedom is the sum of \(k\) independent and identically distributed squared standard normal random variables. It is often used in hypothesis testing and in the construction of confidence intervals.

The exponential distribution is the continuous analogue of the geometric distribution. It is often used to model waiting times.

The F-distribution, also known as the Fisher-Snedecor distribution, arises frequently as the null distribution of a test statistic, most notably in the analysis of variance.

The gamma distribution is a general family of continuous probability distributions. The exponential and chi-squared distributions are special cases of the gamma distribution.

The beta distribution is a general family of continuous probability distributions bound between 0 and 1. The beta distribution is frequently used as a conjugate prior distribution in Bayesian statistics.

# data[].attributes.attachment_link.description
There are two major classes of probability distributions. A discrete random variable has a finite or countable number of possible values. If \( X \) is a discrete random variable, then there exists unique nonnegative functions, \( f(x) \) and \( F(x) \), such that the following are true: $$\begin{align*}P(X = x) &= f(x)\\P(X < x) &= F(x)\end{align*}$$ Choose one of the following major discrete distributions to visualize.

# data[].attributes.body
I'm very confused on how to collect the t-value. In Problem Set 2, in Q 3(d), it says for 8 degrees of freedom, 1% (0.01) of t values are greater than 2.896. Yet the question says "What value will 99% of sample means be less than". So, rather than dividing 1 by 2, we just take the 1% value, unlike in the chi-squared distribution.

This is the same in last week's live lecture on Confidence Intervals, where to find a 95% confidence interval, you would take a 5% t-value.

On the other hand, in the Confidence Interval Quiz, for Q1 and Q6, my answers were wrong. For example, on Q1, for a 95% confidence interval I took a 5% value - however, like in the chi-squared distribution, I should take the 2.5% value. Same in Q6. For a 90% confidence interval, I took a 10% t value - however, I should have taken the 5% value. I got 80% on the quiz because of this sir.

Answer:
It comes down to whether the probability is divided between one or two tails. When it is "less than", the probability is all in one tail (the upper tail), so that 95% will be less than that value, and 5% will be more. When it is between, it has two tails which the probability is divided between so 95% will be between two values; with 2.5% more than and 2.5% less than.

Last live lecture we looked at hypothesis testing and the examples were all one tailed. Hence why we look at 5% t-values.

Confidence intervals are an interval between 2 numbers, and thus the tail is divided between 2, with 2.5% in each tail , leaving 95% in the middle.

This is the same with all distributions that we have covered (t, z, chi).

It's all down to whether it is one-tailed or two-tailed.

# data[].attributes.body
How do you know the difference between a one and two tailed test?

Answer:

A one-tailed test will always be less than or more than.

Whereas a two tailed will be it is equal to (same) and it is not equal to  (it is different from).

For example: They test to see if the mean is less than the claimed amount of 330 ml, would be a one-tailed lower tail test.

They test to see if the average cost has changed, would be a two-tailed test

# data[].attributes.body
When you re arrange to find the confidence interval, why is there alpha over 2?

Answer

Alpha represents the % of intervals that do not include the true population mean. With a 95% confidence interval, 95% of all possible intervals will include the true population mean but 5% will not. As confidence intervals has two tails (and upper and lower value) the 5% will be divided between the 2 tails, so that 2.5% of all confidence intervals will be too high and 2.5% will be too low.

# data[].attributes.headline
How do we read Z table values once we've calculated Z test value?

# data[].attributes.subject
How do we read Z table values once we've calculated Z test value?

# data[].attributes.body
Z value around parimeter. Probability of said values in the interior.

# data[].attributes.body
Would it be possible to upload a tutorial on how to read distribution tables?

Answer

I will include some questions in the problem set that I will upload for hypothesis testing.

# data[].attributes.headline
Large sample properties T1 W 11 - slutsky's theorem 

# data[].attributes.subject
Large sample properties T1 W 11 - slutsky's theorem 

# data[].attributes.body
Could you please explain briefly what Slutsky's theorem is used for? I don't understand it

Will we need to know it for our exam?

# data[].attributes.body
Feel free to correct.

You correct, but I realised there is an issue with the question, as it asks you to construct a confidence interval for the population mean, which is already given. Sorry.  The question should have said find a 90% confidence interval for the sample variance. My apologies. What you have found is a prediction for which 90% of sample means will fall between. If the question had given you the sample mean and you did what you did you would have obtained the correct answer.

I am going to change the version on moodle now.

# data[].attributes.body
Please feel free to correct

Answer:

You are very close to the correct answer. All the questions except for b(iii) are correct. There is a mistake in the last part of b(iii). You have correctly calculated the new conditional probabilities. However, there are two selections left, one of which (no more no less) needs be brand D. So you have a new binomial distribution for the second half that used P(D\A=2).

Hence, P(D=1\A=2) = 2C1*(8/21)*(13/21).

Checking your answer during the exam:
You can check your answer during the exam by also completing the question the other way around:

P(D=1 n A=2)
= P(D=1\A=2)*P(A=2)
= P(A=2\D=1)*P(D=1)

# data[].attributes.body
Did someone get the same results?

Also I’m stuck on part d) and e) of the question. Has anyone done it?

Answer:
Correct well done.

d)  the joint probability is the probability of both occuring.

P(x<=7 n Renewal (R))
= P(R\x<=7)*P(x<=7)
= 0.95*0.9489

e) I have explained it in the revision lecture. To do it you need to find the marginal probabilities or renewal and non-renewal.

P(R) = P(R n X<=7) + P(R n    8<=X<=10) + P(R n X<10)

P(Rbar) = 1 - P(R)

P(New contract when have non) = 0.1

Then you use these probabilities in a decision tree.

# data[].attributes.body
I'm not sure if this is correct I got different solutions. For part C I basically just followed the steps at the end of the PP from lecture 18

# data[].attributes.body
Problem solved! I'm going to leave it though in case it helps anyone

# data[].attributes.body
Answer:
a) Not strictly correct. Gold could increase in value and Silver could increase in value, but growth in gold > in silve. Alternatively, Gold could decrease in value and Silver could decrease, but Silver could decrease by a greater % than gold. (could also apply no change in price of another).

What is shows is the relative price of gold to silve has been increasing  over the period. You should also meantion the decline in the relative price of gold to silve in the GFC.

b) Partly correct, see answer below.

c) Partly correct, you should make the distinction between the population variance and sample varaince, and write these two equations. The answer below is good.

d) Correct well done.

# data[].attributes.body
Answer:
Reason for ( (n-1)/sigma^2)^2 being squared when taken outside.

Var(ax) = E(ax - E(ax))^2

Remeber E(ax) = aE(x), assuming a is an constant.   (try a summartion too see why)

= E( ax - aE(x))^2
Factorise a

= E [ a (x - E(x))]^2
= E [a^2   * (x-E(x))^2]
=a^2 E(x-E(x))^2
= a^2  Var(x)

Rule:
var(ax) = a^2 var(x)
when a = constant.

# data[].attributes.body
im not too sure but please correct me if I am wrong

# data[].attributes.headline
If the t value is between 2 values on the t distribution table would we round up or down?

# data[].attributes.subject
If the t value is between 2 values on the t distribution table would we round up or down?

# data[].attributes.body
Could you refer to a resource or explain when we would use the different statistical tests as a recap as I’m quite confused. Is it only t tests, z tests, chi squared tests?

Answer:

I have uploaded a sheet that may be helpful to moodle. Additionally, the example excersies may help.

In summary:

Tests of the Mean:
-   Populaiton Variance Known: Z
- Population Varaince Unkown (so by extension using sample variance): t.

(note if n large can use the Z to approximate the t).

Tests of the Varaince (1 pop):
- chi-squared.

Test of Variance (2 pop):
- F distribution.

Test of Proportion:
Assuming n = large, Z

# data[].attributes.body
How do you workout adjusted R?

Answer:

SSregression/SST

or
1- (SSresidual/SST)

See Q6 below

# data[].attributes.headline
Prob. Set 8 - Q5 Expectation & Variance (no answer provided on Moodle btw) 

# data[].attributes.subject
Prob. Set 8 - Q5 Expectation & Variance (no answer provided on Moodle btw) 

# data[].attributes.body
Could you please help me out with this one by checking it? I didn’t find a recording where you did this question so I don’t have the answer.

Answers to Q5 have now been uploaded to moodle.

I believe that one of the tutorials I went through this question, but not sure which one.

Well done for attempting, but the answers are incorrect. You have been asked to find expected profit. The initial £2000 is not profit so would not be  E(10x), but would rather be the cost of the project.
E(10x) = 10E(X)
= 10*(-10*0.6+25*0.4)

For the variance, E(X^2) is not equal to mu^2.

Rather E(X^2) = mu^2 + Var. (important rule btw)

To work the variance out, look at Q1 method.
remeber Var(10x) = 10^2 Var(x)

# data[].attributes.body
Hi, I don't really understand why the d.f numerator is 24.

I supposed the numerator was going to be 10-1 where 10 is the size of A and A would be x and 25-1 where 25 is the size of B and b would be my y. So I assumed that 9, 24 were gonna be v1, v2 respectively. Why is that not the case?

# data[].attributes.headline
for Q2a why do you use t test and not z? i got near enough the same answers but its probably wrong. i got 93.3

# data[].attributes.subject
for Q2a why do you use t test and not z? i got near enough the same answers but its probably wrong. i got 93.3

# data[].attributes.body
can someone lmk if thats still correct please thanks

# data[].attributes.body
I’ve seen both online and in your lecture notes different formulas for binomial distribution. Which one should I use and why are there different ones?

Answer:

They are both the same but just in different forms.

In the first one: P(xbar) means the probability of everything that is not x.

Whereas in the second: P is the probability of X therefore 1-P is the probability of everything that is not X.

Both of them the values are multiplied.

# data[].attributes.body
There is a t test where both the sample variance and the sample size are under a root

Whereas another formula only shows the root of the sample size on the denominator?

If you are given the sample variance then it is both under the root.

If you are given the sample standard deviation then it is only the sample size under the root.

As SD = sqrt(var)

# data[].attributes.body
Is this correct?

Answer:
a) correct
b) correct
c) method correct but wrong beta
d)incorrect. There is a significant (as reject h0: b1 = 0) positive relationship. The results suggest that as years of experience increase by 1 year, income increases by 2.96 £thousands  (or £2960) on average.

e) correct, well done. Could fleshout how can tell none constant variance (i.e. as shown by...)

# data[].attributes.body
Would you be able to clarify what conditions are needed to use binomial & poison distribution so we can distinguish in questions?

Thank you

Answer:
I have uploaded an image that summarises this to moodle

Binomial:
- Discrete outcomes (e.g. number balls' picked from bag).
- Discrete Events (e.g. picking balls' from a bag).
- Constant and independent probabilities (i.e. selection with replacement)

Poison:
- Discrete Outcomes (e.g. number of patients arriving)
- Continous events, i.e. across time and space (e.g. number of patients arriving in an hour). Ussually given an arrival rate/mean number of occurances in an interval.
- Constant and independent probabilities.

Hypergeometric:
- Discrete outcomes (e.g. number balls picked from bag).
- Discrete Events (e.g. picking balls from a bag).
- Non-Constant and dependent probabilities (i.e. selection without replacement)

Poisson Approximation of Binomial:
The Poisson distribution can be used to approximate the binomial under certain conditions: large number of evens (n = large), low probability of outcome (p = low). Rule of thumb: n = large, P(x)<0.05, np<7, can approximate binomial with a poisson.

Normal (Z) approximation of Binomial:
The normal distribution (Z distribution) can be used to approximate the binomial distribution if np>5 nP(1-p)>5.

# data[].attributes.body
These are some of the questions as others are for intermediate maths

Answer:
2b)i) incorrect. You have looked at any disease including Ony SD, so not just RD.

To calculate this you need to find the groups that include RD in them.
So RD, and both RD+SD

Therefore: (49+53+31+25+28+12)/400

ii) correct.
iii) Incorrect. P(RD) includes those with both RD and SD. The Same is true for SD.  Therefore P(RD) = P(just RD)+P(RDandSD)
while P(SD) = P(just SD)+P(RDandSD)

Therefore the correct probability is:
P(justRD)+P(justSD)+P(RDandSD).

Altertively, it can be calculated by 1- the alternative, i.e. 1 - P(neither) which you calculated in the first part.

iv) correct
v) correct

C)
if independent
P(RDnHigh) = P(RD)*P(high)
Therefore, you can find the marginal probabilities:
P(RD) =
P(H) =

multiply them, and see if the probability is the same as in the table. If it is then they are independent if it is not then it is dependent.

3 (i will assume all Z value read correctly from table)

a i) Incorrect notation. You have been given Xbar not MU (mu=population mean). Confidence intervals are construced around MU.

ii) correct assuming above part correct.
iii) same .

b) Correct apart from iii) where you need to state that y descrease by 1.5. You should state the direction and magnitude.

Haven't looked at other yet.

# data[].attributes.body
Could someone show how they did this question

# data[].attributes.body
1)What do the 'degrees of freedom' mean (represented in the table by 'v')?
2)How is this table different from other tables? (like the z-statistics one for example) I'm struggling to understand that what they show is different from one another.

# data[].attributes.body
I'm going over the lectures and I was wondering how much you would need to rope learn into memory - e.g for the Eexpectation Operations videos, you mention a few rules... Would you need to be able to show how these are derived when prompted, or is just being aware of how this works when you're shown/but not necessarily being able to showcase the 'proofs' adequate?

# data[].attributes.body
Feel free to correct

# data[].attributes.body
Is this correct? I am not sure how much was expected from d

Answers:
a) Good, but could be clearer on the point about ratio's measuring relative prices, and the interpretation based on that.

b) Correct, but should also make the point that two variables with the same varaibility but different means will have a different variance. If X is income measured in £100, Y is income measured in £1000; both being based on the same data but just measured in different units; Mean X > Mean Y, you will also find that Var(X)>Var(Y).
You have suggested this relationship in your answer on the part on the binomial.
It is important to be aware of this relationship when comparing variables with a different mean because a varaible may have a greater Varaince or Standard deviation, but has less overall varaibility due to the differences in the mean.

c) good.

d) Incorrect. This is related to part B. While the Standard deviation is smaller for apple, it is a greater % of the mean than it is for microsoft. The coefficient of variation (SD/mean) can be used to compare the varaibility of two varaibles when they have different means. CV apple = 3.06/116.67=0.02622. CV microsof = 5.43/213.37=0.02544. Therefore, microsoft stock prices show less varaibility than Apples.

If you were to invest £1000 in Microsoft, you would buy 4.686 stocks. You would find sd in the value of these stocks to be 0.02544*1000 = 25.44 (alternatively: 5.43*4.686=25.44).

If you were to invest £1000 in Apples, you would buy 8.571 stocks in apple. You would find the SD in the value of these stocks to be 0.02622*1000=26.2 (alt: 8.571*3.06 = 26.2)

For questions of relative variability use the coefficient of variation.