Questions
The Transportation Security Administration (TSA) collects data on wait time at each of its airport security...

The Transportation Security Administration (TSA) collects data on wait time at each of its airport security checkpoints. For flights departing from Terminal 3 at John F. Kennedy International Airport (JFK) between 3:00 and 4:00 PM on Wednesday, the mean wait time is 12 minutes, and the maximum wait time is 16 minutes. [Source: Transportation Security Administration, summary statistics based on historical data collected between February 18, 2008, and March 17, 2008.]

Assume that x, the wait time at the Terminal 3 checkpoint at JFK for flights departing between 3:00 and 4:00 PM on Wednesday, is uniformly distributed between 8 and 16 minutes.

Use the Distributions tool to help you answer the questions that follow.

0123NormalStandard NormalUniform

Select a Distribution

The height of the graph of the probability density function f(x) varies with X as follows (round to four decimal places):

X

Height of the Graph of the Probability Density Function

X < 8
8 ≤ X ≤ 16
X > 16

You are flying out of Terminal 3 at JFK on a Wednesday afternoon between 3:00 and 4:00 PM. You get stuck in a traffic jam on the way to the airport, and if it takes you longer than 12 minutes to clear security, you’ll miss your flight. The probability that you'll miss your flight is-------------------- .

You have arrived at the airport and have been waiting 10 minutes at the security checkpoint. Recall that if you spend more than 12 minutes clearing security, you will miss your flight. Now what is the probability that you'll miss your flight?

a. 0.25

b. 0.6667

c. 0.5

d. 0.8333

An automobile battery manufacturer offers a 39/50 warranty on its batteries. The first number in the warranty code is the free-replacement period; the second number is the prorated-credit period. Under this warranty, if a battery fails within 39 months of purchase, the manufacturer replaces the battery at no charge to the consumer. If the battery fails after 39 months but within 50 months, the manufacturer provides a prorated credit toward the purchase of a new battery.

The manufacturer assumes that X, the lifetime of its auto batteries, is normally distributed with a mean of 44 months and a standard deviation of 3.6 months.

Use the following Distributions tool to help you answer the questions that follow. (Hint: When you adjust the parameters of a distribution, you must reposition the vertical line (or lines) for the correct areas to be displayed.)

0123BinomialChi-SquareExponentialF DistributionHypergeometricNormalUniform

Select a Distribution

If the manufacturer’s assumptions are correct, it would need to replace------------------------of its batteries free of charge.

The company finds that it is replacing 9.34% of its batteries free of charge. It suspects that its assumption about the standard deviation of the life of its batteries is incorrect. A standard deviation of---------------results in a 9.34% replacement rate.

Using the revised standard deviation for battery life, what percentage of the manufacturer’s batteries don’t qualify for free replacement but do qualify for the prorated credit?

a. 84.95%

b.44.29%

c. 40.66%

d. 5.71%

In: Statistics and Probability

A Bookstore Application C++ Design the class Book. Each object of the class Book can hold...

A Bookstore Application C++

Design the class Book. Each object of the class Book can hold the following information about a book:

  • title,
  • authors,
  • publisher,
  • ISBN

Include the member functions to perform the various operations on the objects of Book. For example, the typical operations that can be performed on the title are to show the title, set the title. Add similar operations for the publisher, ISBN , and authors. Add the appropriate constructors and a destructor (if one is needed).

  • Write the definitions of the member functions of the class Book
  • Design a BookstoreManager class which creates a dynamic array of type Book (don’t use vectors), and provide implementation for the following operations on books in the array with the given time-complexity
  • A starter code and a sample output are provided.
  • As shown in the sample output, books are kept sorted by ISBN. Each time a new book is inserted, it’ll be inserted in the sorted order.
  • You are not allowed to use any existing sorting and searching functions.

The Functionalities available in BookstoreManager

Function Time-complexity
isEmpty() : returns true if the array is empty, otherwise false O(1)
isFull(): returns true if the array is full, otherwise false O(1)
listSize(): prints the number of books in the array O(1)
print(): prints the content of the array O(n)
insert(Book): asks user to enter new book info, and it adds the book to the array in sorted order. If array is full, it’ll double the size of the array O(n)
remove(Book): asks user to enter ISBN info, and it removes the book from the array; shifts the other elements up in the array. Prints “Not Found” if search fails O(n)
removePublisher(string): asks user to enter publisher name, and it removes all the books with the same publisher from the array; shifts the other elements up in the array. Prints “Not Found” if search fails. O(n)
search(Book): asks user to enter ISBN or title, and prints the content of the book. Prints “Not Found”, if book is not found O(logn)

Sample Output:

user inputs are given in bold

true

Enter book title: C++: Programming Basics
Enter authors: Nathan Clark
Enter ISBN: 154296
Enter publisher: CreateSpace

Enter book title: Data Structures & Algorithm Analysis in C++
Enter authors: Mark Weiss
Enter ISBN: 132847
Enter publisher: Pearson

Enter book title: Introduction to Programming Using Python
Enter authors: Daniel Liang
Enter ISBN: 147231
Enter publisher: Pearson

Enter book title: Introduction to Algorithms
Enter authors: Thomas H. Cormen , Charles E. Leiserson
Enter ISBN: 189352
Enter publisher: MIT

Data Structures & Algorithm Analysis in C++
by Mark Weiss
132847
Pearson

Introduction to Programming Using Python
Daniel Liang
147231
Pearson

C++: Programming Basics
by Nathan Clark
154296
CreateSpace

Introduction to Algorithms
Thomas H. Cormen , Charles E. Leiserson
189352
MIT

Searching…
ISBN: 147231
Introduction to Programming Using Python
Daniel Liang
147231
Pearson

Removing…
ISBN: 154296

Data Structures & Algorithm Analysis in C++
by Mark Weiss
132847
Pearson

Introduction to Programming Using Python
Daniel Liang
147231
Pearson

Introduction to Algorithms
Thomas H. Cormen , Charles E. Leiserson
189352
MIT

Removing all books for a publisher
Publisher: Pearson

Introduction to Algorithms
Thomas H. Cormen , Charles E. Leiserson
189352
MIT
1

Starting Code:

int main() {
BookstoreManager bookstoreManager;
//prints true if the bookstore is empty
bookstoreManager.isEmpty();
//insert 4 books
string title, authors, publisher;
int isbn;
for(int i=0;i<4;i++){
cout<<"Enter book title:";
cin>>title;
cout<<"Enter authors:";
cin>>authors;
cout<<"Enter isbn:";
cin>>isbn;
cout<<"Enter publisher:";
cin>>publisher;
Book aBook(title, isbn, authors, publisher);
bookstoreManager.insert(aBook);
cout<<endl;
}
//print bookstoreB
bookstoreManager.print();
//search for books
cout<<"Searching…"<<endl;
cout<<"ISBN:";
cin>>isbn;
Book b2(isbn);
bookstoreManager.search(b2);
//remove a book
cout<<"Removing…"<<endl;
cout<<"ISBN:";
cin>>isbn;
Book b1(isbn);
bookstoreManager.remove(b1);
//print bookstore
bookstoreManager.print();
//remove books from a particular publisher
cout<<"Removing publisher"<<endl;
cout<<"Publisher:";
cin>>publisher;
bookstoreManager.removePublisher(publisher);
//print bookstore
bookstoreManager.print();
//prints the number of books
bookstoreManager.listSize();
}

In: Computer Science

You must write the correct code for all member methods so that queue functionality can be...

You must write the correct code for all member methods so that queue functionality can be obtained. Changes to the class definition, instance variables, and signatures of the membership method are not allowed. This class has no main method.

package javaclass;

