blob: 20dae4c82fdaf3e6859b931a8e35ce3745f42f43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//Chapter 07: Discrete Probability
clc;
clear;
no_blue=4 //no of blue balls
no_red=5 //no of red balls
prob_blue=no_blue/(no_red+no_blue)
disp('The probability that a ball chosen at random will be blue is:')
disp(prob_blue)
|