A program for generating random numbers on a computer is to be tested. The program is instructed to generate 100 single-digit integers between 0 and 9. The frequencies of the observed integers were as follows. At the 0.05 level of significance, is there sufficient reason to believe that the integers are not being generated uniformly?
Integer | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Frequency | 8 | 9 | 7 | 8 | 11 | 12 | 6 | 12 | 13 | 14 |
(a) Find the test statistic. (Round your answer to two decimal
places.)
(ii) Find the p-value. (Round your answer to four decimal
places.)
A program for generating random numbers on a computer is to be tested. The program is...
1A) A large supermarket carries four qualities of ground beef. Customers are believed to purchase these four varieties with probabilities of 0.13, 0.16, 0.13, and 0.58, respectively, from the least to most expensive variety. A sample of 482 purchases resulted in sales of 46, 151, 88, and 197 of the respective qualities. Does this sample contradict the expected proportions? Use α = .05. (a) Find the test statistic. (Give your answer correct to two decimal places.) (b) Find the p-value....
PYTHON Write a program for playing a game with the computer. First, generate a random integer in the range of 6 through 9. This will be the computer’s pick. Then generate three random integers for the human player. These random integers are in the range of 1 through 10. If any of these three random integers is greater than the computer’s pick, the human player wins the game. Otherwise, the human player loses. You must use a for loop to...
This homework is an approach to generating random numbers. In this technique a seed value is used to construct a new (seemingly random) value in the following manner: The seed, s, is written down in n-bit binary. Several bit positions, called taps, are used to generate a feedback bit. Bit n-1 is always one of the taps. The feedback bit, f is the exclusive-or of the tap bit values The seed is shifted to the left...
Write a c++ program that reads numbers from the user, and prints a table showing how many times each digit appears in each number. The user should be able to enter more than one number to be tested for repeated digits. The program should terminate when the user enters a number that is less than 0. Here is a sample output: Enter a number (-1 to end this loop): 41271092 Digit: 0 1 2 3 4 5 6 7 8...
C++ exercise: Lottery Number Generator Design a program that generates a 7-digit lottery number. The program should have an Integer array with 7 elements. Write a loop that steps through the array, randomly generating a number in the range of 0 through 9 for each element. (Use the random function that was discussed in Chapter 6.) Then write another loop that displays the contents of the array.
A random sample of 50 consumers taste-tested a new snack food. Their responses (where 0 = do not like, I-like, 2 indifferent) are reproduced below. Complete parts a and b below. 2 0 01 1 22 0 2 00 ○в.zs | Ос State the conclusion for this hypothesis test. is not sufficient evidence at the α = 0.05 level of significance to conclude that the proportion of customers who do not like the snack food is Do not reject Ho...
PYTHON Stuck on this problem: Write a program for playing a game with the computer. First, generate a random integer in the range of 6 through 9. This will be the computer’s pick. Then generate three random integers for the human player. These random integers are in the range of 1 through 10. If any of these three random integers is greater than the computer’s pick, the human player wins the game. Otherwise, the human player loses. You must use...
use c++ language, keep it simple i am using code block Exercise#2: Arrays with Random Numbers Write a program that generates n random numbers as follows: Asks the user to input a positive integer n Asks the user to input the maximum value (say m) for the integers to be generated. Write a program that generates the n numbers in the range 0 to m. The program stores the generated numbers in an array A[ Asks the user to enter...
Please write a C++ program that will accept 3 integer numbers from the user, and output these 3 numbers in order, the sum, and the average of these 3 numbers. You must stop your program when the first number from the user is -7. Design Specifications: (1) You must use your full name on your output statements. (2) You must specify 3 prototypes in your program as follows: int max(int, int, int); // prototype to return maximum of 3 integers...
Excel was asked to generate 50 Poisson random numbers with mean λ = 5. x Frequency 0 1 1 1 2 4 3 7 4 7 5 8 6 10 7 3 8 3 9 4 10 1 11 1 (a) Calculate the sample mean. (Round your sample mean value to 2 decimal places.) Sample mean (b) Carry out the chi-square test at α = .05, combining end categories as needed to ensure that all expected frequencies are at least...