Professional Documents
Culture Documents
ASSIGNMENT
In finance, Bayes' Theorem can be used to rate the risk of lending money
to potential borrowers. The theorem is also called Bayes' Rule or Bayes'
Law and is the foundation of the field of Bayesian statistics.
Conditional property:
Conditional probability refers to the chances that some outcome
occurs given that another event has also occurred.
It is often stated as the probability of B given A and is written as
P(B|A), where the probability of B depends on that of A happening.
Conditional probability can be contrasted with unconditional
probability.
Probabilities are classified as either conditional, marginal, or joint.
Bayes' theorem is a mathematical formula used in calculating
conditional probability.
If A and B are two events, then the conditional probability me be
designated as P(A given B) or P(A|B).
Conditional probability can be calculated from the joint
probability(A | B) = P(A, B) / P(B)
The conditional probability is not symmetrical; For example P(A |
B) != P(B | A).
P(A)= The probability of A occurring
P(B)= The probability of B occurring
P(A∣B)=The probability of A given B
P(B∣A)= The probability of B given A
P(A⋂B))= The probability of both A and B occurring
P(B ⋂ A) = P(A ⋂ B)
P(A ⋂ B) = P(A | B) P(B) = P(B | A) P(A)
This words might sound fancy but the underlying idea behind them is
really simple. You can always refer back to this section whenever you have
any doubts or reach out to me directly in the comments section below.
At the same time, only 35% of the companies that did not increase
their share price by more than 5% in the same period replaced
their CEOs. Knowing that the probability that the stock prices grow
by more than 5% is 4%, find the probability that the shares of a
company that fires its CEO will increase by more than 5%.
Before finding the probabilities, you must first define the notation
of the probabilities.
Thus, the probability that the shares of a company that replaces its
CEO will grow by more than 5% is 6.67%.
Plotting entropy(H) graph using Matlab codes:
The code is:
%Define a vector of probabilities
p = linspace (0.001,0.999, 1000) :
%Calculate the entropy for each probability
H = -p. *log2 (p) - (1-p).*log2 (1-p) ;
10
11
12
% Plot the entropy as a function of probability plot (p, H) ;
xlabel ('Probability');
ylabel (' Entropy (bits) ');
title ('Entropy vs. Probability');