mau22s06 numerical and data analysis techniques
play

MAU22S06 Numerical and data analysis techniques Slides by Mike - PowerPoint PPT Presentation

MAU22S06 Numerical and data analysis techniques Slides by Mike Peardon (2011) minor modifs. by S. Sint School of Mathematics Trinity College Dublin Hilary T erm 2019 Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 -


  1. MAU22S06 Numerical and data analysis techniques Slides by Mike Peardon (2011) minor modifs. by S. Sint School of Mathematics Trinity College Dublin Hilary T erm 2019 Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 1 / 96

  2. Probability Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 2 / 96

  3. Sample space Consider performing an experiment where the outcome is purely randomly determined and where the experiment has a set of possible outcomes. Sample Space A sample space, S associated with an experiment is a set such that: each element of S denotes a possible outcome O of the 1 experiment and performing the experiment leads to a result 2 corresponding to one element of S in a unique way. Example: flipping a coin - choose the sample space S = { H, T } corresponding to coin landing heads or tails. Not unique: choose the sample space S = { L } corresponding to coin just landing. Not very useful! Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 3 / 96

  4. Events Events An event, E can be defined for a sample space S if a question can be put that has an unambiguous answer for all outcomes in S . E is the subset of S for which the question is true. Example 1: T wo coin flips, with S = { HH, HT, TH, TT } . Define the event E 1T = { HT, TH } , which corresponds to one and only one tail landing. Example 2: T wo coin flips, with S = { HH, HT, TH, TT } . Define the event E ≥ 1T = { HT, TH, TT } , which corresponds to at least one tail landing. Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 4 / 96

  5. Probability measure Can now define a probability model , which consists of a sample space, S a collection of events (which are all subsets of S ) and a probability measure. Probability measure The probability measure assigns to each event E a probability P ( E ) , with the following properties: P ( E ) is a non-negative real number with 0 ≤ P ( E ) ≤ 1. 1 P ( ∅ ) = 0 (∅ is the empty set event). 2 P ( S ) = 1 and 3 P is additive , meaning that if E 1 , E 2 , . . . is a sequence of 4 disjoint events then P ( E 1 ∪ E 2 ∪ . . . ) = P ( E 1 ) + P ( E 2 ) + . . . T wo events are disjoint if they have no common outcomes Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 5 / 96

  6. Probability measure (2) Venn diagrams give a very useful way of visualising probability models. Example: E c ⊂ S is the complement to C E event E , and is the set of all outcomes NOT in E (ie E c = { x : x / E ∈ E } ). The probability of an event is visualised as the area of the region in the Venn S diagram. The intersection A ∩ B and union A ∪ B of two events can be depicted ... Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 6 / 96

  7. Probability measure (3) A B The intersection of ��������� ��������� ��������� ��������� two subsets A ⊂ S ��������� ��������� ��������� ��������� and B ⊂ S ��������� ��������� ��������� ��������� ��������� ��������� ��������� ��������� A ∩ B = { x : x ∈ A and x ∈ B } ��������� ��������� A B S A B ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� The union of two ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� subsets A ⊂ S and B ⊂ S ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� A ∪ B = { x : x ∈ A or x ∈ B } ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� ���������������� A B ���������������� ���������������� S Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 7 / 96

  8. Probability measure (4) The Venn diagram approach makes it easy to remember: P ( E c ) = 1 − P ( E ) P ( A ∪ B ) = P ( A ) + P ( B ) − P ( A ∩ B ) Also define the conditional probability P ( A | B ) , which is the probability event A occurs, given event B has occured. Since event B occurs with probability P ( B ) and both events A and B occur with probability P ( A ∩ B ) then the conditional probability P ( A | B ) can be computed from Conditional probability P ( A ∩ B ) P ( A | B ) = P ( B ) Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 8 / 96

  9. Conditional probability (1) Conditional probability describes situations when partial information about outcomes is given Example: coin tossing Three fair coins are flipped. What is the probability that the first coin landed heads given exactly two coins landed heads? S = { HHH, HHT, HTH, HTT, THH, THT, TTH, TTT } A = { HHH, HHT, HTH, HTT } and B = { HHT, HTH, THH } A ∩ B = { HHT, HTH } P ( A | B ) = P ( A ∩ B ) = 2 / 8 3 / 8 = 2 P ( B ) 3 Answer: 2 3 Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 9 / 96

  10. Conditional probability (2) Bayes’ theorem For two events A and B with P ( A ) > 0 and P ( B ) > 0 we have P ( A ) P ( A | B ) = P ( B | A ) P ( B ) Since P ( A | B ) = P ( A ∩ B ) /P ( B ) from conditional probability result, we see P ( A ∩ B ) = P ( B ) P ( A | B ) . switching A and B also gives P ( B ∩ A ) = P ( A ) P ( B | A ) . . . A ∩ B is the same as B ∩ A . . . Thomas Bayes so we get P ( A ) P ( B | A ) = P ( B ) P ( A | B ) and Bayes’ (1702-1761) theorem follows Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 10 / 96

  11. Partitions of state spaces Suppose we can completely partition S into n disjoint events, A 1 , A 2 , . . . A n , so S = A 1 ∪ A 2 ∪ · · · ∪ A n . Now for any event E , we find P ( E ) = P ( E | A 1 ) P ( A 1 ) + P ( E | A 2 ) P ( A 2 ) + . . . P ( E | A n ) P ( A n ) This result is seen by using the conditional probability theorem and additivity property of the probability measure. It can be remembered with the Venn diagram: A A A 2 4 5 E A A 1 3 S Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 11 / 96

  12. A sobering example With the framework built up so far, we can make powerful (and sometimes surprising) predictions... Diagnostic accuracy A new clinical test for swine flu has been devised that has a 95 % chance of finding the virus in an infected patient. Unfortunately, it has a 1 % chance of indicating the disease in a healthy patient (false positive). One person per 1 , 000 in the population is infected with swine flu. What is the probability that an individual patient diagnosed with swine flu by this method actually has the disease? Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 12 / 96

  13. A sobering example With the framework built up so far, we can make powerful (and sometimes surprising) predictions... Diagnostic accuracy A new clinical test for swine flu has been devised that has a 95 % chance of finding the virus in an infected patient. Unfortunately, it has a 1 % chance of indicating the disease in a healthy patient (false positive). One person per 1 , 000 in the population is infected with swine flu. What is the probability that an individual patient diagnosed with swine flu by this method actually has the disease? Answer: about 8.7% Slides by Mike Peardon (2011) minor modifs. by S. Sint (TCD) MAU22S06 - Data analysis Hilary T erm 2019 12 / 96

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend