Consider the class
Use the pattern
We use the MATLAB procedure, which displays the essential patterns.
minvec3
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
E = A|~(B&C);
F = A|B|(Bc&Cc);
disp([E;F])
1 1 1 0 1 1 1 1 % Not equal
1 0 1 1 1 1 1 1
G = ~(A|B);
H = (Ac&C)|(Bc&C);
disp([G;H])
1 1 0 0 0 0 0 0 % Not equal
0 1 0 1 0 1 0 0
K = (A&B)|(A&C)|(B&C);
disp([A;K])
0 0 0 0 1 1 1 1 % A not contained in K
0 0 0 1 0 1 1 1
Use (1) minterm maps, (2) indicator functions (evaluated on minterms), (3) the m-procedure minvec3 and MATLAB logical operations to show that
We use the MATLAB procedure, which displays the essential patterns.
minvec3
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
E = (A&(B|Cc))|(Ac&B&C);
F = (A&((B&C)|Cc))|(Ac&B);
disp([E;F])
0 0 0 1 1 0 1 1 % E subset of F
0 0 1 1 1 0 1 1
G = A|(Ac&B&C);
H = (A&B)|(B&C)|(A&C)|(A&Bc&Cc);
disp([G;H])
0 0 0 1 1 1 1 1 % G = H
0 0 0 1 1 1 1 1
Minterms for the events
0.0168 0.0072 0.0252 0.0108
0.0392 0.0168 0.0588 0.0252
0.0672 0.0288 0.1008 0.0432
0.1568 0.0672 0.2352 0.1008
What is the probability that three or more of the events occur on a trial? Of exactly two? Of two or fewer?
We use mintable(4) and determine positions with correct number(s) of ones (number of occurrences). An alternate is to use minvec4 and express the Boolean combinations which give the correct number(s) of ones.
npr02_04
Minterm probabilities are in pm. Use mintable(4)
a = mintable(4);
s = sum(a); % Number of ones in each minterm position
P1 = (s>=3)*pm' % Select and add minterm probabilities
P1 = 0.4716
P2 = (s==2)*pm'
P2 = 0.3728
P3 = (s<=2)*pm'
P3 = 0.5284
Minterms for the events
0.0216 0.0324 0.0216 0.0324 0.0144 0.0216 0.0144 0.0216
0.0144 0.0216 0.0144 0.0216 0.0096 0.0144 0.0096 0.0144
0.0504 0.0756 0.0504 0.0756 0.0336 0.0504 0.0336 0.0504
0.0336 0.0504 0.0336 0.0504 0.0224 0.0336 0.0224 0.0336
What is the probability that three or more of the events occur on a trial? Of exactly four? Of three or fewer? Of either two or four?
We use mintable(5) and determine positions with correct number(s) of ones (number of occurrences).
npr02_05
Minterm probabilities are in pm. Use mintable(5)
a = mintable(5);
s = sum(a); % Number of ones in each minterm position
P1 = (s>=3)*pm' % Select and add minterm probabilities
P1 = 0.5380
P2 = (s==4)*pm'
P2 = 0.1712
P3 = (s<=3)*pm'
P3 = 0.7952
P4 = ((s==2)|(s==4))*pm'
P4 = 0.4784
Suppose
Then determine
% file npr02_06.m % Data file
% Data for Exercise 6
minvec3
DV = [A|Ac; A|(Bc&C); A&C; Ac&B; Ac&Cc; B&Cc];
DP = [1 0.65 0.20 0.25 0.25 0.30];
TV = [((A&Cc)|(Ac&C))&Bc; ((A&Bc)|Ac)&Cc; Ac&(B|Cc)];
disp('Call for mincalc')
npr02_06 % Call for data
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.3000 % The first and third target probability
3.0000 0.3500 % is calculated. Check with minterm map.
The number of minterms is 8
The number of available minterms is 4
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
Suppose
% file npr02_07.m
% Data for Exercise 7
minvec3
DV = [A|Ac; ((A&Bc)|(Ac&B))&C; A&B; Ac&Cc; A; C; A&Bc&Cc];
DP = [ 1 0.4 0.2 0.3 0.6 0.5 0.1];
TV = [(Ac&Cc)|(A&C); ((A&Bc)|Ac)&Cc; Ac&(B|Cc)];
disp('Call for mincalc')
npr02_07 % Call for data
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.7000 % All target probabilities calculable
2.0000 0.4000 % even though not all minterms are available
3.0000 0.4000
The number of minterms is 8
The number of available minterms is 6
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
Suppose
and
Determine
% file npr02_08.m
% Data for Exercise 8
minvec3
DV = [A|Ac; A; C; A&C; Ac&B; Ac&Bc&Cc];
DP = [ 1 0.6 0.4 0.3 0.2 0.1];
TV = [(A|B)&Cc; (A&Cc)|(Ac&C); (A&Cc)|(Ac&B)];
disp('Call for mincalc')
npr02_08 % Call for data
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.5000 % All target probabilities calculable
2.0000 0.4000 % even though not all minterms are available
3.0000 0.5000
The number of minterms is 8
The number of available minterms is 4
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
Suppose
Determine
Then repeat with additional data
% file npr02_09.m
% Data for Exercise 9
minvec3
DV = [A|Ac; A; A&B; A&C; A&B&Cc];
DP = [ 1 0.5 0.3 0.3 0.1];
TV = [A&(~(B&Cc)); (A&B)|(A&C)|(B&C)];
disp('Call for mincalc')
% Modification for part 2
% DV = [DV; Ac&Bc&Cc; Ac&B&C];
% DP = [DP 0.1 0.05];
npr02_09 % Call for data
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.4000 % Only the first target probability calculable
The number of minterms is 8
The number of available minterms is 4
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
DV = [DV; Ac&Bc&Cc; Ac&B&C]; % Modification of data
DP = [DP 0.1 0.05];
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.4000 % Both target probabilities calculable
2.0000 0.4500 % even though not all minterms are available
The number of minterms is 8
The number of available minterms is 6
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
Given:
Determine
% file npr02_10.m
% Data for Exercise 10
minvec4
DV = [A|Ac; A; Ac&Bc; A&Cc; A&C&Dc];
DP = [1 0.6 0.2 0.4 0.1];
TV = [(Ac&B)|(A&(Cc|D))];
disp('Call for mincalc')
npr02_10
Variables are A, B, C, D, Ac, Bc, Cc, Dc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.7000 % Checks with minterm map solution
The number of minterms is 16
The number of available minterms is 0
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
A survey of a represenative group of students yields the following information:
% file npr02_11.m
% Data for Exercise 11
% A = male; B = on campus; C = active in sports
minvec3
DV = [A|Ac; A; B; A|C; B&Cc; A&B&C; A&Bc; A&Cc];
DP = [ 1 0.52 0.85 0.78 0.30 0.32 0.08 0.17];
TV = [A&B; A&B&Cc; Ac&C];
disp('Call for mincalc')
npr02_11
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.4400
2.0000 0.1200
3.0000 0.2600
The number of minterms is 8
The number of available minterms is 8
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
A survey of 100 persons of voting age reveals that 60 are male, 30 of whom do not identify with a political party; 50 are members of a political party; 20 nonmembers of a party voted in the last election, 10 of whom are female. How many nonmembers of a political party did not vote? Suggestion Express the numbers as a fraction, and treat as probabilities.
% file npr02_12.m
% Data for Exercise 12
% A = male; B = party member; C = voted last election
minvec3
DV = [A|Ac; A; A&Bc; B; Bc&C; Ac&Bc&C];
DP = [ 1 0.60 0.30 0.50 0.20 0.10];
TV = [Bc&Cc];
disp('Call for mincalc')
npr02_12
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.3000
The number of minterms is 8
The number of available minterms is 4
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
During a period of unsettled weather, let A be the event of rain in Austin, B be the event of rain in Houston, and C be the event of rain in San Antonio. Suppose:
% file npr02_13.m
% Data for Exercise 13
% A = rain in Austin; B = rain in Houston;
% C = rain in San Antonio
minvec3
DV = [A|Ac; A&B; A&Bc; A&C; (A&Bc)|(Ac&B); B&C; Bc&C; Ac&Bc&Cc];
DP = [ 1 0.35 0.15 0.20 0.45 0.30 0.05 0.15];
TV = [A&B&C; (A&B&Cc)|(A&Bc&C)|(Ac&B&C); (A&Bc&Cc)|(Ac&B&Cc)|(Ac&Bc&C)];
disp('Call for mincalc')
npr02_13
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.2000
2.0000 0.2500
3.0000 0.4000
The number of minterms is 8
The number of available minterms is 8
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
One hundred students are questioned about their course of study and
plans for graduate study. Let
There are 55 men students; 23 engineering students, 10 of whom are women; 75 students will take foreign language classes, including all of the women; 26 men and 19 women plan graduate study; 13 male engineering students and 8 women engineering students plan graduate study; 20 engineering students will take a foreign language and plan graduate study; 5 non engineering students plan graduate study but no foreign language courses; 11 non engineering, women students plan foreign language study and graduate study.
% file npr02_14.m
% Data for Exercise 14
% A = male; B = engineering;
% C = foreign language; D = graduate study
minvec4
DV = [A|Ac; A; B; Ac&B; C; Ac&C; A&D; Ac&D; A&B&D; ...
Ac&B&D; B&C&D; Bc&Cc&D; Ac&Bc&C&D];
DP = [1 0.55 0.23 0.10 0.75 0.45 0.26 0.19 0.13 0.08 0.20 0.05 0.11];
TV = [C&D; Ac&Dc; A&((C&Dc)|(Cc&D))];
disp('Call for mincalc')
npr02_14
Variables are A, B, C, D, Ac, Bc, Cc, Dc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.3900
2.0000 0.2600 % Third target probability not calculable
The number of minterms is 16
The number of available minterms is 4
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
A survey of 100 students shows that: 60 are men students; 55 students live on campus, 25 of whom are women; 40 read the student newspaper regularly, 25 of whom are women; 70 consider themselves reasonably active in student affairs—50 of these live on campus; 35 of the reasonably active students read the newspaper regularly; All women who live on campus and 5 who live off campus consider themselves to be active; 10 of the on-campus women readers consider themselves active, as do 5 of the off campus women; 5 men are active, off-campus, non readers of the newspaper.
% file npr02_15.m
% Data for Exercise 15
% A = men; B = on campus; C = readers; D = active
minvec4
DV = [A|Ac; A; B; Ac&B; C; Ac&C; D; B&D; C&D; ...
Ac&B&D; Ac&Bc&D; Ac&B&C&D; Ac&Bc&C&D; A&Bc&Cc&D];
DP = [1 0.6 0.55 0.25 0.40 0.25 0.70 0.50 0.35 0.25 0.05 0.10 0.05 0.05];
TV = [A&D&(Cc|Bc); A&Dc&Cc];
disp('Call for mincalc')
npr02_15
Variables are A, B, C, D, Ac, Bc, Cc, Dc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.3000
2.0000 0.2500
The number of minterms is 16
The number of available minterms is 8
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
A television station runs a telephone survey to determine how many persons in its primary viewing area have watched three recent special programs, which we call a, b, and c. Of the 1000 persons surveyed, the results are:
221 have seen at least a; 209 have seen at least b; 112 have seen at least c; 197 have seen at least two of the programs; 45 have seen all three; 62 have seen at least a and c; the number having seen at least a and b is twice as large as the number who have seen at least b and c.
% file npr02_16.m
% Data for Exercise 16
minvec3
DV = [A|Ac; A; B; C; (A&B)|(A&C)|(B&C); A&B&C; A&C; (A&B)-2*(B&C)];
DP = [ 1 0.221 0.209 0.112 0.197 0.045 0.062 0];
TV = [A|B|C; (A&Bc&Cc)|(Ac&B&Cc)|(Ac&Bc&C)];
npr02_16
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.3000
2.0000 0.1030
The number of minterms is 8
The number of available minterms is 8
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
An automobile safety inspection station found that in 1000 cars tested:
% file npr02_17.m
% Data for Exercise 17
% A = alignment; B = brake work; C = headlight
minvec3
DV = [A|Ac; A&B&C; (A&B)|(A&C)|(B&C); B&C; A ];
DP = [ 1 0.100 0.325 0.125 0.550];
TV = [A&Bc&Cc; Ac&(~(B&C))];
disp('Call for mincalc')
npr02_17
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.2500
2.0000 0.4250
The number of minterms is 8
The number of available minterms is 3
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
Suppose
Determine
Repeat the problem with the additional data
% file npr02_18.m
% Date for Exercise 18
minvec3
DV = [A|Ac; A&(B|C); Ac; Ac&Bc&Cc];
DP = [ 1 0.3 0.6 0.1];
TV = [B|C; (((A&B)|(Ac&Bc))&Cc)|(A&C); Ac&(B|Cc)];
disp('Call for mincalc')
% Modification
% DV = [DV; Ac&B&C; Ac&B];
% DP = [DP 0.2 0.3];
npr02_18
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.8000
2.0000 0.4000
The number of minterms is 8
The number of available minterms is 2
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
DV = [DV; Ac&B&C; Ac&B]; % Modified data
DP = [DP 0.2 0.3];
mincalc % New calculation
Data vectors are linearly independent
Computable target probabilities
1.0000 0.8000
2.0000 0.4000
3.0000 0.4000
The number of minterms is 8
The number of available minterms is 5
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
A computer store sells computers, monitors, printers. A customer enters the store. Let A, B, C be the respective events the customer buys a computer, a monitor, a printer. Assume the following probabilities:
% file npr02_19.m
% Data for Exercise 19
% A = computer; B = monitor; C = printer
minvec3
DV = [A|Ac; A&B; A&B&Cc; A&C; B&C; (A&Cc)|(Ac&C); ...
(A&Bc)|(Ac&B); (B&Cc)|(Bc&C)];
DP = [1 0.49 0.17 0.45 0.39 0.50 0.43 0.43];
TV = [A; B; C; (A&B&Cc)|(A&Bc&C)|(Ac&B&C); (A&B)|(A&C)|(B&C); A&B&C];
disp('Call for mincalc')
npr02_19
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.8000
2.0000 0.6100
3.0000 0.6000
4.0000 0.3700
5.0000 0.6900
6.0000 0.3200
The number of minterms is 8
The number of available minterms is 8
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
Data are
Determine
Repeat, with the additional data
% file npr02_20.m
% Data for Exercise 20
minvec3
DV = [A|Ac; A; B; A&B&C; A&C; (A&B)|(A&C)|(B&C); B&C - 2*(A&C)];
DP = [ 1 0.232 0.228 0.045 0.062 0.197 0];
TV = [A|B|C; Ac&Bc&Cc];
disp('Call for mincalc')
% Modification
% DV = [DV; C];
% DP = [DP 0.230 ];
npr02_20
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
mincalc
Data vectors are linearly independent
Data probabilities are INCONSISTENT
The number of minterms is 8
The number of available minterms is 6
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
disp(PMA)
2.0000 0.0480
3.0000 -0.0450 % Negative minterm probabilities indicate
4.0000 -0.0100 % inconsistency of data
5.0000 0.0170
6.0000 0.1800
7.0000 0.0450
DV = [DV; C];
DP = [DP 0.230];
mincalc
Data vectors are linearly independent
Data probabilities are INCONSISTENT
The number of minterms is 8
The number of available minterms is 8
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
Data are:
if computable:
With only six items of data (including
% file npr02_21.m
% Data for Exercise 21
minvec3
DV = [A|Ac; A; A&B; A&B&C; C; Ac&Cc];
DP = [ 1 0.4 0.3 0.25 0.65 0.3 ];
TV = [(A&Cc)|(Ac&C); Ac&Bc; A|B; A&Bc];
disp('Call for mincalc')
% Modification
% DV = [DV; Ac&B&Cc; Ac&Bc];
% DP = [DP 0.1 0.3 ];
npr02_21
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.3500
4.0000 0.1000
The number of minterms is 8
The number of available minterms is 4
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
DV = [DV; Ac&B&Cc; Ac&Bc];
DP = [DP 0.1 0.3 ];
mincalc
Data vectors are linearly independent
Computable target probabilities
1.0000 0.3500
2.0000 0.3000
3.0000 0.7000
4.0000 0.1000
The number of minterms is 8
The number of available minterms is 8
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
Repeat Exercise 21 with
% file npr02_22.m
% Data for Exercise 22
minvec3
DV = [A|Ac; A; A&B; A&B&C; C; Ac&Cc];
DP = [ 1 0.4 0.5 0.25 0.65 0.3 ];
TV = [(A&Cc)|(Ac&C); Ac&Bc; A|B; A&Bc];
disp('Call for mincalc')
% Modification
% DV = [DV; Ac&B&Cc; Ac&Bc];
% DP = [DP 0.1 0.3 ];
npr02_22
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are linearly independent
Data probabilities are INCONSISTENT
The number of minterms is 8
The number of available minterms is 4
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
disp(PMA)
4.0000 -0.2000
5.0000 0.1000
6.0000 0.2500
7.0000 0.2500
DV = [DV; Ac&B&Cc; Ac&Bc];
DP = [DP 0.1 0.3 ];
mincalc
Data vectors are linearly independent
Data probabilities are INCONSISTENT
The number of minterms is 8
The number of available minterms is 8
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
disp(PMA)
0 0.2000
1.0000 0.1000
2.0000 0.1000
3.0000 0.2000
4.0000 -0.2000
5.0000 0.1000
6.0000 0.2500
7.0000 0.2500
Repeat Exercise 21 with the original data probability matrix, but with
% file npr02_23.m
% Data for Exercise 23
minvec3
DV = [A|Ac; A; A&C; A&B&C; C; Ac&Cc];
DP = [ 1 0.4 0.3 0.25 0.65 0.3 ];
TV = [(A&Cc)|(Ac&C); Ac&Bc; A|B; A&Bc];
disp('Call for mincalc')
% Modification
% DV = [DV; Ac&B&Cc; Ac&Bc];
% DP = [DP 0.1 0.3 ];
npr02_23
Variables are A, B, C, Ac, Bc, Cc
They may be renamed, if desired.
Call for mincalc
mincalc
Data vectors are NOT linearly independent
Warning: Rank deficient, rank = 5 tol = 5.0243e-15
Computable target probabilities
1.0000 0.4500
The number of minterms is 8
The number of available minterms is 2
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA
DV = [DV; Ac&B&Cc; Ac&Bc];
DP = [DP 0.1 0.3 ];
mincalc
Data vectors are NOT linearly independent
Warning: Matrix is singular to working precision.
Computable target probabilities
1 Inf % Note that p(4) and p(7) are given in data
2 Inf
3 Inf
The number of minterms is 8
The number of available minterms is 6
Available minterm probabilities are in vector pma
To view available minterm probabilities, call for PMA