Questions
Assume that the age at onset of a certain disease is distributed normally with a mean...

Assume that the age at onset of a certain disease is distributed normally with a mean of 41 years and a variance of 240.25 years.

a) What is the probability that an individual afflicted with the disease developed it before age 38?
probability =

b) What is the probability that an individual afflicted with the disease developed it after age 49?
probability =

c) What is the probability that an individual afflicted with the disease developed it between ages 38 and 49?
probability =

Note: Do NOT input probability responses as percentages; e.g., do NOT input 0.9194 as 91.94.

In: Statistics and Probability

A fair quarter is flipped three times. For each of the following probabilities, use the formula...

A fair quarter is flipped three times. For each of the following probabilities, use the formula for the binomial distribution and a calculator to compute the requested probability. Next, look up the probability in the binomial probability distribution table. (Enter your answers to three decimal places.)

(a) Find the probability of getting exactly three heads.


(b) Find the probability of getting exactly two heads.


(c) Find the probability of getting two or more heads.


(d) Find the probability of getting exactly three tails.

In: Statistics and Probability

Consider the sample space S=​{ᴏ₁, ᴏ₂, ᴏ₃, ᴏ₄, ᴏ₅​}. Suppose that Pr (ᴏ₁) =0.17 and Pr...

Consider the sample space S=​{ᴏ₁, ᴏ₂, ᴏ₃, ᴏ₄, ᴏ₅​}. Suppose that Pr (ᴏ₁) =0.17 and Pr (ᴏ₂) =0.47.

​(a)

Find the probability assignment for the probability space when ᴏ₃​, ᴏ₄​, and ᴏ₅ all have the same probability.

​(b)

Find the probability assignment for the probability space when Pr (ᴏ₅) =0.15 and ᴏ₅ has the same probability as ᴏ₄ and ᴏ₅ combined.

  1. ​The probability assignment is Pr (ᴏ₁)=

         Pr (ᴏ₂)=

​                                                  Pr (ᴏ₃)=

​                                                  Pr (ᴏ₄)=

​                                                                Pr (ᴏ₅)=

In: Statistics and Probability

Given a normal population whose mean is 645 and whose standard deviation is 36, find each...

Given a normal population whose mean is 645 and whose standard deviation is 36, find each of the following:

A. The probability that a random sample of 7 has a mean between 651 and 655.

Probability =

B. The probability that a random sample of 14 has a mean between 651 and 655.

Probability =

C. The probability that a random sample of 27 has a mean between 651 and 655.

Probability =

In: Statistics and Probability

Given a normal population whose mean is 540 and whose standard deviation is 66, find each...

Given a normal population whose mean is 540 and whose standard deviation is 66, find each of the following:

A. The probability that a random sample of 6 has a mean between 554 and 568.

Probability =

B. The probability that a random sample of 16 has a mean between 554 and 568.

Probability =

C. The probability that a random sample of 21 has a mean between 554 and 568.

Probability =

In: Statistics and Probability

Given a normal population whose mean is 670 and whose standard deviation is 67, find each...

Given a normal population whose mean is 670 and whose standard deviation is 67, find each of the following:

A. The probability that a random sample of 5 has a mean between 675 and 693.

Probability =

B. The probability that a random sample of 15 has a mean between 675 and 693.

Probability =

C. The probability that a random sample of 24 has a mean between 675 and 693.

Probability =

In: Statistics and Probability

PLEASE DONT FORGET TO SOLVE THE ASSIGNMENT QUESTION MOST IMP: Ex1) Download the code from the...

PLEASE DONT FORGET TO SOLVE THE ASSIGNMENT QUESTION MOST IMP:

Ex1) Download the code from the theory section, you will find zipped file contains the code of Singly linked list and Doubly linked list, in addition to a class Student.

In Class SignlyLinkedList,

1. There is a method display, what does this method do?

2. In class Test, and in main method, create a singly linked list objet, test the methods of the list.

3. To class Singly linked list, add the following methods:

a- Method get(int n), it returns the elements in the node number n, assume the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise method get returns null.

What is the complexity of your method? Test the method in main.

b- Method insertAfter(int n, E e), its return type is void, it inserts element e in a new node after the node number n, assume the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise through an exception.

What is the complexity of your method?

Test the method in main.

c- Method remove(int n): it removes the node number n, and returns the element in that node, assuming the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise method get returns null.

What is the complexity of your method?

Test the method in main.

d- Method reverse( ): it has void return type. It reverse the order of the elements in the singlylinked list.

What is the complexity of your method?