/**

* A queue structure of Movie objects. Only the Movie values contained

* in the queue are visible through the standard queue methods. The Movie

* values are stored in a DoubleLink object provided in class as attribute.

*

*

*

* @version 2013-07-04

*

* @param Movie

* this data structure value type.

*/

public class DoubleQueue {

// First node of the queue

private DoubleLink values = null;

/**

   * Combines the contents of the left and right Queues into the current

   * Queue. Moves nodes only - does not move value or call the high-level

   * methods insert or remove. left and right Queues are empty when done.

   * Nodes are moved alternately from left and right to this Queue.

   *

   * @param source1

   * The front Queue to extract nodes from.

   * @param source2

   * The second Queue to extract nodes from.

   */

public void combine(final DoubleQueue source1,

final DoubleQueue source2) {

// your code here

}

/**

   * Adds value to the rear of the queue.

   *

   * @param value

   * The value to added to the rear of the queue.

   */

public void insert(final Movie value) {

// your code here

}

/**

   * Returns the front value of the queue and removes that value from the

   * queue. The next node in the queue becomes the new front node.

   *

   * @return The value at the front of the queue.

   */

public Movie remove() {

//your code here

return null;//you must change this statement as per your requirement

}

/**

   * Returns the value at the front. Must be copy safe

   *

   * @return the value at the front.

   */

public Movie peekFront() {

// your code here

return null;//you must change this statement as per your requirement

}

/**

   * Returns the value at the rear. Must be copy safe.

   *

   * @return the value at the rear.

   */

public Movie peekRear() {

// your code here

return null;//you must change this statement as per your requirement

}

/**

   * Returns all the data in the queue in the form of an array.

   *

   * @return The array of Movie elements. Must be copy safe

   */

public final Movie [] toArray() {

//your code here

return null;//you must change this statement as per your requirement

}

}

Double link class

package javaclass;

/**

* The class for doubly-linked data structures. Provides attributes

* and implementations for getLength, isEmpty, and toArray methods.

* The head attribute is the first node in any doubly-linked list and

* last is the last node.

*

* @author

* @version 2017-11-01

*

*/

public class DoubleLink {

// First node of double linked list

private DoubleNode head = null;

// Number of elements currently stored in linked list

private int length = 0;

// Last node of double linked list.

private DoubleNode last = null;

/**

   * Adds a new Movie element to the list at the head position

   * before the previous head, if any. Increments the length of the List.

*

   * @param value

   * The value to be added at the head of the list.

*

   * @return true if node is added successfully, else false.

   */

public final boolean addNode(final Movie value) {

//your code here

return false;//you must change this statement as per your requirement

}

/**

   * Removes the value at the front of this List.

   *

   * @return The value at the front of this List.

   */

public Movie removeFront() {

// your code here

return null;//you must change this statement as per your requirement

}

/**

   * Returns the head element in the linked structure. Must be copy safe.

   *

   * @return the head node.

   */

public final DoubleNode getHead() {

//your code here

return null;//you must change this statement as per your requirement

}

/**

   * Returns the current number of elements in the linked structure.

   *

   * @return the value of length.

   */

public final int getLength() {

//your code here

return -1;//you must change this statement as per your requirement

}

/**

   * Returns the last node in the linked structure. Must be copy safe.

   *

   * @return the last node.

   */

public final DoubleNode getLast() {

//your code here

return null;//you must change this statement as per your requirement

}

/**

   * Determines whether the double linked list is empty or not.

   *

   * @return true if list is empty, false otherwise.

   */

public final boolean isEmpty() {

//your code here

return true;//you must change this statement as per your requirement

}

/**

   * Returns all the data in the list in the form of an array.

   *

   * @return The array of Movie elements. Must be copy safe

   */

public final Movie [] toArray() {

//your code here

return null;//you must change this statement as per your requirement

}

}

In: Computer Science

When calculating premiums on life insurance products insurance companies often use life tables which enable the...

