SlideShare una empresa de Scribd logo
1 de 21
Probability Question 6  Solutions
Part I: Shinobi has 16 ninja stars. Four (4) of them are red, five (5) of them are blue and seven (7) of them are black. If Shinobi had thrown 3 stars without replacing them, what would be the probability of the following? a)  What is the probability of at least 2 stars being black? b)  What is the probability of the third star being red?
Part I:   a) What is the probability of at least 2 stars beeing black? The colour of a succeeding star depends on the colour of the star previous to it. We call this  dependent probability   where the  outcome of the second step depends on the outcome of the first step . This is oppose to  independent probability  where the  outcome of the second step  does not  depend on the outcome of the first . The most efficient way to look at a problem like this visually is to draw a tree diagram.On the tree diagram, you would draw out all the possiblities in each step and then insert the probability for each outcome as shown in the next slide.
R Bl B R Bl B R Bl B R Bl B B 5 16 R Bl B R Bl B R Bl B R Bl B R 4 16 3 15 7 15 R Bl B R Bl B R Bl B R Bl B Bl 5 15 2 14 7 14 5 14 3 14 6 14 7 14 3 14 15 4 7 15 4 15 3 14 7 14 6 14 7 14 4 15 4 14 4 14 4 14 4 14 4 14 3 14 6 15 5 15 3 14 7 16 5 14 5 14 4 14 5 14 4 14 6 14 6 14 4 14 R = Red (4) B = Blue (5) Bl = Black (7)
Please note that where the Red, Blue, and Black start branching off individually they themselves are suppose to have branched off from the same initial spot like this: However, we did not have room on the slide to illustrate this at its best size. For this we apologize, but we hope it does not confuse you too much. R B Bl
R Bl B R Bl B R Bl B R Bl B B Look for the sequences where there are two (2) black stars. 5 16 R Bl B R Bl B R Bl B R Bl B R 4 16 3 15 7 15 R Bl B R Bl B R Bl B R Bl B Bl 5 15 2 14 7 14 5 14 3 14 6 14 7 14 3 14 15 4 7 15 4 15 3 14 7 14 6 14 7 14 4 15 4 14 4 14 4 14 4 14 4 14 3 14 6 15 5 15 3 14 7 16 5 14 5 14 4 14 5 14 4 14 6 14 6 14 4 14 5 14
For the probability of 2 black stars in a sequence look for the sequence of branches with at least 2 blacks. -Since it starts of being out of 16 stars, the denominator of the first branch is 16. As the stars aren't replaced, the denominator goes down one unit because of the star we took. -As you move down each branch you can calculate the probability of each sequence.  -Moving down the branch, you take the probability of each outcome in a sequence and multiply it by each other. -You the take that total and add it to the total of the other sequences that have 2 black
= = = = = = P( R , Bl, Bl) P( B , Bl, Bl) P(Bl, Bl, Bl) P(Bl, Bl,  B ) P(Bl, Bl,  R ) P(Bl,  B , Bl) P(Bl,  R , Bl) Calculating the probability of at least two stars being black... = = = = = = = = 4  7  6 16  15  14 (  ) (  ) (  ) 168 3360 (  ) 5  7  6 16  15  14 (  ) (  ) (  ) 7  6  5 16  15  14 (  ) (  ) (  ) 7  6  5 16  15  14 (  ) (  ) (  ) 7  6  4 16  15  14 (  ) (  ) (  ) 7  5  6 16  15  14 (  ) (  ) (  ) 7  4  6 16  15  14 (  ) (  ) (  ) (  ) 210 3360 168 3360 (  ) 168 3360 (  ) (  ) 210 3360 (  ) 210 3360 (  ) 210 3360
=  =  0.4% =  40% There is a  40% probability  that when three stars are thrown, at least two stars are black. 2  5 = + (  ) 210 3360 168 3360 (  ) + (  ) 210 3360 + 168 3360 (  ) (  ) 210 3360 + (  ) 210 3360 + + 168 3360 (  ) 1344 3360
Shinobi has 16 ninja stars. Four (4) of them are red, five (5) of them are blue and seven (7) of them are black. If Shinobi had thrown 3 stars without replacing them, what would be the probability of the following? b)  What is the probability of the third star being red?
This is again, dependent probability because the outcome of a star depends on the star preceeding it. We will be using another tree diagram to help you visualize the problem. We are looking for the probability of the third star being red.  In total, the number of stars we have is 16. That's 4 red, 5 blue, and 7 black.  Remember that as each star is taken, it is not replace.
R Bl B R Bl B R Bl B R Bl B B 5 16 R Bl B R Bl B R Bl B R Bl B R 4 16 3 15 7 15 R Bl B R Bl B R Bl B R Bl B Bl 2 14 7 14 5 14 3 14 6 14 7 14 3 14 15 4 7 15 4 15 3 14 7 14 6 14 7 14 4 15 4 14 4 14 4 14 4 14 4 14 3 14 6 15 5 15 3 14 7 16 5 14 5 14 4 14 5 14 4 14 6 14 6 14 4 14 5 14 Note: Look for the the sequences where the red is at the last branch. 5 15
When you are looking for the probability of the third star being red, you look for the sequences where the last branch has a red. -Since it starts of being out of 16 stars, the denominator of the first branch is 16. As the stars aren't replaced, the denominator goes down one unit because of the star we took. -As you move down each branch you can calculate the probability of each sequence.  -Moving down the branch, you take the probability of each outcome in a sequence and multiply it by each other. -You the take that total and add it to the total of the other sequences that have red for the last star.
Calculating the probability of the third star being red... P (  R ,  R ,  R ) P ( R ,  B ,  R ) P ( R , Bl,  R ) P ( B ,  R ,  R ) P ( B ,  B ,  R ) P ( B , Bl,  R ) P (Bl, Bl,  R ) P (Bl,  B ,  R ) P (Bl,  R ,  R ) = = = = = = = = = = = = = = = = = = 24 3360 (  ) 16  15  14 4  3  2 (  ) (  ) (  ) 4  5  3 16  15  14 (  ) (  ) (  ) 4  7  3 16  15  14 (  ) (  ) (  ) 5  4  3 16  15  14 (  ) (  ) (  ) 5  4  4 16  15  14 (  ) (  ) (  ) 5  7  4 16  15  14 (  ) (  ) (  ) 7  6  4 16  15  14 (  ) (  ) (  ) 7  5  4 16  15  14 (  ) (  ) (  ) 7  4  3 16  15  14 (  ) (  ) (  ) 60 3360 (  ) 84 3360 (  ) 60 3360 (  ) 80 3360 (  ) 140 3360 (  ) 168 3360 (  ) 140 3360 (  ) 84 3360 (  )
= = 0.25 = 25% 1 4 = 3360 840 24 3360 (  ) 60 3360 (  ) 84 3360 (  ) 60 3360 (  ) 80 3360 (  ) 140 3360 (  ) 168 3360 (  ) 140 3360 (  ) 84 3360 (  ) + + + + + + + + There is a 25% probability that the third star is red.
Part II: Shinobi has 16 ninja stars. Four (4) of them are red, five (5) of them are blue and seven (7) of them are black. 2 stars are thrown. If a blue star thrown, it is discarded and replaced with a red star. If a red star is thrown, it is discarded and replaced with a black star. If a black star is thrown, it is discarded and replaced with a blue star. What is the probability of the second star being thrown is blue?
What we know from the problem... This is a dependent probability because the outcome of the second star depends on the outcome of the second star. We also know that when a star is thrown: Blue  is replaced with  Red . Red   is replaced with   Black . Black  is replaced with   Blue . We will start off by drawing another tree diagram and insert the probability of each outcome. Remember, for this question we are looking for the  probability of the second star being blue .
R Bl B R R Bl B Bl R Bl B B 7 16 4 16 5 16 16 3 8 16 5 16 4 16 6 16 6 16 5 16 7 16 4 16 Note: look for the sequences where the second star is blue.
-Since we are looking for the probabilty of the second star being blue, we look at the tree diagram for the sequence where the second branch is blue. -There are 16 stars. The denominator of the probability fractions always stays 16 because the stars are being replaced. -Moving down the branch, you take the probability of each outcome in a sequence and multiply it by each other. -You the take that total and add it to the total of the other sequences that have the second star as blue.
Calculating the probability of the second star being blue... P ( R ,  B ) P (Bl,  B ) P ( B ,  B ) = = = = = = 4 (  ) 16 5 16 (  ) 256 20 (  ) 7 16 (  ) 6 16 (  ) 42 256 (  ) 16 5 (  ) 4 16 (  ) 256 20 (  )
= 82 256 = 0.3203 = 32.0% There is a 32% probability that the second star will be blue. = 256 20 (  ) 42 256 (  ) 256 20 (  ) + + 41 128

