calculating conditional probability in Matlab
조회 수: 6 (최근 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!