When calculating premiums on life insurance products insurance companies often use life tables which enable the probability of a person dying in any age interval to be calculated.

The following table gives the number out of 100,000 females who are still alive during each five-year period of life between the age of 20 to 60 (inclusive):

Out of 100,000 females born

                       

Exact age (years)                                          Number alive at exact age

20                                                                                                99,150

25                                                                                                 98,983

30                                                                                                 98,781

35                                                                                                 98,545

40                                                                                                 98,182

45                                                                                                 97,628

50                                                                                                96,831

55                                                                                               95,585

60                                                                                               93,718

Suppose a 30 year old female on her 30th birthday purchases a one million dollar, five-year term life policy from an insurance company. That is, the insurance company must pay her estate $1 million if she dies within the next five years.

(a) Determine the insurance company’s expected payout on this policy.

(b) What would be the minimum you would expect the insurance company to charge her for this policy? Give a brief explanation of your answer.

(c) What would the expected payout be if the same policy were taken out by a female on her 40th birthday?

In: Statistics and Probability

a) The percentage of adults who have at some point in their life been told that...

a) The percentage of adults who have at some point in their life been told that they have hypertension is 23.53%. In a sample of 10 adults, let X be the number who have been told that they have hypertension. Consider the following probability distribution for X.
x P(x)
0 ?
1 ?
2 ?
3 ?
4 ?
5 a
6 0.0122
7 0.0021
8 0.0002
9 0.0000
10 0.0000

Find the missing entry that is labelled as 'a'. (answer to 4 decimals)
(b)

[2 marks] Suppose that a group of 10 adults are randomly selected, and 6 of them have been told that they have hypertension. Is this a significantly high number that would suggest that the given percentage of adults who have been told that they have hypertension (i.e., 23.53%) is not correct?

(A) Yes, because 0.0122 is less than .05.

(B) No, because 0.0122 is less than .05.

(C) No, because 6 a not a lot more than expected.

(D) No, because 0.0145 is less than .05.

(E) Yes, because 0.0145 is less than .05.

(F) No, because 0.0475 is less than .05.

(G) Yes, because 6 a lot more than expected.

(H) Yes, because 0.0475 is less than .05.

In: Statistics and Probability

A couple is planning to have a family. Let us assume that the probability of having...

A couple is planning to have a family. Let us assume that the probability of having a girl is 0.48 and a boy is 0.52, and that the gender of this couple’s children are pairwise independent. They want to have at least one girl and at least one boy. At the same time, they know that raising too many kids is difficult. So here’s what they plan to do: they’ll keep trying to have children until they have at least one girl and at least one boy or until they have four kids. Once one of these two conditions are satisfied, they’ll stop. Our goal is to determine the expected number of children this couple will have.

Let X(s) be equal to the number of children with outcome s; e.g., X(GGB) = 3.

a. What are the possible values of X(s)?

b. For each such value i, list the outcomes in the event (X = i). For example, the outcome GGB is part of the event (X = 3).

c. For each such value i, what is P(X = i)? Keep in mind that P(G) = 0.48, P(B) = 0.52 and the gender of the couple’s children a independent of each other.

d. Finally, what is E[X]? That is, on average, how many kids will such a couple have?

In: Statistics and Probability

Reese’s pieces are supposed to be 50% orange, 25% yellow, and 25% brown. Suppose your random...

Reese’s pieces are supposed to be 50% orange, 25% yellow, and 25% brown. Suppose your random sample is of size 500. Let ?̂be the proportion of orange piece in your sample.

2. Which parameter is being estimated by ?̂?

A. The true average number of orange piece in your sample.

B. The true average number of orange piece in all Reese’s pieces.

C. The true proportion of orange piece in your sample.

D. The true proportion of orange piece in all Reese’s pieces.

3. The mean of ?̂is ____.

4. The standard deviation (sometimes called standard error) of ?̂is ____. (4 decimal places)