Más contenido relacionado

Destacado

Dr vipun - 12 food swaps that slash calories
Dr vipun - 12 food swaps that slash caloriesDr vipun - 12 food swaps that slash calories
Dr vipun - 12 food swaps that slash caloriesDr Vipun
 
Question 4 Solution
Question 4 SolutionQuestion 4 Solution
Question 4 SolutionShinobi
 
Challenger Mt 655 b 665bTECHstar CVT
Challenger Mt 655 b 665bTECHstar CVTChallenger Mt 655 b 665bTECHstar CVT
Challenger Mt 655 b 665bTECHstar CVTPartCatalogs Net
 
Massey ferguson MF 185MB parts catalog
Massey ferguson MF 185MB parts catalogMassey ferguson MF 185MB parts catalog
Massey ferguson MF 185MB parts catalogPartCatalogs Net
 
Challenger 4460 SPRAYER - (Aut trans) parts catalog
Challenger 4460 SPRAYER - (Aut trans) parts catalogChallenger 4460 SPRAYER - (Aut trans) parts catalog
Challenger 4460 SPRAYER - (Aut trans) parts catalogPartCatalogs Net
 
06 onderwijs opleiding_januarius
06 onderwijs opleiding_januarius06 onderwijs opleiding_januarius
06 onderwijs opleiding_januariusJoeri Januarius
 
