Questions
A binary message m, where m is equal either to 0 or to 1, is sent...

A binary message m, where m is equal either to 0 or to 1, is sent over an information channel. Assume that if m = 0, the value s = −1.5 is sent, and if m = 1, the value s = 1.5 is sent. The value received is X, where X = s + E, and E ∼ N(0, 0.66). If X ≤ 0.5, then the receiver concludes that m = 0, and if X > 0.5, then the receiver concludes that m = 1.

If the true message is m = 0, what is the probability of an error, that is, what is the probability that the receiver concludes that m = 1? Round the answer to four decimal places.

If the true message is m = 1, what is the probability of an error, that is, what is the probability that the receiver concludes that m = 0?

A string consisting of 60 1s and 40 0s will be sent. A bit is chosen at random from this string. What is the probability that it will be received correctly?

Refer to part (c). A bit is chosen at random from the received string. Given that this bit is 1, what is the probability that the bit sent was 0?

Refer to part (c). A bit is chosen at random from the received string. Given that this bit is 0, what is the probability that the bit sent was 1?

In: Statistics and Probability

Problem Statement You are required to read in a list of stocks from a text file...

Problem Statement
You are required to read in a list of stocks from a text file “stocks.txt” and write the sum and
average of the stocks’ prices, the name of the stock that has the highest price, and the name of
the stock that has the lowest price to an output file. The minimal number of stocks is 30 and
maximal number of stocks in the input file is 50. You can download a input file “stocks.txt” from
Canvas. When the program runs, it should do the following:
 May or may not use the Stock Class created in Assignment 6 and modify it as it is
needed.
 The Stock class must have a constructor with 3 parameters that correspond to the 3 fields:
Stock Name, Symbol, Price.
o For the argument constructor, set the value of 3 fields based on the arguments.
 The Stock class must have accessors and mutators for all of its private fields.
 The setter methods must protect a user from setting the price into negative number. You
can set the values to 0 if a user tries to change them to negative values.
 The program will ask user to enter a name of the input file. If the input file does not exist,
the program should print an error message and terminate immediately.
o To check if a file opens successfully, please use the following example as a
reference:
File myFile = new File(“stocks.txt”);
if (!myFile.exists()){
System.exit(0);
}
 If the file opens successfully, then the program reads stocks’ information and store it into
an array of stocks. Each element of the array MUST be a Stock object. You should use
ArrayList class.
 The program calculate the sum and average of the stocks’ prices.
 The program finds the name of the stock with the highest price and the name of the stock
with the lowest price.
 The program asks user to enter a name for an output file. Then it creates the output file
and write the sum, average, names of the stocks with highest and lowest price to the file.
Input
This program requires that you read in the following data values:
 An input file name.
 An output file name.
 An input file that contains a list of stocks with their name, symbol, current price. Each
line represents one stock and each field is separated by comma. The file MUST contain
at least 30 stocks.
o E.g., Microsoft Corporation, MSFT, 23.34
Google Inc, GOOG, 786.79
Bank of America, BAC, 16.76
AT&T Inc, T, 34.54
You will use interactive I/O in this program. All of the input must be validated if it is needed.
You can assume that for a numeric input value, the grader will enter a numeric value in the
testing cases.
Output
Your program should display the sum and average of the list of stocks, the name of the stock
with highest price and the name of the stock with lowest price on the console, and then write
them to a file

Assignment 6
You are required to write a stock price simulator, which simulates a price change of a stock.
When the program runs, it should do the following:
 Create a Stock class which must include fields: name, symbol, currentPrice, nextPrice,
priceChange, and priceChangePercentage.
 The Stock class must have two constructor: a no-argument constructor and a constructor
with four parameters that correspond to the four fields.
o For the no-argument constructor, set the default value for each field such as:
 Name: Microsoft
 Symbol: MSFT
 currentPrice: 46.87
 nextPrice: 46.87
o For the argument constructor, set the value of four fields based on the arguments.
 The Stock class must have accessors and mutators for all of its fields.
 The setter methods must protect a user from setting the currentPrice/nextPrice into