Test the method in main.

Ex2) In Class DoublyLinkedList

1. There are two methods printForward, printBackward, what do they do?

2. In class Test, and in main method, create a doubly linked list objet, test the methods of the list.

4. To class Doubly linked list, add the following methods:

e- Method get(int n), it returns the elements in the node number n, assume the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise method get returns null.

To make your code more efficient, you should start from the end (header or trailer) that is closer to the target node.

What is the complexity of your method?

Test the method in main.

f- Method insertAfter(int n, E e), its return type is void, it inserts element e in a new node after the node number n, assume the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise through an exception. . To make your code more efficient, you should start from the end (header or trailer) that is closer to the target node.

What is the complexity of your method?

Test the method in main.

g- Method remove(int n): it removes the node number n, and returns the element in that node, assuming the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise method get returns null. To make your code more efficient, you should start from the end (header or trailer) that is closer to the target node.

What is the complexity of your method?

Test the method in main.

Assignment:

To class DoublyLinedList, add method remove(E e) which removes all nodes that has data e. This method has void return type.

doubly package:

doublylinkedlist class:

package doubly;

public class DoublyLinkedList <E>{
   private Node<E> header;
   private Node<E> trailer;
   private int size=0;
   public DoublyLinkedList() {
       header=new Node<>(null,null,null);
       trailer=new Node<>(null,header,null);
       header.setNext(trailer);
   }
   public int size() { return size;}
   public boolean isEmpty() {return size==0;}
   public E first()
   {
   if (isEmpty()) return null;
       return header.getNext().getData();
   }
   public E last()
   {
       if (isEmpty()) return null;
           return trailer.getPrev().getData();
   }
  
   private void addBetween(E e, Node<E> predecessor, Node<E> successor)
   {
       Node<E> newest=new Node<>(e,predecessor,successor);
       predecessor.setNext(newest);
       successor.setPrev(newest);
       size++;
      
   }
   private E remove(Node<E> node)
   {
       Node<E> predecessor=node.getPrev();
       Node<E> successor=node.getNext();
       predecessor.setNext(successor);
       successor.setPrev(predecessor);
       size--;
       return node.getData();
   }
   public void addFirst(E e){
       addBetween(e,header,header.getNext());
   }
   public void addLast(E e){
       addBetween(e,trailer.getPrev(),trailer);
   }
  
   public E removeFirst(){
       if(isEmpty()) return null;
       return remove(header.getNext());
   }
  
   public E removeLast()
   {
   if(isEmpty()) return null;
   return remove(trailer.getPrev());
   }
   public void printForward()
   {
       for (Node<E> tmp=header.getNext();tmp!=trailer;tmp=tmp.getNext())
           System.out.println(tmp.getData());
   }
  
   public void printBackward()
   {
       for (Node<E> tmp=trailer.getPrev();tmp!=header;tmp=tmp.getPrev())
           System.out.println(tmp.getData());
   }
  
  
}

node class:

package doubly;

public class Node <E>{
   private E data;
   private Node<E> prev;
   private Node<E> next;
  
   public Node(E d, Node<E> p,Node<E> n)
   {
   data=d;
   prev=p;
   next=n;
   }
   public E getData() { return data; }
   public Node<E> getNext(){ return next; }
   public Node<E> getPrev(){ return prev; }
   public void setNext(Node<E> n) { next=n;}
   public void setPrev(Node<E> p) { prev=p;}

}

student class:

package doubly;

public class Student {
private int id;
private String name;
public Student(int id, String name) {
   super();
   this.id = id;
   this.name = name;
}
public int getId() {
   return id;
}
public void setId(int id) {
   this.id = id;
}
public String getName() {
   return name;
}
public void setName(String name) {
   this.name = name;
}
@Override
public String toString() {
   return "[id=" + id + ", name=" + name + "]";
}

}

test class:

package doubly;

public class Test {
public static void main(String arg[])
{
   DoublyLinkedList<Student> myList=new DoublyLinkedList<>();
   myList.addFirst(new Student(1,"Ahmed"));
   myList.addFirst(new Student(2,"Khaled"));
   myList.addLast(new Student(3,"Ali"));
   myList.removeLast();
   myList.printForward();
  
  
  
  
}
}

singly package:

node class:

package Singly;

public class Node <E>{
   private E data;
   private Node<E> next;
   public Node(E d, Node<E> n)
   {
   data=d;
   next=n;
   }
   public E getData() { return data; }
   public Node<E> getNext(){ return next; }
   public void setNext(Node<E> n) { next=n;}

}