Presentation grp1
Presentation grp1Presentation grp1
Presentation grp1rurkedu
 
Juncture Services & Work
Juncture Services & WorkJuncture Services & Work
Juncture Services & WorkJuncture
 
What Nobody's Telling You About Agile and DevOps
What Nobody's Telling You About Agile and DevOpsWhat Nobody's Telling You About Agile and DevOps
What Nobody's Telling You About Agile and DevOpsTasktop
 
Challenger Mt655 b 665b TECHstar
Challenger Mt655 b 665b TECHstarChallenger Mt655 b 665b TECHstar
Challenger Mt655 b 665b TECHstarPartCatalogs Net
 

Destacado (17)

Char publicitaire
Char publicitaireChar publicitaire
Char publicitaire
 
Dr vipun - 12 food swaps that slash calories
Dr vipun - 12 food swaps that slash caloriesDr vipun - 12 food swaps that slash calories
Dr vipun - 12 food swaps that slash calories
 
Balzer 2200, 2650
Balzer 2200, 2650Balzer 2200, 2650
Balzer 2200, 2650
 
Kontrak perkuliahan
Kontrak perkuliahanKontrak perkuliahan
Kontrak perkuliahan
 
Question 4 Solution
Question 4 SolutionQuestion 4 Solution
Question 4 Solution
 
Mechadrawteam
MechadrawteamMechadrawteam
Mechadrawteam
 
Sarigiannis_20p_web
Sarigiannis_20p_webSarigiannis_20p_web
Sarigiannis_20p_web
 
Challenger Mt 655 b 665bTECHstar CVT
Challenger Mt 655 b 665bTECHstar CVTChallenger Mt 655 b 665bTECHstar CVT
Challenger Mt 655 b 665bTECHstar CVT
 
Atjaunotā kristieši letton
Atjaunotā kristieši lettonAtjaunotā kristieši letton
Atjaunotā kristieši letton
 
Massey ferguson MF 185MB parts catalog
Massey ferguson MF 185MB parts catalogMassey ferguson MF 185MB parts catalog
Massey ferguson MF 185MB parts catalog
 
Challenger 4460 SPRAYER - (Aut trans) parts catalog
Challenger 4460 SPRAYER - (Aut trans) parts catalogChallenger 4460 SPRAYER - (Aut trans) parts catalog
Challenger 4460 SPRAYER - (Aut trans) parts catalog
 
06 onderwijs opleiding_januarius
06 onderwijs opleiding_januarius06 onderwijs opleiding_januarius
06 onderwijs opleiding_januarius
 
04 vanimpe
04 vanimpe04 vanimpe
04 vanimpe
 
Presentation grp1
Presentation grp1Presentation grp1
Presentation grp1
 
Juncture Services & Work
Juncture Services & WorkJuncture Services & Work
Juncture Services & Work
 
What Nobody's Telling You About Agile and DevOps
What Nobody's Telling You About Agile and DevOpsWhat Nobody's Telling You About Agile and DevOps
What Nobody's Telling You About Agile and DevOps
 
Challenger Mt655 b 665b TECHstar
Challenger Mt655 b 665b TECHstarChallenger Mt655 b 665b TECHstar
Challenger Mt655 b 665b TECHstar
 

