calculating conditional probability in Matlab
7 次查看(过去 30 天)
显示 更早的评论
Q:
Rust Rider cars are produced in four factories. The first factory produces 380 cars per day, the second 260, the third 150, while the fourth 710. The refuse ratios for the factories are 4%; 9%; 8% and 9%, respectively.
1-What is the probability that we find a junk car?
2-We bought a Rust Rider and we found it perfect. What is the probability that it had been produced in the second factory?
is it possible to calculate such a probability questions in Matlab? if yes how can i do so?
0 个评论
回答(1 个)
Torsten
2022-10-16
编辑:Torsten
2022-10-16
These questions aim at exact results for the probabilities. So you must know the formulae how to calculate these probabilities. If you know them, you can use MATLAB for evaluation - but a usual table calculator will also do for this purpose.
If you were only interested in approximate values for the probabilities, you could use Monte-Carlo simulation as you did in your first question. But if you can deduce the design of the Monte-Carlo simulations, you can straight away give the exact answer for the probabilities.
So summarizing: MATLAB can be used, but is inappropriate for this application.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!