# Probability

Probability (at least probability in reading #8) is one of the few topics I am geniunely stuck on.

State of economy probability of economic state stock performance conditional probability stock performance

Good 0.30 Good 0.60

Neutral 0.30

Poor 0.10

Neutral 0.50 Good 0.30

Neutral 0.40

Poor 0.30

Poor 0.20 Good 0.10

Neutral 0.60

Poor 0.30

So here are some problems I am having a tough time figuring out:

#15.) “What is the conditional probability of having good stock performance in a poor economic environment?”

The book says the answer is 0.10, so,

0.10 = P(AB) / P(B)

#18.) “Given that the stock had good performance, the probability the state of the economy was good is closest to?”

This is a Bayes formula. Bayes formula is:** P(A | B) = [P(B | A) / P(B)] * P(A)**

However, when solving for the problem, the book solves for P(B | A) as (0.6)*(0.3), which seems to be the joint probability formula, not the conditional probability formula. Why is this?

I’ll bet it doesn’t.

Sloppy on my part. I erased that portion and revised my question to make it easier to understand. Sorry about that.

Two possibilities spring to mind:

1. It’s a typo.
2. The author’s an idiot.

In any case, let’s solve the problem.

P(A|B) = P(AB)/P(B)

Let’s let

• A = Economy is good
• B = Stock performance is good
• C = Economy is Neutral
• D = Economy is Poor

P(AB) = P(B|A)P(A) = 0.6 × 0.3 = 0.18

P(B) = P(BA) + P(BC) + P(BD)

= P(B|A)P(A) + P(B|C)P© + P(B|D)P(D)

= (0.6 × 0.3) + (0.3 × 0.5) + (0.1 × 0.2)

= 0.18 + 0.15 + 0.02 = 0.35

P(A|B) = 0.18 / 0.35 = 0.5143

Think about all the cases when stock performance can be good. It could be when economy is good, neutral or poor.

So Good economy + Good Stock performance Prob = 0.3 * 0.6 = 0.18

Neutral economy + Good Stock performance Prob = 0.5 * 0.3 = 0.15

Poor economy + good stock performance Prob = 0.2 * 0.1 = 0.02

So total Good = 0.35

Out of these what was it that the stock performed good when economy was Poor => 0.02

So Prob of a Poor env = 0.02 / 0.35

All quite true, but he was looking for P(_ good _ economy | good stock performance).
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://www.analystforum.com/t/probability/97924", "fetch_time": 1701298599000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2023-50/segments/1700679100146.5/warc/CC-MAIN-20231129204528-20231129234528-00674.warc.gz", "warc_record_offset": 748434189, "warc_record_length": 5425, "token_count": 694, "char_count": 2127, "score": 4.125, "int_score": 4, "crawl": "CC-MAIN-2023-50", "snapshot_type": "latest", "language": "en", "language_score": 0.9037718772888184, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00010-of-00064.parquet"}