SinglyLinkedList class:

package Singly;

public class SinglyLinkedList <E>{
   private Node<E> head=null;
   private Node<E> tail=null;
   private int size=0;
   public SinglyLinkedList() { }
   public int size() { return size;}
   public boolean isEmpty() {return size==0;}
   public E first()
   {
   if (isEmpty()) return null;
       return head.getData();
   }
   public E last()
   {
       if (isEmpty()) return null;
           return tail.getData();
   }
   public void addFirst(E e)
   {
   head=new Node<>(e,head);
   if(size==0)
       tail=head;
   size++;

   }
   public void addLast(E e)
   {
   Node<E> newest=new Node<>(e,null);
   if(isEmpty())
       head=newest;
   else
       tail.setNext(newest);

   tail=newest;
   size++;
   }

   public E removeFirst()
   {
       if(isEmpty()) return null;
       E answer=head.getData();
       head=head.getNext();
       size--;
       if (size==0)
           tail=null;
       return answer;
   }
   public E removeLast()
   {
   if(isEmpty()) return null;
   E answer=tail.getData();
   if (head==tail)
       head=tail=null;
   else
   {
   Node<E> tmp=head;
   while (tmp.getNext()!=tail)
       tmp=tmp.getNext();
   tmp.setNext(null);
   tail=tmp;
   }
   size--;
   return answer;
   }
public void display() {
   for (Node<E> tmp=head;tmp!=null;tmp=tmp.getNext())
       System.out.println(tmp.getData());
}
}

Student class:

package Singly;

public class Student {
private int id;
private String name;
public Student(int id, String name) {
   super();
   this.id = id;
   this.name = name;
}
public int getId() {
   return id;
}
public void setId(int id) {
   this.id = id;
}
public String getName() {
   return name;
}
public void setName(String name) {
   this.name = name;
}
@Override
public String toString() {
   return "[id=" + id + ", name=" + name + "]";
}

}
test class:

package Singly;

public class Test {
public static void main(String arg[])
{
   SinglyLinkedList<Student> myList=new SinglyLinkedList<>();
   myList.addFirst(new Student(1,"Ahmed"));
   myList.addFirst(new Student(2,"Khaled"));
   myList.addLast(new Student(3,"Ali"));
   Student x=myList.removeLast();
  
   myList.display();
   System.out.println(myList.size());
  
}
}

In: Computer Science

A system consists of three components, namely Component A, Component B and Component C, placed in...

A system consists of three components, namely Component A, Component B and Component C, placed in series. A study revealed the following information:

(i) The probability that Component A fails in a week is 0.023;

(ii) The probability that Component B fails in a week is 3 times the probability that both Component B and Component C fail in a week;

(iii) the probability that Component C fails in a week is 9 times the probability that Component A and Component B but not Component C fails in a week;

(iv) The probability that Component A and Component B fail in a week is 0.005;

(v) The probability that Component A and Component C fail in a week is 4 times the probability that all three components fail in a week;

(vi) The probability that Component B or Component C but not both fail in a week is 0.033;

(vii) The probability that all three components fail in a week is 0.002.

(a) Construct a Venn diagram for the above situation with clear definition of events and probabilities shown.

(b) Calculate the probability that no component fails in a week.

(c) If there is exactly one component failed in a week, what the probability that the failed component is Component A?

In: Statistics and Probability

The weather during a Bloodhound game is somewhat unpredictable. It may be sunny, cloudy or rainy....

The weather during a Bloodhound game is somewhat unpredictable. It may be sunny, cloudy or rainy. The probability of sunny weather is 0.42. The probability of cloudy weather is 0.38. The probability of rainy weather is .20. John Jay, mighty center-fielder for the Bloodhounds, is colorblind. Thus, if it is sunny, he has a 0.19 probability of hitting a home run in a game; if it cloudy, he has a 0.12 probability of hitting a home run in a game; if it is rainy, he has a 0.17 probability of hitting a home run in a game. The Bloodhounds play a game, say G.

a. What is the probability that John Jay hits a home run in G
b. What is the probability that John Jay does not hit a home run in G?
c. Find the conditional probability that John Jay hits a home run in G given that it rains?
d. What is the probability that it rains, and John Jay hits a home run?
e. If John Jay hits a home run, what is the probability that it rained?
f. If weather is independent from day to day then what is the probability that it is sunny 3 days in a row.

In: Statistics and Probability

complex number

Find the algebraic form of the following complex number \( (1+i\sqrt{3}) ^{2000} \)

In: Math