blob: e6be9a74b056241c94bf1596d7ddc87c97ed3626 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//Caption: Probability
//Example 2.2
//page no 43
//find the probability of getting 5
clc;
clear;
total_possibleoutcomes=6*6;
probabilityofeachoutcome=1/total_possibleoutcomes;//probability of each outcome
noofways=4; //ways of getting 5
probability=noofways*probabilityofeachoutcome;//probability of getting 5
disp(probability,"Probability of getting 5 is");
|