Each member of a random sample of 16 business economists was asked to predict the rate of inflation for the coming year. Assume that the predictions for the whole population of business economists follow a normal distribution with standard deviation 2.1%
a. The probability is 0.10 that the sample standard deviation is bigger than what number?
b. The probability is 0.01 that the sample standard deviation is less than what number?
c. Find any pair of numbers such that the probability that the sample standard deviation that lies between these numbers is 0.975.
In: Math
Let Y be a random variable that represents the number of infants in a group of 4,000 who die from asthma in a year. In the United States, the probability that a child dies from an acute asthma attack in a year is 0.0035.
a. What is the mean number of infants who would die in a group of this size?
b. What is the probability that at most four infants out of 4,000 die from asthma in a year?
c. What is the probability that between 6 and 10 infants out of 4,000 die from asthma in a year?
In: Math
Soccer League
Java homework assignment.
Below is the assignment brief.
It requires to have the necessary java classes created: 'Team', 'Game', 'Schedule', and 'Main'.
All attributes are private, and getters/setters are created.
The sample output should be as stated below.
Overview
It has been a brutally cold and snowy winter. None of your friends have wanted to play soccer. But now that spring has arrived, another season of the league can begin. Your challenge is to write a program that models a soccer league and keeps track of the season’s statistics. There are 4 teams in the league. Matchups are determined at random. 2 games are played every Tuesday, which allows every team to participate weekly. There is no set number of games per season. The season continues until winter arrives. The league is very temperature sensitive. Defenses are sluggish on hot days. Hotter days allow for the possibility of more goals during a game. If the temperature is freezing, no games are played that week. If there are 3 consecutive weeks of freezing temperatures, then winter has arrived, and the season is over.
Task
Write a program that models a soccer league and keeps track of the season’s statistics. Carefully consider what data should be stored in an array and what data should be stored in an Array List. Design classes with fields and methods based on the description of the league. You will also need a test class that contains the main method. All fields must be private. Provide any necessary getters and setters.
Team
Each team has a name. The program should also keep track of each team’s win-total, loss-total, tie total, total goals scored, and total goals allowed. Create an array of teams that the scheduler will manage. Print each team’s statistics when the season ends.
Game
In a game, it is important to note each team’s name, each team’s score, and the temperature that day. Number each game with an integer ID number. This number increases as each game are played. Keep track of every game played this season. This class stores an Array List of all games as a field. Your program should determine scores at random. The maximum number of goals any one team can score should increase proportionally with the temperature. But make sure these numbers are somewhat reasonable. When the season ends, print the statistics of each game. Print the hottest temperature and average temperature for the season.
Schedule
Accept user input through a JOptionPane or Scanner. While the application is running, ask the user to input a temperature. The program should not crash because of user input. If it is warm enough to play, schedule 2 games. Opponents are chosen at random. Make sure teams are not scheduled to play against themselves. If there are 3 consecutive weeks of freezing temperatures, the season is over.
Sample Output:
run:
Too cold to play.
Too cold to play.
Too cold to play.
Season is over
*********RESULTS*********
Team 1
Wins: 1, Losses: 1, Ties:0
Points Scored: 9, Points Allowed: 9
Team 2 Wins: 1, Losses: 1, Ties:0
Points Scored: 8, Points Allowed: 8
Team 3 Wins: 0, Losses: 1, Ties:1
Points Scored: 6, Points Allowed: 9
Team 4 Wins: 1, Losses: 0, Ties:1
Points Scored: 8, Points Allowed: 5
Game #1
Temperature: 90
Away Team: Team 2, 4
Home Team: Team 4, 7
Game #2
Temperature: 90
Away Team: Team 1, 8
Home Team: Team 3, 5
Game #3 Temperature: 35
Away Team: Team 1, 1
Home Team: Team 2, 4
Game #4
Temperature: 35
Away Team: Team 3, 1
Home Team: Team 4, 1
Hottest Temp: 90
Average Temp:62.5
In: Computer Science
2020 COS-241: DATA STRUCTURES
Problem 2: Simulation: The Tortoise and the Hare
DESCRIPTION
This project deals with the classic race between the tortoise and the hare. For this project, you be using random-number generation to move the creatures. To make things more interesting, the animals have to race up the side of a slippery mountain, which could cause them to lose ground. In this race either animal could win or there could be a tie with no clear winner.
The animals begin at "Square 1" of 70 squares. Each of the squares represents a position the animal can hold along the racetrack. The finish line is at Square 70. When an animal wins, a winning message of your choice should be posted. For example:
Yay! The rabbit won! He hops the fastest!
Woo-hooo! Slow and steady wins the race! Congratulations, turtle!
Tie score—no winner! Want to race again?
To start the race, print a message similar to:
Bang! Off they go!
There is a clock that ticks once per second. With each tick of the clock, your program should adjust the position of the animals according to the following rules:
|
Animal |
Move Type |
Percentage of the Time |
Actual Move |
|
Tortoise |
Fast Plod |
50% |
3 squares to the right |
|
Tortoise |
Slip |
20% |
6 squares to the left |
|
Tortoise |
Slow Plod |
30% |
1 squares to the right |
|
Hare |
Sleep |
20% |
No move at all |
|
Hare |
Big Hop |
20% |
9 squares to the right |
|
Hare |
Big Slip |
10% |
12 squares to the left |
|
Hare |
Small Hop |
30% |
1 square to the right |
|
Hare |
Small Slip |
20% |
2 squares to the left |
Keep track of the positions of the animals by using variables. If an animal slips, the lowest it can go is back to position 1. The highest it can go is to position 70 when it wins the race.
You will work with the percentages in the table above by generating a random integer current in the range
1≤ current ≤10.
For the tortoise, a "fast plod" is when 1≤ current ≤ 5, a "slip" when 6 ≤ current ≤ 7, or a "slow plod" 8 ≤ current ≤ 10. A similar approach would be used to set up the moves for the hare.
For each tick of the clock (each repetition of the loop), print a 70-position line showing the letter T in the tortoise’s position and the letter H in the hare’s position. If the two animals land on the same square, which may happen, the animals will bump. If this happens, print BUMP! at the current position.
After you print each line, check to see if either animal has landed on Square 70. If this happens, print a winning-type message.
It may make the simulation more interesting if you have users press any key after each iteration of the loop, so that they can see the movement of the animals.
DELIVERABLES
Your C++ source code with any header files
Your executable code
A document detailing how you will test your program that also includes screenshots of a few sample runs of your program.
An overview document giving the name of each file submitted and its purpose, as well as any discussion you have on implementing this program. If there are any problems with your program or it does not run or run as it is supposed to, please indicate that as well in this document.
please be original and dont really need to worry about taking screen shots as I will test it in visual studio
In: Computer Science
Rank these aqueous solutions from highest boiling point to lowest boiling point.
1 = highest boiling point; 4 = lowest boiling point
0.40 m C2H6O2
0.20 m Na3PO4
0.30 m KNO3
0.20 m C6H12O6
In: Chemistry
Given that the USA is twice as good at making clothing, and 4 times as good at making food as Vietnam and they trade, who wins, and who loses according to comparative advantage?
In: Finance
In the manufacturing process of automotive windshield glass, it is known that the average number of air bubbles found in a 1 [cm3] is 0.12. To detect the presence of bubbles in the crystal, samples of 10 [cm3] are analyzed. Assuming that the number of bubbles per cm3 follows a Poisson distribution and that this number is independent of one cm3 to another, it is requested
a) Calculate the probability that a 10 cm3 sample does not contain air bubbles
b) Calculate the minimum number of samples of 10 cm3 that must be examined so that it can be assured, with a probability of at least 0.99, that bubbles are present in them.
In: Statistics and Probability
In the manufacturing process of automotive windshield glass, it is known that the average number of air bubbles found in a 1 [cm3] is 0.12. To detect the presence of bubbles in the crystal, samples of 10 [cm3] are analyzed. Assuming that the number of bubbles per cm3 follows a Poisson distribution and that this number is independent of one cm3 to another, it is requested
a) Calculate the probability that a 10 cm3 sample does not contain air bubbles
b) Calculate the minimum number of samples of 10 cm3 that must be examined so that it can be assured, with a probability of at least 0.99, that bubbles are present in them.
In: Statistics and Probability
1.)
A distribution of values is normal with a mean of 200 and a
standard deviation of 27. From this distribution, you are drawing
samples of size 30.
Find the interval containing the middle-most 54% of sample
means:
Enter your answer using interval notation. In this
context, either inclusive [] or exclusive () intervals are
acceptable. Your numbers should be accurate to 1 decimal
places.
2.)
A fitness company is building a 20-story high-rise. Architects
building the high-rise know that women working for the company have
weights that are normally distributed with a mean of 143 lb and a
standard deviation of 29 lb, and men working for the company have
weights that are normally distributed with a mean of 165 lb and a
standard deviation or 33 lb. You need to design an elevator that
will safely carry 16 people. Assuming a worst case scenario of 16
male passengers, find the maximum total allowable weight if we want
a 0.975 probability that this maximum will not be exceeded when 16
males are randomly selected.
maximum weight = -lb (Round to the nearest pound.)
3.)
A population of values has a normal distribution with μ=188.6and
σ=18.4 You intend to draw a random sample of size n=193
Find the probability that a single randomly selected value is less
than 188.1.
P(X < 188.1) =
Find the probability that a sample of size n=193 is randomly
selected with a mean less than 188.1.
P(x¯ < 188.1) =
Enter your answers as numbers accurate to 4 decimal places.
4.)
Scores for a common standardized college aptitude test are
normally distributed with a mean of 501 and a standard deviation of
98. Randomly selected men are given a Test Prepartion Course before
taking this test. Assume, for sake of argument, that the test has
no effect.
If 1 of the men is randomly selected, find the probability that his
score is at least 546.2.
P(X > 546.2) = Round to 4 decimal
places.
If 17 of the men are randomly selected, find the probability that
their mean score is at least 546.2.
P(X¯ > 546.2) = Round to 4 decimal places.
If the random sample of 17 men does result in a mean score of
546.2, is there strong evidence to support the claim that the
course is actually effective?
In: Statistics and Probability
The U-Mart Supermarket is a convenience store company that has five store located in different location at UTM Skudai. At the end of each year, the management of the UTM wants to know the performance of the company. They have decided to use a computer program to help them in analyzing the company performance based on the total sales of each quarter in all stores. Develop a C program to perform this task using array and function based one following requirements.
Input:
The program should read in sales data from a text file.
The format of the input file for each line/record is as
follows:
first number is for the store branch code,
second number is the sales of the first quarter ,
third number is the sales of the second quarter,
fourth number is the sales of the o third quarter,
fifth number is the sales of the fourth quarter.
The following is an example of input file named “sales2015.txt”
containing sales data for the year 2019 for five stores.
11 940.80 490.10 960.60 670.50
12 710.90 570.30 170.60 310.60
13 360.70 160.30 300.60 870.60
14 480.50 490.40 910.70 720.55
15 340.30 320.30 140.60 570.70
Arrays:
The program should use array(s) to store the sales
data
Functions:
The program should have the following functions:
float highest_Sale(). This function should accept arrays
(representing sales) as one of its parameters. It should determine
the indices of row and column of a cell in the array
which has the highest sales.
void grandTotal_each_store(). This function should return the grand
total of sales for each stores throughout the year. It should
accept array (representing sales) as its parameters.
void Total_each_quarter(). This function should accept arrays and
the index of a column in the array (representing a quarter) as its
parameters. The function should return the total sales for the each
quarter.
Output:
The program should print out a report into a text file named
“report.txt”.
The report should include:
- The grand total of sales, over all stores sales, throughout the
year.
- The highest sales of all quarter. Print the store code and the highest sales.
- The total sales for each quarter of all store.
The following diagram is example of output file based on the
input given.
EXPECTED OUTPUT
Grand total of sales over all stores: RM xxxxx.xx
The highest quarter sales:
Store Code: 11
Quarter : 3
Sales: RM 960.60
Total sales by quarter:
Quarter Sales
----------- --------------
Quarter 1 RM 4474.10
Quarter 2 RM xxxx.xx
Quarter 3 RM xxxx.xx
Quarter 4 RM xxxx.xx
In: Computer Science