After years of rapid growth, illegal immigration into the United States has declined, perhaps owing to the recession and increased border enforcement by the United States (Los Angeles Times, September 1, 2010). While its share has declined, California still accounts for 35% of the nation’s estimated 11.3 million undocumented immigrants.
a. In a sample of 60 illegal immigrants, what
is the probability that more than 21% live in California?
(Round “z” value to 2 decimal places, and final
answer to 4 decimal places.)
b. In a sample of 120 illegal immigrants, what is
the probability that more than 21% live in California?
(Round “z” value to 2 decimal places, and final
answer to 4 decimal places.)
c. Comment on the reason for the difference
between the computed probabilities in parts a and b.
As the sample number increases, the probability of more than 21% also increases, due to the lower z value and decreased standard error.
As the sample number increases, the probability of more than 21% also increases, due to the lower z value and increased standard error.
In: Statistics and Probability
Bob is a recent law school graduate who intends to take the state bar exam. According to the National Conference on Bar Examiners, about 55% of all people who take the state bar exam pass. Let n = 1, 2, 3, ... represent the number of times a person takes the bar exam until the first pass.
(a) Write out a formula for the probability distribution of the
random variable n. (Use p and n in your
answer.)
P(n) =
(b) What is the probability that Bob first passes the bar exam on
the second try (n = 2)? (Use 3 decimal places.)
(c) What is the probability that Bob needs three attempts to pass
the bar exam? (Use 3 decimal places.)
(d) What is the probability that Bob needs more than three attempts
to pass the bar exam? (Use 3 decimal places.)
(e) What is the expected number of attempts at the state bar exam
Bob must make for his (first) pass? Hint: Use
μfor the geometric distribution and round.
In: Statistics and Probability
Bob is a recent law school graduate who intends to take the state bar exam. According to the National Conference on Bar Examiners, about 48% of all people who take the state bar exam pass. Let n = 1, 2, 3, ... represent the number of times a person takes the bar exam until the first pass.
(a) Write out a formula for the probability distribution of the
random variable n. (Use p and n in your
answer.)
P(n) =
(b) What is the probability that Bob first passes the bar exam on
the second try (n = 2)? (Use 3 decimal places.)
(c) What is the probability that Bob needs three attempts to pass
the bar exam? (Use 3 decimal places.)
(d) What is the probability that Bob needs more than three attempts
to pass the bar exam? (Use 3 decimal places.)
(e) What is the expected number of attempts at the state bar exam
Bob must make for his (first) pass? Hint: Use μ
for the geometric distribution and round.
In: Math
Your Toronto Maple Leafs won 30 of 82 games last season (i.e., the 2014-2015 season), giving them a winning percentage of 37%. If we assume this means the probability of the Leafs winning any given game is 0.37, then we can predict how they would have done in a playoff series.
Answer the following questions to determine the probability that the Leafs would have won a best of 7playoff series (i.e., won 4 games) had they made the playoffs last season.
a. Rephrase this question in terms of sequences of 0s and 1s. What is the shortest length of a sequence? What is the longest length of a sequence?
b. Calculate the number of sequences which correspond to the Leafs winning the series. (Note that the answer is not C(7, 4).)
c. Calculate the number of sequences as they relate to this problem. (Note that the answer is not 27 as not all series would last 7 games.)
d. Calculate the probability that the Leafs would win the series.
e. What is your best guess for the probability that the Leafs will ever win the Stanley Cup again (the ultimate prize in the NHL)
In: Math
15.1 File IO Warm-up
For this exercise, you will receive two string inputs, which are the names of the text files. You need to check if the input file exists. If input file doesn't exist, print out "Input file does not exist."
You are required to create 4 functions:
void removeSpace (ifstream &inStream, ofstream &outStream): removes white space from a text file and write to a new file. If write is successful, print out "Text with no white space is successfully written to outFileName."
int countChar (ifstream &inStream): returns number of character in input file.
int countWord(ifstream &inStream): returns number of words in input file.
int countLines(ifstream &inStream): returns number of lines in input file.
After calling each function, you have to reset the state flags and move the stream pointer to beginning of file. You can do that by closing and re-opening the file, or by calling member functions:
inStream.clear(); inStream.seekg(0);
Example:
Input: input.txt output.txt
Output:
Text with no white space is successfully written to output.txt.
Number of characters is: 154
Number of words is: 36
Number of lines is: 10
here is the code in C++:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
void removeSpace(ifstream &inStream, ofstream
&outStream);
int countChar (ifstream &inStream);
int countWords(ifstream &inStream);
int countLines (ifstream &inStream);
int main()
{
string input, output;
cin >> input >> output;
ifstream inStream(input);
ofstream outStream(output);
if(inStream.fail())
cout << "Input file does not exist.\n" ;
else
{
removeSpace(inStream, outStream);
cout << "Text with no white space is successfully written to
outFileName.\n";
inStream.clear();
inStream.seekg(0, inStream.beg);
cout << "Number of characters is: " <<
countChar(inStream) << endl;
inStream.clear();
inStream.seekg(0, inStream.beg);
cout << "Number of words is: " <<
countWords(inStream) << endl;
inStream.clear();
inStream.seekg(0, inStream.beg);
cout << "Number of lines is: " <<
countLines(inStream) << endl;
inStream.close();
}
outStream.close();
return 0;
}
//define your functions here
In: Computer Science
Poker hands with ranking. Consider a regular deck of 52 cards as usual with 5 cards dealt. You have learned all those 8 patterns: one pair, two pairs, three of a kind, straight, flush, full house, four of a kind, and straight flush (with royal flush a special kind of straight flush).
Note ace is counted as both 1 point and 14 points. So in counting straight, A2345 and 10JQKA are both valid.
Compute / derive the number of ways for these 8 patterns, show the formula and the numbers. Then rank these 8 patterns from highest rank royal flush with the number of ways to lowest rank one pair also with the number of ways. You may think of tabulating these as well to make it easy to read. Using C(104, 5), the number of hands (almost equal to 2.6 millions), also calculate and show the probabilities of each of these 8 ranks.
a)By using this 104 cards list and rank all 8 patterns.
b)Using C (104,5), the number of hands, calculate the probabilities.
Please help!!!
In: Statistics and Probability
Researchers measured the data speeds for a particular smartphone carrier at 50 airports. The highest speed measured was 71.7 Mbps. The complete list of 50 data speeds has a mean of x overbarequals18.12 Mbps and a standard deviation of sequals17.45 Mbps. a. What is the difference between carrier's highest data speed and the mean of all 50 data speeds? b. How many standard deviations is that [the difference found in part (a)]? c. Convert the carrier's highest data speed to a z score. d. If we consider data speeds that convert to z scores between minus2 and 2 to be neither significantly low nor significantly high, is the carrier's highest data speed significant?
In: Statistics and Probability
Researchers measured the data speeds for a particular smartphone carrier at 50 airports. The highest speed measured was 74.9 Mbps. The complete list of 50 data speeds has a mean of x = 17.97 Mbps and a standard deviation of s = 30.01 Mbps.
a. What is the difference between carrier's highest data speed and the mean of all 50 data speeds?
b. How many standard deviations is that [the difference found in part (a)]?
c. Convert the carrier's highest data speed to a z score.
d. If we consider data speeds that convert to z scores between minus2 and 2 to be neither significantly low nor significantly high, is the carrier's highest data speed significant?
In: Statistics and Probability
Monty Company acquired a plant asset at the beginning of Year 1.
The asset has an estimated service life of 5 years. An employee has
prepared depreciation schedules for this asset using three
different methods to compare the results of using one method with
the results of using other methods. You are to assume that the
following schedules have been correctly prepared for this asset
using (1) the straight-line method, (2) the
sum-of-the-years'-digits method, and (3) the
double-declining-balance method.
|
Year |
Straight-Line |
Sum-of-the- |
Double-Declining- |
|||||||||
| 1 | $10,620 | $17,700 | $23,600 | |||||||||
| 2 | 10,620 | 14,160 | 14,160 | |||||||||
| 3 | 10,620 | 10,620 | 8,496 | |||||||||
| 4 | 10,620 | 7,080 | 5,098 | |||||||||
| 5 | 10,620 | 3,540 | 1,746 | |||||||||
| Total | $53,100 | $53,100 | $53,100 | |||||||||
What is the cost of the asset being depreciated?
| Cost of asset |
$ |
What amount, if any, was used in the depreciation calculations
for the salvage value for this asset?
| Salvage value |
Which method will produce the highest charge to income in Year
1?
|
The method that produces the highest charge to income in Year 1 is |
Which method will produce the highest charge to income in Year
4?
| The method that produces the highest charge to income in Year 4 is |
Which method will produce the highest book value for the asset
at the end of Year 3?
| The method that produces the highest book value for the asset at the end of Year 3 is |
If the asset is sold at the end of Year 3, which method would
yield the highest gain (or lowest loss) on disposal of the
asset?
| The method that will yield the highest gain (or lowest loss) on disposal of the asset if the asset is sold at the end of Year 3 is |
In: Accounting
Q–2: [5+2+3 Marks] Let X be a random variable giving the number
of
heads minus the number of tails in three tosses of a coin.
a) Find the probability distribution function of the random
variable X.
b) Find P(−1 ≤ X ≤ 3).
c) Find E(X).
In: Statistics and Probability