5. Which of the following can best describe/explain the shape of ?̂?

A. We can’t determine the shape of ?̂.

B. ?̂follows normal distribution because: 1. The sample is random. 2. ? is large enough, i.e. ? = 50% = 0.5 ≥ 0.5

C. ?̂follows normal distribution because: 1. The sample is random. 2. ? = 500 ≥ 30.

D. ?̂follows normal distribution because: 1. The sample is random. 2. ?? = 500(0.5) = 250 ≥ 5 and ?(1 − ?) = 500(0.5) = 250 ≥ 5

6. What is the probability that you have less than 230 orange pieces in your sample? (4 decimal places)

In: Statistics and Probability

Benford's Law claims that numbers chosen from very large data files tend to have "1" as...

Benford's Law claims that numbers chosen from very large data files tend to have "1" as the first nonzero digit disproportionately often. In fact, research has shown that if you randomly draw a number from a very large data file, the probability of getting a number with "1" as the leading digit is about 0.301. Suppose you are an auditor for a very large corporation. The revenue report involves millions of numbers in a large computer file. Let us say you took a random sample of n = 250 numerical entries from the file and r = 60 of the entries had a first nonzero digit of 1. Let p represent the population proportion of all numbers in the corporate file that have a first nonzero digit of 1. Test the claim that p is less than 0.301 by using α = 0.01. What does the area of the sampling distribution corresponding to your P-value look like?

The area in the right tail of the standard normal curve.
The area not including the right tail of the standard normal curve.
The area in the left tail and the right tail of the standard normal curve.
The area not including the left tail of the standard normal curve.
The area in the left tail of the standard normal curve.

In: Statistics and Probability

Each week, Stéphane needs to prepare 4 exercises for the following week's homework assignment. The number...

Each week, Stéphane needs to prepare 4 exercises for the following week's homework assignment. The number of problems he creates in a week follows a Poisson distribution with mean 6.9.

a. What is the probability that Stéphane manages to create enough exercises for the following week's homework? Round your answer to 4 decimal places.

b. Unfortunately, each week there is a 42% chance that a visiting scholar from Switzerland arrives and burdens Stéphane with research questions all week. During these weeks he only writes an average of 3.45 exercises. If Stéphane fails to write 4 exercises one week, what is the probably that he received a visiting scholar that week? Round your answer to 4 decimal places.

c. The last week of the semester, Stéphane decides to "reward" the students by no longer limiting himself to 4 exercises, and instead assigning every exercise he writes. If a student with a 55% chance of correctly answering an exercise is expected to answer 2.75 questions correctly, what is the probably that Stéphane did not have a visitor that week? Round your answer to 4 decimal places.
Hint: First find the number of exercises in the last week of the semester from the chance and expected value of the correct answers.

In: Statistics and Probability

Suppose the length in cm of a male soccer player's foot follows a Normal distribution with...

Suppose the length in cm of a male soccer player's foot follows a Normal distribution with mean 31 and variance 25. Suppose the length in cm of a female soccer player's foot follows a Normal distribution with mean 26 and variance 16. A male and female soccer player are selected at random. What is the probability the female player has a longer foot than the male player?

Question 13 options:

0.05

0.22

0.29

0.78

0.95

Independently of one another, a randomly surveyed individual can be a non-smoker, a light smoker, or a heavy smoker with probabilities 50%, 40% and 10%, respectively. Suppose we randomly survey a sample of 100 people. Given that 34 of them are light smokers, what is the expected number of heavy smokers?

Question 14 options:

6.6

11

33

55

None of the above

The Princess Theatre has 280 seats. 200 tickets are sold for the new popular movie: The Attack of the Goose. Despite every attendee having an assigned seat, they all decide to sit in seats at random. Find the variance of the number of people sitting in their assigned seat. (Hint: use indicator variables)

Question 15 options:

0.712

0.714

5.246

11.704

None of the above

In: Statistics and Probability