Similar a Question 6 Solution

11 x1 t05 04 probability & counting techniques (2012)
11 x1 t05 04 probability & counting techniques (2012)11 x1 t05 04 probability & counting techniques (2012)
11 x1 t05 04 probability & counting techniques (2012)Nigel Simmons
 
11X1 T05 04 probability & counting techniques (2011)
11X1 T05 04 probability & counting techniques (2011)11X1 T05 04 probability & counting techniques (2011)
11X1 T05 04 probability & counting techniques (2011)Nigel Simmons
 
11 x1 t05 04 probability & counting techniques (2013)
11 x1 t05 04 probability & counting techniques (2013)11 x1 t05 04 probability & counting techniques (2013)
11 x1 t05 04 probability & counting techniques (2013)Nigel Simmons
 
12X1 T09 06 probability and counting techniques (2010)
12X1 T09 06 probability and counting techniques (2010)12X1 T09 06 probability and counting techniques (2010)
12X1 T09 06 probability and counting techniques (2010)Nigel Simmons
 
Permutation and combination
Permutation and combinationPermutation and combination
Permutation and combinationsarath4droid
 
Day 3 - Independent and Dependent Events.ppt
Day 3 - Independent and Dependent Events.pptDay 3 - Independent and Dependent Events.ppt
Day 3 - Independent and Dependent Events.pptJoyceNolos
 

Similar a Question 6 Solution (9)

11 x1 t05 04 probability & counting techniques (2012)
11 x1 t05 04 probability & counting techniques (2012)11 x1 t05 04 probability & counting techniques (2012)
11 x1 t05 04 probability & counting techniques (2012)
 
11X1 T05 04 probability & counting techniques (2011)
11X1 T05 04 probability & counting techniques (2011)11X1 T05 04 probability & counting techniques (2011)
11X1 T05 04 probability & counting techniques (2011)
 
11 x1 t05 04 probability & counting techniques (2013)
11 x1 t05 04 probability & counting techniques (2013)11 x1 t05 04 probability & counting techniques (2013)
11 x1 t05 04 probability & counting techniques (2013)
 
12X1 T09 06 probability and counting techniques (2010)
12X1 T09 06 probability and counting techniques (2010)12X1 T09 06 probability and counting techniques (2010)
12X1 T09 06 probability and counting techniques (2010)
 
Mouse multiple probability
Mouse multiple probabilityMouse multiple probability
Mouse multiple probability
 
Probability QA 5
Probability QA 5Probability QA 5
Probability QA 5
 
Math investigation (STARS)
Math investigation (STARS)Math investigation (STARS)
Math investigation (STARS)
 
Permutation and combination
Permutation and combinationPermutation and combination
Permutation and combination
 
Day 3 - Independent and Dependent Events.ppt
Day 3 - Independent and Dependent Events.pptDay 3 - Independent and Dependent Events.ppt
Day 3 - Independent and Dependent Events.ppt
 

Más de Shinobi

Question 3 Solution
Question 3 SolutionQuestion 3 Solution
Question 3 SolutionShinobi
 
Question 2 Solution
Question 2 SolutionQuestion 2 Solution
Question 2 SolutionShinobi
 
Question 6 Solution
Question 6 SolutionQuestion 6 Solution
Question 6 SolutionShinobi
 
Question 1 Solution
Question 1 SolutionQuestion 1 Solution
Question 1 SolutionShinobi
 
Question 5 Part B Solution
Question 5 Part B SolutionQuestion 5 Part B Solution
Question 5 Part B SolutionShinobi
 
Question 5 Part A Solution
Question 5 Part A SolutionQuestion 5 Part A Solution
Question 5 Part A SolutionShinobi
 

Más de Shinobi (6)

Question 3 Solution
Question 3 SolutionQuestion 3 Solution
Question 3 Solution
 
Question 2 Solution
Question 2 SolutionQuestion 2 Solution
Question 2 Solution
 
Question 6 Solution
Question 6 SolutionQuestion 6 Solution
Question 6 Solution
 
Question 1 Solution
Question 1 SolutionQuestion 1 Solution
Question 1 Solution
 
Question 5 Part B Solution
Question 5 Part B SolutionQuestion 5 Part B Solution
Question 5 Part B Solution
 
Question 5 Part A Solution
Question 5 Part A SolutionQuestion 5 Part A Solution
Question 5 Part A Solution
 

Último

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 

