The grade appeal process at a university requires that a jury be structured by selecting four individuals randomly from a pool of thirteen students and nine faculty. (a) what is the probability of selecting a jury of all students? (b) what is the probability of selecting a jury of all faculty? (c) what is the probability of selecting a jury of two students and two faculty?
In: Math
1.The probability that a patient recovers from a delicate heart operation is 0.9. What is the probability that exactly 5 of the next 7 patients
having this operation survive?
2. On the average a secretary makes 2 typing errors per page. What is the probability that he makes
a) Four or more errors on the next page?
b) No errors?
In: Math
Suppose that 60% of college students eat pizza weekly. Answer the following questions if you have a random sample of 50 college students. What is the probability that exactly 29 eat pizza weekly? What is the probability that 35 or fewer eat pizza weekly? What is the probability that more than 32 eat pizza weekly?
In: Math
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Instructor mark out of 10: | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PART A | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Of 200 students sampeled in KPU courtyard, 100 say they are taking a math course (M), 65 say they are taking a statistics course (S) and 34 are taking both. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| a. Determine P(M U S): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| b. Explain the event shown in part a in words. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| c. What is the probability that a student in this sample has not taken either course? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| d. Are events M and S mutually exclusive? Provide evidence for your answer using the information given in the problem. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e. If a student has taken the math course, what is the probability that she has also taken the statistics course? If, in order to answer any of the questions below, you need to find other probabilities, please show them as well. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f. Are events M and S independent? Provide evidence for your answer using the information given in the problem. Please also explain what your answer means. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PART B | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| John rolls two dice at the same time. He defines the random variable X = sum of the numbers showing. For example, X can have a value of 3 in two ways: First die rolls a 1 and second die rolls a 2, or first one rolls a 2 and second one rolls a 1. Answer the questions below, indicating in the answer cells how you determined the answer (i.e., don't just type in the correct answer, but use cell references and formulas to show your work): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| a. What are the possible values for X? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| b. Construct a table showing the probability distribution for x. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sum of dice rolls (X) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Probability P(X) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| c. What is the probability that sum of dice rolls is 4? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| d. What is the probability that sum of dice rolls is more than 5? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e. What is the probability that sum of dice rolls is less than 3? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f. What is the probability that sum of dice rolls will be no more than 5 d? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| g. What is the probability that sum of dice rolls will be more than 11? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| h. What is the expected value of sum of two dice rolls? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| i. What is the standard deviation of this probability distribution? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| j. Write an explanation of what the answers in parts h and I mean. (Make sure that you are not just repeating what the values are but you are explaining the values.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| k. Expalin what type of probability is used in this discrete probability distribution. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In: Statistics and Probability
Complete the methods in AQueue and ArrayQueue
The third pasted code is just the interface.
DO NOT CHANGE ANY CODE ONLY ADD TO THE METHODS IN THE TWO CLASSES DESCRIBED
import java.util.EmptyStackException;
import java.util.NoSuchElementException;
/**
* AQueue provides default implementations for several no-brainer methods in the IQueue interface.
* <p>
* Some methods in IQueue are pairs that do the same job, but report failure differently.
* Implement the fail-by-throwing methods here, in this abstract class,
* by calling the paired method and checking the return value, then throwing as appropriate.
* Why is defining these methods here desirable? What are some alternatives?
* <p>
* created by {@code cspfrederick} and {@code garethhalladay} Fall17 <br>
* inspired by Chris Wilcox
*/
public abstract class AQueue<E> implements IQueue<E> {
// The add method is similar to the offer method except for handling failure.
// Instead of returning false, it throws an IllegalStateException.
@Override
public void add(E item){
// code here
}
// The remove method is similar to the poll method except for handling failure.
// Instead of returning null, it throws a NoSuchElementException.
@Override
public E remove(){
return null;
}
// The element method is similar to the peek method except for handling failure.
// Instead of returning null, it throws a NoSuchElementException.
@Override
public E element(){
return null;
}
// This method should utilize the size method to return the correct result.
@Override
public boolean isEmpty() {
return false;
}
}
------------------------------------------------------------------------------------------------------------------------
import java.util.concurrent.ArrayBlockingQueue;
/**
* ArrayQueue is a FIFO (First In First Out) data structure that stores its elements
* in an array (or something like it, like an {@link java.util.ArrayList}).
* <p>
* Can we use an {@link java.util.ArrayList} to directly represent a queue? A FIFO needs to push on one end,
* and pop from the other. The tail of an {@link java.util.ArrayList} can support pop and push efficiently,
* but the front supports neither efficiently.
* <p>
* Instead, we use an array for storage, and we represent the head and tail of the queue
* with indices into that array. When one of the indices would fall off the end of the array,
* it just goes back to the start of the array. That is why this pattern is called a "circular"
* array. Read more about that <a href=../queue.html>here</a>.
* <p>
* We can think of the head and tail indices "chasing" each other around the circular
* storage. When you add an item, the tail moves. When you take an item, the head moves.
* If the head catches the tail, the queue is empty. If the tail catches the head, the queue is full.
* <p>
* That's a lot to take in, but it's easier to code than it sounds. Notice that the member variables
* "removed" and "added" are counters recording the <i>total</i> operation count. To see where the head and
* tail of the queue are, just compute:
* {@code (removed % elements.length)} or {@code (added % elements.length)}
* <p>
* by {@code cspfrederick} and {@code garethhalladay} Fall17 <br>
* inspired by Chris Wilcox
* @param <E> the type of elements held in this collection
*/
public class ArrayQueue<E> extends AQueue<E> implements IQueue<E>{
/**
* the underlying array for the queue
*/
protected E[] elements;
/**
* the total elements added (set back to zero if clear is called)
*/
protected int added = 0;
/**
* the total elements removed (set back to zero if clear is called)
*/
protected int removed = 0;
/**
* Creates a new queue backed by an array of length {@code maxSize}.
* Use {@link #newArray(int)} to create the elements array.
* @param maxSize the capacity of the queue
* @see #newArray(int)
*/
public ArrayQueue(int maxSize) {
newArray(maxSize);
}
/**
* A helper method to create a new array of the generic type.
* Read the information provided on <a href=../generics.html>generics</a>.
* It walks you through the behavior of this small method.
* @param size the size of the new array
* @return an new instance of an array of type E
*/
protected E[] newArray(int size) {
@SuppressWarnings("unchecked")
E[] arr = (E[]) new Object[size];
return arr;
}
/**
* Adds an element to the queue. If the queue is full, return false,
* otherwise add to the next available position in the queue.
* <p>
* The index of the next available position can be found by calculating
* the remainder of the total number of elements added by the length of the array.
* <p>
* Don't forget to increment the added field!
* @param e the element to add
* @return true if the element can be added, false otherwise
* @see #added
*/
@Override
public boolean offer(E e) {
if(isEmpty()) {
return false;
}
else {
for(int i = 0; i < size(); i++) {
}
}
return true;
}
/**
* Removes the oldest element (the head) from the queue, and returns it.
* If the queue is empty, return null.
* <p>
* The index of the oldest element can be determined by calculating the remainder
* of the total elements removed by the length of the array.
* <p>
* Don't forget to increment the removed field!
* <p>
* @return the oldest element in the queue, or null if the queue is empty
* @see #removed
*/
@Override
public E poll() {
return null;
}
/**
* Returns the oldest element in the queue (the element we would remove next),
* but does not remove it.
* If the queue is empty, return null.
* <p>
* The index of the oldest element can be determined by calculating the remainder
* of the total elements removed by the length of the array.
* @return the oldest element in the array, or null if the queue is empty
*/
@Override
public E peek() {
return null;
}
/**
* @return the difference between the total items added and removed
*/
@Override
public int size() {
return -1;
}
/**
* Clears the queue.
* <p>
* Reset the count for added and removed. Also, either set all slots in
* the backing array to null, or reallocate a fresh array.
* <p>
* Why is this second step desirable? Why not just reset added and removed and call it done?
* @see #newArray(int)
*/
@Override
public void clear() {
// code here
}
@Override
public boolean contains(Object o) {
return false;
}
public static void main(String[] args) {
IQueue<Integer> q = new ArrayQueue<>(10);
q.add(1);
q.offer(2);
q.offer(3);
System.out.println(q.contains(3));
System.out.println(q.poll());
System.out.println(q.size());
// final testing uncomment the following line to get comprehensive testing.
final int hundred_thousand = 100000;
final int million = 1000000;
/*
QueueTestProgram.printFailedTests(hundred_thousand,
ArrayBlockingQueue::new,
ArrayQueue::new);
*/
}
}
----------------------------------------------------------------
import java.util.NoSuchElementException;
/**
* created by {@code cspfrederick} and {@code garethhalladay} Fall17 <br>
* inspired by Chris Wilcox
*/
public interface IQueue<E> {
/**
* Inserts the specified element into this queue,
* returning true upon success.
* <p>
* This method throws an IllegalStateException if no space is available to hold the new item.
* @param item the item to add
* @throws IllegalStateException if the queue is full
*/
void add(E item);
/**
* Inserts the specified element into this queue if it is possible to do so
* immediately without violating capacity restrictions.
* @param e the element to add
* @return true if the element was added, false if the queue was full
*/
boolean offer(E e);
/**
* Retrieves and removes the head of this queue.
* @return the head of this queue, or null if this queue is empty
*/
E poll();
/**
* Retrieves and removes the head of this queue.
* This method differs from poll only in that it throws an exception
* if this queue is empty.
* @return the head of this queue
* @throws NoSuchElementException if this queue is empty
*/
E remove();
/**
* Retrieves, but does not remove, the head of this queue.
* @return the head of this queue, or null if this queue is empty
*/
E peek();
/**
* Retrieves, but does not remove, the head of this queue.
* This method differs from peek only in that it throws an
* exception if this queue is empty.
* @return the head of this queue
* @throws NoSuchElementException if this queue is empty
*/
E element();
/**
* Returns true if this queue contains no elements.
* @return true if this queue is empty, false otherwise
*/
boolean isEmpty();
/**
* Returns the number of elements in this queue.
* @return the number of elements in the queue
*/
int size();
/**
* Removes all of the elements from this queue.
* The queue will be empty after this call returns.
*/
void clear();
/**
* Returns a string representation of this queue.
* The string representation consists of a list of the
* queue's elements in the order they are returned by its iterator,
* enclosed in square brackets ("[]"). Adjacent elements are separated
* by the characters ", " (comma and space). Elements are converted to
* strings as by String.valueOf(Object).
* @return a string representation of this queue
*/
@Override
String toString();
/**
* Returns true if this queue contains the specified element. More formally,
* returns true if and only if this queue contains at least one element e
* such that o.equals(e).
* @param o object to be checked for containment in this queue
* @return true if this queue contains the specified element, false otherwise
*/
boolean contains(Object o);
}
In: Computer Science
A student was in her final term of coding and health information
technology classes. She couldn’t wait to
graduate from one of the highest regarded HIT programs in her
state. She planned to take her
Registered Health Information Technology (RHIT) shortly after
graduation. The student heard how
challenging it was to find a job after graduation with no
experience. Her best friend, was already
working in the field. She gave her the name of a contact at the
state health information management
(HIM) association to see if they needed help at the annual
convention next month. Angela called the
number, and much to her delight, they could use her help! In return
for her volunteering, she was
allowed free admission to the convention. During the convention,
Angela met a lot of industry
professionals, but had difficulty connecting with them due to her
being so nervous! To make matters
worse, most of the people she met were wearing nice business attire
and she was not.
1. How should Angela use this opportunity to network? What should
she do before the conference to be
better prepared?
2. If you were an experienced HIM manager, how might you approach
Angela, or would you?
3. How could Angela improve her chances of getting noticed at the
convention?
In: Nursing
Please assist in the following:
Demand, Supply, and Market Equilibrium
Q1. The general demand function for good A is
Qd = 754 + 2PA - 0.05M + 6 PB + 10 T + 3 PE + 2N
where Qd = quantity demanded of good A each month, PA = price of good A, M = average household income, PB = price of related good B, T = a consumer taste index ranging in value from 0 to 10 (the highest rating), PE = price consumers expect to pay next month for good A, and N = number of buyers in the market for good A.
a. Interpret the intercept parameter in the general demand function. (1 point)
b. What is the value of the slope parameter for the price of good A? Does it have the correct algebraic sign? Why? (1 point)
c. Interpret the slope parameter for income. Is good A normal or inferior? Explain. (1 point)
d. Are goods A and B substitutes or complements? Explain. Interpret the slope parameter for the price of good B. (1 point)
e. Are the algebraic signs on the slope parameters for , PE, and N correct? Explain. (1 point)
f. Calculate the quantity demanded of good A when PA = $2, M = $60,000, PB =$24, = 7, PE = $12, and N = 12,000. (2.5 point)
In: Economics
In: Accounting
The following information relates to the defined benefit pension plan of the Kraemerica Company. Only a single employee is covered by the plan. That employee has worked for Kraemerica since 1-1-2014 and she has earned pension benefits since 1-1-2014. Additional information is provided below.
1) Benefit formula: Upon retirement and upon reaching age 65, the employee will receive a pension payment annually (payments to be made as long as employee lives).
The first check will be issued one year after retirement.
The annual payment will be for 3% of employee’s highest annual salary multiplied by the number of years of service.
His salary has increased each year and is expected to increase each year in the future.
2) Expected Retirement Date: December 31, 2022 - he will reach age 65 at this time; first pension check is expected to be issued 12-31-2023
3) Expected Date of Death: January 1, 2030 (last (7th) pension check is expected to be issued 12-31-2029)
4) Actuary’s Discount Rate (Settlement Rate): 6% per year
5) Actual Annual Salary for 2016: $60,000
6) Expected Annual Salary for 2022: $70,000
What is the projected benefit obligation (PBO) as of 12-31-2016 ?
In: Finance
The following information relates to the defined benefit pension plan of the Kraemerica Company. Only a single employee is covered by the plan. That employee has worked for Kraemerica since 1-1-2014 and she has earned pension benefits since 1-1-2014. Additional information is provided below.
1) Benefit formula: Upon retirement and upon reaching age 65, the employee will receive a pension payment annually (payments to be made as long as employee lives).
The first check will be issued one year after retirement.
The annual payment will be for 3% of employee’s highest annual salary multiplied by the number of years of service.
His salary has increased each year and is expected to increase each year in the future.
2) Expected Retirement Date: December 31, 2022 - he will reach age 65 at this time; first pension check is expected to be issued 12-31-2023
3) Expected Date of Death: January 1, 2030 (last (7th) pension check is expected to be issued 12-31-2029)
4) Actuary’s Discount Rate (Settlement Rate): 6% per year
5) Actual Annual Salary for 2016: $60,000
6) Expected Annual Salary for 2022: $70,000
What is the projected benefit obligation (PBO) as of 12-31-2016 ?
In: Finance