negative number. You can set the values to 0 if a user tries to change them to negative
values.
 The Stock class should have a SimulatePrice() method, which increases or decreases the
currentPrice by 0 - 10% randomly, including 0.00% and 2.34%.
 The main program will ask user to enter a name, symbol, current price of a stock. Then, it
simulates the prices for next 30 days. It displays the prices for the next 30 days on the
console. If a user enters “NONE”, “NA”, 0.0 for name, symbol, current price
respectively, then the no-argument constructor is used. Input
This program requires that you read in the following data values:
 A stock’s name, symbol, and current price.
o E.g., Microsoft Corporation, MSFT, 45.87.
You will use interactive I/O in this program. All of the input must be validated if it is needed.
You can assume that for a numeric input value, the grader will enter a numeric value in the
testing cases.
Output
Your program should display the stock’s name, symbol, current price, next price
priceChange, and priceChangePercentage for each day on the console.
Test case output: (green texts are user input)
Please enter the name of the stock: Microsoft
Please enter the symbol of the stock: MSFT
Please enter yesterday's price of Microsoft: 45.65
STOCK SYMBOL YESTERDAY_PRICE TODAY_PRICE PRICE_MOVEMENT CHANGE_PERCENT
Microsoft MSFT 45.65 47.48 1.83 4.00%
Microsoft MSFT 47.48 52.22 4.75 10.00%
Microsoft MSFT 52.22 49.61 -2.61 -5.00%
Microsoft MSFT 49.61 47.13 -2.48 -5.00%
Microsoft MSFT 47.13 51.84 4.71 10.00%
Microsoft MSFT 51.84 57.03 5.18 10.00%
Microsoft MSFT 57.03 54.18 -2.85 -5.00%
Microsoft MSFT 54.18 59.05 4.88 9.00%
Microsoft MSFT 59.05 62.01 2.95 5.00%
Microsoft MSFT 62.01 57.05 -4.96 -8.00%
Microsoft MSFT 57.05 54.19 -2.85 -5.00%
Microsoft MSFT 54.19 49.32 -4.88 -9.00%
Microsoft MSFT 49.32 46.85 -2.47 -5.00%
Microsoft MSFT 46.85 50.60 3.75 8.00%
Microsoft MSFT 50.60 55.15 4.55 9.00%
Microsoft MSFT 55.15 58.46 3.31 6.00%
Microsoft MSFT 58.46 61.38 2.92 5.00%
Microsoft MSFT 61.38 55.86 -5.52 -9.00%
Microsoft MSFT 55.86 56.42 0.56 1.00%
Microsoft MSFT 56.42 56.98 0.56 1.00%
Good bye!

In: Computer Science

Your insurance company has coverage for three types of cars. The annual cost for each type...

Your insurance company has coverage for three types of cars. The annual cost for each type of car can be modeled using Gaussian (Normal) distribution, with the following parameters:

  • Car Type 1: Mean=$520 and Standard Deviation=$110
  • Car Type 2: Mean=$720 and Standard Deviation=$170
  • Car Type 3: Mean=$470 and Standard Deviation=$80

Use the Random number generator and simulate 1000-long columns, for each of the three cases. Example: for the Car Type 1, use Number of variables=1, Number of random numbers=1000, Distribution=Normal, Mean=520 and Standard deviation=110, and leave random Seed empty.

Next, use either sorting to construct the appropriate histogram or rule of thumb to answer the questions:

13. What is approximate probability that Car Type 1 has an annual cost less than $350?

  • a. Between 1% and 3%
  • b. Between 3% and 9%
  • c. Between 10% and 15%
  • d. None of these

14. Which of the three types of cars is least likely to cost less than $350?

  • a. Type 1
  • b. Type 2
  • c. Type 3

15. For which of the three types we expect that (approximately) 95% of cases will be between $300 and $740?

  • a. Type 1
  • b. Type 2
  • c. Type 3

In: Statistics and Probability

Your insurance company has converage for three types of cars. The annual cost for each type...

