Question

You use random.randint to generate random numbers between 2 and 12 (inclusive), and get (a) 2...

You use random.randint to generate random numbers between 2 and 12 (inclusive), and get (a) 2 and then (b) 7. What is the information content of each of these two outcomes?

Homework Answers

Answer #1

Set of possible values=

No. of elements in

The Information Content of an outcome is given by

We can use logarithmic to base 2,e or 10 basing on our choice.

Here I have used base 2.

Hence the information content  

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Use the row of numbers shown below to generate 12 random numbers between 01 and 99....
Use the row of numbers shown below to generate 12 random numbers between 01 and 99. 03087, 11990, 31970, 68370, 63674, 11151, 27521, 83595 Starting at the beginning of the row, what are the first 12 numbers between 01 and 99 in the sample?
If you roll a die, you get one of the following numbers: 1, 2, 3, 4,...
If you roll a die, you get one of the following numbers: 1, 2, 3, 4, 5, 6. Each possibility occurs with equal probability of 1/6. The expected value of a dice roll is E(D)= 3.5 and the variance of a dice roll is Var(X) = 2.917. a) Suppose you roll a die and then add 1 to the roll to get a new random variable taking one of the following numbers: 2,3,4,5,6,7. What is the variance of this new...
In C language generate 1000 pseudo random numbers in the inclusive range [0..1000] , average them,...
In C language generate 1000 pseudo random numbers in the inclusive range [0..1000] , average them, find the variance, standard deviation, and send a message encoded using Morse code as a light encoded message with a SHA-1 hash.   
#5. You can find 20 RANDOM NUMBERS in a Table or you can generate them with...
#5. You can find 20 RANDOM NUMBERS in a Table or you can generate them with software like Excel. The Excel functions are “RAND” and “RANDBETWEEN”. With “Randbetween” you simply input how many numbers you want, the number of digits you want in your random number and the range of values you want those numbers to fall between. For example you may want twenty, 2-digit numbers that fall between 00 and 100 (like “34”). TWO CONSIDERATIONS: (1) You must systematically...
1.) Generate an array of 10 random numbers between 1 - 100 2.) Copy the array...
1.) Generate an array of 10 random numbers between 1 - 100 2.) Copy the array to a temp array 3.) Call each of the methods to sort (bubble, selection, insertion, quick, merge), passing it the array 4.) In-between the calls, you are going to refresh the array to the original numbers. 5.) Inside of each sorting method, you are going to obtain the nanoseconds time, before and after the method Subtract the before time from the after time to...
Write a script that will generate seven random integers in the range [-100:200] inclusive and then...
Write a script that will generate seven random integers in the range [-100:200] inclusive and then print the value of each integer and whether it is positive or negative and whether it is even or odd. An output from this program might be: -57 is negative and odd. 26 is positive and even. If zero is one of the random integers generated, remember that zero is even and neither negative or positive. Hint: even numbers are divisible by 2 with...
Generate 1000 random numbers between 0 and 1*Create a frequency table with the following Generate 1000...
Generate 1000 random numbers between 0 and 1*Create a frequency table with the following Generate 1000 random numbers between 0 and 1*Create a frequency table with the following bins 0, 0,1, 0.2, ..., 0.8, 0.9 , 1Find the expected value bins 0, 0,1, 0.2, ..., 0.8, 0.9 , 1Find the expected value
In C++ Write a simple program to generate random integers between X and Y and store...
In C++ Write a simple program to generate random integers between X and Y and store them in a file, one number per line. The user should input the number of elements to generate and the boundary numbers X and Y (e.g. the inputs 100, 0, 999 mean your program should generate a list of 100 integers with values between 0 and 999, inclusive).
Use R and the RANDBETWEEN(1,300) function to generate: a) 100 random numbers, b) 100 samples of...
Use R and the RANDBETWEEN(1,300) function to generate: a) 100 random numbers, b) 100 samples of size 5, and c) 100 samples of size 20. For each sample in parts (b) and (c), find the sample means. Create histograms for parts (a), (b) and (c). For part (a) use the random numbers (i.e. sample size 1), for parts (b) and (c) use the sample means to create the histograms. Copy and Paste just the histograms into your homework paper. Explain...
(1) Use ‘sample’ function to generate a vector of 100 random numbers that follows a multinomial...
(1) Use ‘sample’ function to generate a vector of 100 random numbers that follows a multinomial distribution with probability (0.1, 0.15, 0.3, 0.45). (2) Without using the ‘sample’ function, generate a vector of 100 random numbers that follows a multinomial distribution with probability (0.1, 0.15, 0.3, 0.45). (3) Calculate the probability for 2.5 < X < 9 in a Poisson distribution with the mean 6. (using R)
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT