Piston rings are mass-produced. The target internal diameter is
45mm but records show
that the diameters are normally distributed with mean 45mm and
standard deviation 0.05
mm. An acceptable diameter is one within the range 44.95 mm to
45.05 mm.
(i) What proportion of the output is unacceptable?
(ii) Above what diameter do the 40% largest diameters lie?
In: Statistics and Probability
A piston?cylinder device initially contains 1.5?kg saturated liquid water at 120°C. Now heat is transferred to the water until the volume increases 100 times.
Determine:
a. Initial Volume of the water.
b. Final volume of water.
c. Final state of water.
d. Amount of heat added to the water
e. Draw the T?s diagram
In: Mechanical Engineering
0.5 kg of R12 are contained in a piston/cylinder and has a quality of 75% and a temperature of 0 C. Heat is transferred at constant pressure until the R12 is a saturated vapor. Determine: a) the initial volume of the R12; b) the work done; c) the heat transfer; d) the T-v diagram.
Ans:
a) 0.0208 m3 b) 2.13 kJ c) 18.9 kJ
In: Mechanical Engineering
A 10 cm -diameter cylinder contains argon gas at 10 atm pressure and a temperature of 60 ∘C . A piston can slide in and out of the cylinder. The cylinder's initial length is 19 cm . 2600 J of heat are transferred to the gas, causing the gas to expand at constant pressure. 1-What is the final temperature of the cylinder? 2-What is the final length of the cylinder?
In: Physics
A weighted piston-cylinder device (pressure is not constant) initially contains 1.2 kg saturated liquid water at 190oC. Now heat is transferred to the water until the volume quadruples (increase four times) and the cylinder contains saturated vapor only. Determine: a) The final volume of the tank. b) The final temperature and pressure. c) The internal energy change of the water.
In: Mechanical Engineering
The propane is contained in a piston-cylinder assembly, which maintains constant pressure at 0.2 MPa. If a mixture with a quality of 0.65 and a total volume of 0.07 m3 is slowly heated to a temperature of 54°C, a) what was the total work into the system b) what was the total amount of heat added to the system.
Please explain what tables you use to find the answer.
In: Mechanical Engineering
Air within a piston–cylinder assembly, initially at 15 lbf/
in.2, 510°R, and a volume of 6 ft3, is
compressed isentropically to a final volume of 1.75
ft3.
Assuming the ideal gas model with k = 1.4 for the air,
determine the:
(a) mass, in lb.
(b) final pressure, in lbf/in.2
(c) final temperature, in °R.
(d) work, in Btu.
In: Other
C program simple version of blackjack following this design.
1. The basic rules of game
A deck of poker cards are used. For simplicity, we have
unlimited number of cards, so we can generate a random card without
considering which cards have already dealt. The game here is to
play as a player against the computer (the dealer). The aim of the
game is to accumulate a higher total of points than the dealer’s,
but without going over 21. The cards 2 to 10 have their face values
as points. J, Q, and K are10 points each, and the Ace is either 1
point or 11 points (player's choice). To simplify the matter, we
consider that the Ace is 11 points and we don’t have card J, Q, or
K unless you like to implement the option anyway.
a) Betting
The player first places a bet. Let’s assume the minimum bet is $10
and maximum = is $1000.
b) Each play will result in one of the following events for the player
c) The start of the game
At the start, the player and the dealer receive two cards each. The
player’s cards are normally dealt face up (displayed), while the
dealer has one face down (called the hole card) and one face up.
The best possible blackjack hand is an opening deal of an Ace with
any of the ten-point cards. This is called a "blackjack", or a
natural 21, and the player holding this automatically wins unless
the dealer also has a blackjack. If a player and the dealer each
have a blackjack, the result is a push.
d) The player’s turn
The player can keep his hand as it is (stand) or take more cards
from the deck (hit), one at a time, until either the player judges
that the hand is strong enough to go up against the dealer’s hand
and stands, or until it goes over 21, in which case the player
immediately loses (busted).
e) The dealer’s turn
The dealer turns over the hidden hole card. The dealer hits (takes more cards) or stands depending on the value of the hand. The dealer must hit if the value of the hand is lower than 17, otherwise the dealer stands.
If the dealer is busted, the player wins. Otherwise the player wins
if s/he has a higher score, loses if s/he has a lower score, or
pushes if s/he has the same score as the dealer.
Blackjack consideration is not required, unless you like to implement the option anyway. By the way, a blackjack hand beats any other hand, also those with a total value of 21 but with more cards (which is not a natural blackjack).
f) The program towards the
end
If the player won or lost, s/he must decide whether to quit or to
play another game unless the player runs out of money. Your program
should give the player an initial betting amount of $1000.00.
2. The specific design of this project
a) The main() program and its variables
You will need to decide on appropriate variables in which to store
the player's bankroll (in order to keep track of how much money or
how many points the player has), the bet at a game, and other
information. Let’s use an integer array gamerecord[] to store how
many times the player won, lost, hit a blackjack, and got busted.
(Again, blackjack is optional).
The bankroll, bet, and gamerecord[] should be kept up to date on
the player's current status. (The program calls playing() to play a
game, as discussed below. )
After each game, the program must report the result of the game:
the amount of money won or lost, the current value of the bankroll,
how many times the player won and lost, and how many times the
player hit a blackjack and got busted. (You may want to record and
report how many times the dealer got busted as well, as an
option.)
After each game (by calling playing()), the program should allow the player to continue playing until s/he chooses to quit, or until s/he runs out of money. This central program control may be done within main(), in a do-while loop: 1) call playing() to play a game; 2) check whether to play again. We will add some more components later.
b) “Dealing” the card: the dealing() function
A separate dealing() function will be used to
generate a card number. You may want to implement and double check
this function first. You will use a random number generator. The
random number generator needs to be seeded with the current time at
the beginning of the main program. The possible random values
generated are 1 to 10 (or 13 if J, Q, and K are considered),
representing the cards’ face values. This function will return the
number generated. The return value 1 represent the Ace’s face value
(and the return value 11, 12, and 13 are J, Q, and K’s face value,
respectively.) A large random number n can be converted to
a value between 1 to 13 by: (1 + n%13).
c) “Playing” the game: playing() function
A second function playing() will be used to play a
single game until the player either wins or loses a bet, based upon
the rules given above. This function should get a bet, modify the
current amount of the player's bank roll according to the game
result, modify the gamerecord array values of the player won or
lost, and the player hit the blackjack or got
busted. These values are returned through function
parameters by address passing in playing().
Within the function, the player is asked to place a bet (10 to 1000
within the bankroll amount), so the corresponding value is read
from the keyboard. The system (dealer) then "deals the cards"
(simulated by calling the function dealing(), one card at a time).
After each dealing, this function should report the card values,
except the dealer’s hole card. The function should have two
variables to store the player and the dealer’s scores. Remember
face value 1 represents score 11 (or 1 if you want to be more
complete as an option, and 11, 12, or 13 represents score 10).
The player can keep his hand as it is (stand) or take more cards
from the deck (hit), one at a time, until either the player judges
that the hand is strong enough to go up against the dealer's hand
and stands, or until it goes over 21, in which case the player
immediately loses the bet.
The dealer turns over his hidden hole card by displaying the hold
card face value, and starts the game process automatically until
the dealer wins or loses.
d) "Ending" and "Beginning" of the game
This part is implemented after you have done your programming as
described above already.
You need a separate function ending() to do the following: you should report the current value of the bank roll, how many times the player won, lost, hit a blackjack, and went busted. You need to save the above information into a text file as well.
You need a separate function beginning() to do the
following at the beginning of your program in main(): the function
will open the text file you used to save the game information for
reading if it exists, so that your game can continue from previous
played results. If the file does not exist or the bank roll has a
balance below the minimum bet, you start the game from scratch as
usual, and report “new game” or “continual game”.
So, main() includes 1) beginning(); 2) a loop: playing(); 3) ending();
In: Computer Science
When we toss a penny, experience shows that the probability (longterm proportion) of a head is close to 1-in-2. Suppose now that we toss the penny repeatedly until we get a head. What is the probability that the first head comes up in an odd number of tosses (one, three, five, and so on)? To find out, repeat this experiment 50 times, and keep a record of the number of tosses needed to get a head on each of your 50 trials.
(a)
From your experiment, estimate the probability of a head on the first toss. What value should we expect this probability to have?
b)
Use the expected value to estimate the probability that the first head appears on an odd-numbered toss.
In: Statistics and Probability
1. Alice thinks that the more often you read or watch the news,
the more likely you are to vote. She asks five people how many days
per week they read or watch the news (X) and how likely they are to
vote on a scale from 1 to 10 (Y).
a. (14 points) Calculate the correlation between the two
variables:
X Y
3 2
2 1
1 3
5 8
6 9
b. (2 points) How much of the variability in likelihood to vote is
explained by frequency of reading or watching the news?
2. Over the years, Coach Bob has developed a formula to predict
how many of the country’s top 100 football recruits will sign with
his university based on how many games his team won that year. The
formula is:
Y = 2(X) – 14
a. (6 points) How many top recruits would be predicted for seasons
that ended with:
12 wins?
10 wins?
7 wins?
b. (2 points) What is the predictor variable? What is the criterion
variable?
c. (2 points) What is the slope? What is the y-intercept?
d. (2 points) Is the correlation between games won and number of
top recruits signed positive or negative? How do we know?
3. (6 points) Calculate the standard error for the following
samples. The population standard deviation for each sample is
15.
a. N = 4
b. N = 16
c. N = 225
4. a. (3 points) If we know the population mean is 50 and the
standard error of the mean is .5, what is the z-score for a sample
mean of 51? What is the likelihood of getting a sample mean of 51
or more?
b. (3 points) If we know the population mean is 20 and the standard
error of the mean is 5, what is the z-score for a sample mean of
105? What is the likelihood of getting a sample mean of 105 or
higher?
In: Statistics and Probability