Your insurance company has converage for three types of cars. The annual cost for each type of car can be modeled using Gaussian (Normal) distribution, with the following parameters:

  • Car Type 1: Mean=$520 and Standard Deviation=$110
  • Car Type 2: Mean=$720 and Standard Deviation=$170
  • Car Type 3: Mean=$470 and Standard Deviation=$80

Use the Random number generator and simulate 1000-long columns, for each of the three cases. Example: for the Car Type 1, use Number of variables=1, Number of random numbers=1000, Distribution=Normal, Mean=520 and Standard deviation=110, and leave random Seed empty.

Next, use either sorting to construct the appropriate histogram or rule of thumb to answer the questions:

13. What is approximate probability that Car Type 1 has an annual cost less than $350?

  • a. Between 1% and 3%
  • b. Between 3% and 9%
  • c. Between 10% and 15%
  • d. None of these

14. Which of the three types of cars is least likely to cost less than $350?

  • a. Type 1
  • b. Type 2
  • c. Type 3

15. For which of the three types we expect that (approximately) 95% of cases will be between $300 and $740?

  • a. Type 1
  • b. Type 2
  • c. Type 3

Task 3

In: Statistics and Probability

The national surveyconducted a poll examining the financial health of public servants as they approach retirement...

The national surveyconducted a poll examining the financial health of public servants as they approach retirement age. According to responses from the survey of persons 55 years of age and over, 60% of them have stated that they are adequately prepared for retirement. Proposed changes to mandatory retirement laws may mean that persons who would normally be retiring at age 65, may no longer choose to do so, particularly if they feel they are not financially in the position to. Based on the findings of this survey, you want to extrapolate the number of people in your division who are adequately prepared for retirement. To do so, a random and independent sample of employees ages 55 plus where n=10 was conducted.

a) Define the random variable x as the number of persons who feel adequately prepared for retirement. We know that x is a binomial random variable. Please write a paragraph explaining what random varioable x means in the given context. Use graphs, number or whatever is required to answer the question. It can be about a page long.

b) Find the probability that more than 5 people who responded are adequately prepared for retirement. This will help you plan for future hiring. Please calculate and also mention the logic and reason behind it while answering. please show each steps in terms of how you calculate what you calculate, for example, variance, standard deviation etc. I am interested in all the formula and steps you use.

In: Statistics and Probability

Isabel Briggs Myers was a pioneer in the study of personality types. The personality types are...

Isabel Briggs Myers was a pioneer in the study of personality types. The personality types are broadly defined according to four main preferences. Do married couples choose similar or different personality types in their mates? The following data give an indication. Similarities and Differences in a Random Sample of 375 Married Couples Number of Similar Preferences Number of Married Couples All four 29

Three 127

Two 111

One 67

None 41

Suppose that a married couple is selected at random. (a) Use the data to estimate the probability that they will have 0, 1, 2, 3, or 4 personality preferences in common. (For each answer, enter a number. Enter your answers to 2 decimal places.) 0 1 2 3 4

(b) Do the probabilities add up to 1? Why should they? Yes, because they do not cover the entire sample space. No, because they do not cover the entire sample space. Yes, because they cover the entire sample space. No, because they cover the entire sample space.

c. What is the sample space in this problem?

0, 1, 2, 3 personality preferences in common

1, 2, 3, 4 personality preferences in common

0, 1, 2, 3, 4, 5 personality preferences in common

0, 1, 2, 3, 4 personality preferences in common

In: Statistics and Probability

Cars arrive at a parking lot at a rate of 20 per hour. Assume that a...

Cars arrive at a parking lot at a rate of 20 per hour. Assume that a Poisson process model is appropriate. Answer the following questions. No derivations are needed but justification of your answers are necessary. What assumptions are necessary to model the arrival of cars as a Poisson process? What is the expected number of cars that arrive between 10:00 a.m and 11:45 a. m? Suppose you walk into the parking lot at 10:15 a.m.; how long, on average, do you have to wait to see a car entering the lot? Assume that the lot opens at 8 a.m. what is the expected time at which the ninth car arrives at the parking lot. What is the expected waiting time between the arrival of the 9th and 10th car? How is the waiting time between the arrival times of 9th and 10th car distributed? Write the density function of the waiting time. As an outsider, you watch the cars entering the parking lot for a half an hour in the morning (between 10 a.m and 10:30 a.m.) and then for a half an hour during the lunch time (between 1 p.m. and 1:30 p.m.). What can you say about the number of cars arriving at the parking lot during the two half hour periods? Suppose the probability that a car will need a handicapped parking spot is 1%, what is the expected number of cars needing handicapped spots between 10:00 am and 11:45 am?

In: Statistics and Probability

Pease answer the questions below: If n = 15, ¯xx¯ = 50, and s = 15,...

Pease answer the questions below:

  1. If n = 15, ¯xx¯ = 50, and s = 15, construct a confidence interval at a 95% confidence level. Assume the data came from a normally distributed population. Give your answers to three decimal places.

    < μ <
  1. 55 randomly selected students were asked the number of pairs of shoes they have. Let X represent the number of pairs of shoes. The results are as follows:

# of Pairs of Shoes

4

5

6

7

8

9

10

Frequency

7

8

4

11

8

9

8



Round all your answers to 4 decimal places where possible.

The mean is: Incorrect

The median is: Correct

The sample standard deviation is: Incorrect

The first quartile is: Correct

The third quartile is: Correct

What percent of the respondents have at least 6 pairs of Shoes? Incorrect%

35% of all respondents have fewer than how many pairs of Shoes?

  1. Based on historical data, your manager believes that 25% of the company's orders come from first-time customers. A random sample of 114 orders will be used to estimate the proportion of first time-customers. What is the probability that the sample proportion is less than 0.29?

    Note: You should carefully round any z-values you calculate to 4 decimal places to match wamap's approach and calculations.

    Answer =  (Enter your answer as a number accurate to 4 decimal places.)



    In: Statistics and Probability

    Under ordinary circumstances: For all babies born in the entire global population, the proportion of male...

    Under ordinary circumstances: For all babies born in the entire global population, the proportion of male births tends to be consistently a bit higher, than the proportion of female births (Source: WHO - World Health Organization).

    In fact: For a randomly sampled individual birth from the global population, the probability that the baby's sex will be male is approximately 51.22%.

    Imagine that we will randomly record the sex outcome at birth for 25 future individual babies from the global population.

    We will let random variable X stand for the total number of male births in our sample.

    In this scenario, what is the numerical value of E(X)?

    Round to one digit past the decimal point, and state just the number part of your answer (no units).

    In this same scenario:

    What is the numerical value of SD(X)?

    Round to one digit past the decimal point, and state just the number part of your answer (no units).

    In this same scenario:

    What is the approximate value of P(X≤11) ?

    Write your answer as a percentage value, and round to three digits after the decimal point. Include a percent symbol after your answer (no spaces).

    In this same scenario:

    What is the approximate value of P(X>11) ?

    Write your answer as a percentage value, and round to three digits after the decimal point. Include a percent symbol after your answer (no spaces).

    In: Statistics and Probability

    The time between arrivals of parts in a single machine queuing system is uniformly distributed from...

    The time between arrivals of parts in a single machine queuing system is uniformly distributed from 1 to 20 minutes (for simplicity round off all times to the nearest whole minute.) The part's processing time is either 8 minutes or 14 minutes. Consider the following case of probability mass function for service times: Prob. of processing (8 min.) = .5, Prob. of processing (14 min.) = .5 Simulate the case, you need to estimate average waiting time in system. Start the system out empty and generate the first arrival time, etc. You need to submit random numbers used (Use the third block of the Random number table to generate interarrival time and the fourth block to generate service time), interarrival time and service time for each part, discuss how you compute (10%) and (you need to generate 20 parts):

    (1) clock arrival time for each part (10%),

    (2) clock time starts to process each part (10%),

    (3) clock departure time for each part (10%),

    (4) total waiting time in system for each part (20%),

    (5) plot average total waiting time in system versus part number (20%),

    (6) plot average idle time of the machine versus part number (compute at the end of each processing) (20%)

    In: Statistics and Probability