Write a function N=countequal(G,T) that duplicates the action of hist(G,T) in Example 1.47.
Example 1.47
Simulate the testing of 100 microprocessors as described in Example 1.43. Your output should be a 4 × 1 vector X such that Xi is the number of grade i microprocessors.
Example 1.43
Keep in mind that by the extended definition of the multinomial coefficient, P[S v, f,m] is nonzero only if v, f , and m are nonnegative integers such that v + f + m = 100. Continuingwith Example 1.37, suppose in testing a microprocessor that all four grades have probability 0.25, independent of any other microprocessor. In testing n = 100 microprocessors, what is the probability of exactly 25 microprocessors of each grade?
Example 1.37
A chip fabrication facility produces microprocessors. Each microprocessor is tested and assigned a grade s ∈ S = {s0,...,s3}. A grade of sj indicates that the microprocessor will function reliably at a maximum clock rate of sj megahertz (MHz). In testing 10 microprocessors, we use xi to denote the grade of the ith microprocessor tested. Testing 10 microprocessors, for example, may produce an observation sequence