Último (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 

Question 6 Solution

  • 2. Part I: Shinobi has 16 ninja stars. Four (4) of them are red, five (5) of them are blue and seven (7) of them are black. If Shinobi had thrown 3 stars without replacing them, what would be the probability of the following? a) What is the probability of at least 2 stars being black? b) What is the probability of the third star being red?
  • 3. Part I: a) What is the probability of at least 2 stars beeing black? The colour of a succeeding star depends on the colour of the star previous to it. We call this dependent probability where the outcome of the second step depends on the outcome of the first step . This is oppose to independent probability where the outcome of the second step does not depend on the outcome of the first . The most efficient way to look at a problem like this visually is to draw a tree diagram.On the tree diagram, you would draw out all the possiblities in each step and then insert the probability for each outcome as shown in the next slide.
  • 4. R Bl B R Bl B R Bl B R Bl B B 5 16 R Bl B R Bl B R Bl B R Bl B R 4 16 3 15 7 15 R Bl B R Bl B R Bl B R Bl B Bl 5 15 2 14 7 14 5 14 3 14 6 14 7 14 3 14 15 4 7 15 4 15 3 14 7 14 6 14 7 14 4 15 4 14 4 14 4 14 4 14 4 14 3 14 6 15 5 15 3 14 7 16 5 14 5 14 4 14 5 14 4 14 6 14 6 14 4 14 R = Red (4) B = Blue (5) Bl = Black (7)
  • 5. Please note that where the Red, Blue, and Black start branching off individually they themselves are suppose to have branched off from the same initial spot like this: However, we did not have room on the slide to illustrate this at its best size. For this we apologize, but we hope it does not confuse you too much. R B Bl
  • 6. R Bl B R Bl B R Bl B R Bl B B Look for the sequences where there are two (2) black stars. 5 16 R Bl B R Bl B R Bl B R Bl B R 4 16 3 15 7 15 R Bl B R Bl B R Bl B R Bl B Bl 5 15 2 14 7 14 5 14 3 14 6 14 7 14 3 14 15 4 7 15 4 15 3 14 7 14 6 14 7 14 4 15 4 14 4 14 4 14 4 14 4 14 3 14 6 15 5 15 3 14 7 16 5 14 5 14 4 14 5 14 4 14 6 14 6 14 4 14 5 14
  • 7. For the probability of 2 black stars in a sequence look for the sequence of branches with at least 2 blacks. -Since it starts of being out of 16 stars, the denominator of the first branch is 16. As the stars aren't replaced, the denominator goes down one unit because of the star we took. -As you move down each branch you can calculate the probability of each sequence. -Moving down the branch, you take the probability of each outcome in a sequence and multiply it by each other. -You the take that total and add it to the total of the other sequences that have 2 black
  • 8. = = = = = = P( R , Bl, Bl) P( B , Bl, Bl) P(Bl, Bl, Bl) P(Bl, Bl, B ) P(Bl, Bl, R ) P(Bl, B , Bl) P(Bl, R , Bl) Calculating the probability of at least two stars being black... = = = = = = = = 4 7 6 16 15 14 ( ) ( ) ( ) 168 3360 ( ) 5 7 6 16 15 14 ( ) ( ) ( ) 7 6 5 16 15 14 ( ) ( ) ( ) 7 6 5 16 15 14 ( ) ( ) ( ) 7 6 4 16 15 14 ( ) ( ) ( ) 7 5 6 16 15 14 ( ) ( ) ( ) 7 4 6 16 15 14 ( ) ( ) ( ) ( ) 210 3360 168 3360 ( ) 168 3360 ( ) ( ) 210 3360 ( ) 210 3360 ( ) 210 3360
  • 9. = = 0.4% = 40% There is a 40% probability that when three stars are thrown, at least two stars are black. 2 5 = + ( ) 210 3360 168 3360 ( ) + ( ) 210 3360 + 168 3360 ( ) ( ) 210 3360 + ( ) 210 3360 + + 168 3360 ( ) 1344 3360
  • 10. Shinobi has 16 ninja stars. Four (4) of them are red, five (5) of them are blue and seven (7) of them are black. If Shinobi had thrown 3 stars without replacing them, what would be the probability of the following? b) What is the probability of the third star being red?
  • 11. This is again, dependent probability because the outcome of a star depends on the star preceeding it. We will be using another tree diagram to help you visualize the problem. We are looking for the probability of the third star being red. In total, the number of stars we have is 16. That's 4 red, 5 blue, and 7 black. Remember that as each star is taken, it is not replace.
  • 12. R Bl B R Bl B R Bl B R Bl B B 5 16 R Bl B R Bl B R Bl B R Bl B R 4 16 3 15 7 15 R Bl B R Bl B R Bl B R Bl B Bl 2 14 7 14 5 14 3 14 6 14 7 14 3 14 15 4 7 15 4 15 3 14 7 14 6 14 7 14 4 15 4 14 4 14 4 14 4 14 4 14 3 14 6 15 5 15 3 14 7 16 5 14 5 14 4 14 5 14 4 14 6 14 6 14 4 14 5 14 Note: Look for the the sequences where the red is at the last branch. 5 15
  • 13. When you are looking for the probability of the third star being red, you look for the sequences where the last branch has a red. -Since it starts of being out of 16 stars, the denominator of the first branch is 16. As the stars aren't replaced, the denominator goes down one unit because of the star we took. -As you move down each branch you can calculate the probability of each sequence. -Moving down the branch, you take the probability of each outcome in a sequence and multiply it by each other. -You the take that total and add it to the total of the other sequences that have red for the last star.
  • 14. Calculating the probability of the third star being red... P ( R , R , R ) P ( R , B , R ) P ( R , Bl, R ) P ( B , R , R ) P ( B , B , R ) P ( B , Bl, R ) P (Bl, Bl, R ) P (Bl, B , R ) P (Bl, R , R ) = = = = = = = = = = = = = = = = = = 24 3360 ( ) 16 15 14 4 3 2 ( ) ( ) ( ) 4 5 3 16 15 14 ( ) ( ) ( ) 4 7 3 16 15 14 ( ) ( ) ( ) 5 4 3 16 15 14 ( ) ( ) ( ) 5 4 4 16 15 14 ( ) ( ) ( ) 5 7 4 16 15 14 ( ) ( ) ( ) 7 6 4 16 15 14 ( ) ( ) ( ) 7 5 4 16 15 14 ( ) ( ) ( ) 7 4 3 16 15 14 ( ) ( ) ( ) 60 3360 ( ) 84 3360 ( ) 60 3360 ( ) 80 3360 ( ) 140 3360 ( ) 168 3360 ( ) 140 3360 ( ) 84 3360 ( )
  • 15. = = 0.25 = 25% 1 4 = 3360 840 24 3360 ( ) 60 3360 ( ) 84 3360 ( ) 60 3360 ( ) 80 3360 ( ) 140 3360 ( ) 168 3360 ( ) 140 3360 ( ) 84 3360 ( ) + + + + + + + + There is a 25% probability that the third star is red.
  • 16. Part II: Shinobi has 16 ninja stars. Four (4) of them are red, five (5) of them are blue and seven (7) of them are black. 2 stars are thrown. If a blue star thrown, it is discarded and replaced with a red star. If a red star is thrown, it is discarded and replaced with a black star. If a black star is thrown, it is discarded and replaced with a blue star. What is the probability of the second star being thrown is blue?
  • 17. What we know from the problem... This is a dependent probability because the outcome of the second star depends on the outcome of the second star. We also know that when a star is thrown: Blue is replaced with Red . Red is replaced with Black . Black is replaced with Blue . We will start off by drawing another tree diagram and insert the probability of each outcome. Remember, for this question we are looking for the probability of the second star being blue .
  • 18. R Bl B R R Bl B Bl R Bl B B 7 16 4 16 5 16 16 3 8 16 5 16 4 16 6 16 6 16 5 16 7 16 4 16 Note: look for the sequences where the second star is blue.
  • 19. -Since we are looking for the probabilty of the second star being blue, we look at the tree diagram for the sequence where the second branch is blue. -There are 16 stars. The denominator of the probability fractions always stays 16 because the stars are being replaced. -Moving down the branch, you take the probability of each outcome in a sequence and multiply it by each other. -You the take that total and add it to the total of the other sequences that have the second star as blue.
  • 20. Calculating the probability of the second star being blue... P ( R , B ) P (Bl, B ) P ( B , B ) = = = = = = 4 ( ) 16 5 16 ( ) 256 20 ( ) 7 16 ( ) 6 16 ( ) 42 256 ( ) 16 5 ( ) 4 16 ( ) 256 20 ( )
  • 21. = 82 256 = 0.3203 = 32.0% There is a 32% probability that the second star will be blue. = 256 20 ( ) 42 256 ( ) 256 20 ( ) + + 41 128