Questions
Let V and W be finite dimensional vector spaces over a field F with dimF(V )...

Let V and W be finite dimensional vector spaces over a field F with dimF(V ) = dimF(W ) and let T : V → W be a linear map. Prove there exists an ordered basis A for V and an ordered basis B for W such that [T ]AB is a diagonal matrix where every entry along the diagonal is either a 0 or a 1.

In: Math

Prove 1. For each u ∈ R n there is a v ∈ R n such...

Prove

1. For each u ∈ R n there is a v ∈ R n such that u + v= 0

2. For all u, v ∈ R n and a ∈ R, a(u + v) = au + av

3. For all u ∈ R n and a, b ∈ R, (a + b)u = au + bu

4.  For all u ∈ R n , 1u=u

In: Advanced Math

Assume that random variable x^2 has a chi-squared distribution with v degree of freedom. Find the...

Assume that random variable x^2 has a chi-squared distribution with v degree of freedom. Find the value of “A” for the following cases

1) P(X^2 <=A) =.95 when v = 6

2) P(X^2>=A) =.01 when v = 21

3) P(A <= X^2 <= 23.21)= .015 when v = 10.

In: Math

As shown in the figure below, a bullet is fired at and passes through a piece...

As shown in the figure below, a bullet is fired at and passes through a piece of target paper suspended by a massless string. The bullet has a mass m, a speed v before the collision with the target, and a speed (0.496)v after passing through the target. The collision is inelastic and during the collision, the amount of kinetic energy lost by the bullet and paper is equal to [(0.263)Kb BC] , that is, 0.263 of the kinetic energy of the bullet before the collision. Determine the mass M of the target and the speed V of the target the instant after the collision in terms of the mass m of the bullet and speed v of the bullet before the collision. (Express your answers to at least 3 decimals.)

V =  ? v

M =  ? m

In: Physics

1) A) Write v as a linear combination of u1, u2, and u3, if possible. (Enter...

1)

A) Write v as a linear combination of u1, u2, and u3, if possible. (Enter your answer in terms of u1, u2, and u3. If not possible, enter IMPOSSIBLE.)

v = (−1, 7, 2), u1 = (2, 1, 5), u2 = (2, −3, 1), u3 = (−2, 3, −1)

B) Write v as a linear combination of u and w, if possible, where u = (1, 3) and w = (2, −1). (Enter your answer in terms of u and w. If not possible, enter IMPOSSIBLE.)

v = (−3, −9)

C) Find w such that 2u + v − 3w = 0.

u = (0, 0, −6, 2),

v = (0, −3, 5, 1)

In: Advanced Math

In this assignment, you are required to write the SQL statements to answer the following queries...

In this assignment, you are required to write the SQL statements to answer the following queries using PostgreSQL system.

The SQL statements comprising the DDL for Henry Books Database are given to you in two files. For that database, answer the following queries. Create the files Q1 to Q10 in PostgreSQL. Do follow the restrictions stated for individual queries.

1. List the title of each book published by Penguin USA. You are allowed to use only 1 table in any FROM clause.

2. List the title of each book that has the type PSY or whose publisher code is JP. You are allowed to use only one condition term in any WHERE clause; i.e., don't use AND/OR boolean operations.

3. List the title of each book that has the type CMP, HIS, or SCI. You are allowed to use only one condition term in any WHERE clause.

4. List the title of each book written by John Steinbeck and that has the type FIC.

5. For each book, list the title (sorted alphabetically), publisher code, type and author names (in the order listed on the cover).

6. How many book copies have a price that is greater than $20 and less than $25?

7. For each publisher, list the publisher name and the number of books published by it, only if the publisher publishes at least 2 books.

8. For each book copy available at the Henry on the Hill branch whose quality is Excellent, list the book's title (sorted alphabetically) and author names (in the order listed on the cover).

9. Create a new table named FictionCopies using the data in the bookCode, title, branchNum, copyNum, quality, and price columns for those books that have the type FIC. You should do this in two steps: 9A) Create the table, and 9B) populate it with the said data.

10. Ray Henry is considering increasing the price of all copies of fiction books whose quality is Excellent by 10%. To determine the new prices, list the bookCode, title, and increased price of every book in Excellent condition in the FictionCopies table. You are not allowed to modify the prices in the table, just show them.

DB1: https://users.cs.fiu.edu/~navlakha/4710/HenryPSQL.sql

DB2: https://users.cs.fiu.edu/~navlakha/4710/HenryInventory.sql

In: Computer Science

open up a new Java project on Eclipse named Review and create a new class called...

  • open up a new Java project on Eclipse named Review and create a new class called Review.java.
  • Copy and paste the below starter code into your file:

/**

* @author

* @author

* CIS 36B
*/

//write your two import statements here

public class Review {
  
    public static void main(String[] args) { //don't forget IOException
        File infile = new File("scores.txt");
        //declare scores array
        //Use a for or while loop to read in data from scores.txt to the array
        //call method
        //Use a for loop to write data from array into extraCredit.txt
      
    }
    
        
    /**
     * Write complete Javadoc comment here
     */
    //write your addExtraCredit method here   
  
}

  • Next, create a new text file named scores.txt
    • Rick-click the project. Go to New->File.
    • Name your file scores.txt
    • Make sure the text file gets saved inside the overall project folder (Review), not in the src folder
  • Now, copy and paste the following data (exam scores) into your scores.txt file:

90
95
86
41
79
56
90
83
74
98
56
81
64
99
12

  • Your program must declare an array of integers, and populate the array with the contents of the file.
    • You may assume that the length of the array is known to be 15 elements.
  • Next, write a method called addExtraCredit:
    • The addExtraCredit method takes in one parameter - an array of integers
    • It adds 2 to each element in the array (hint: think for loop)
    • It returns nothing
  • Inside of main, call the addExtraCredit method, passing it the array of exam scores.
  • Next, write the contents of the array to a file named extraCredit.txt.
    • Use PrintWriter to write out to the file (see lesson notes above).
  • When you are finished, extraCredit.txt should contain the following:
    • Don't forget the title!

Scores with Extra Credit:
92
97
88
43
81
58
92
85
76
100
58
83
66
101
14

  • Hint: Your program should include either 3 for loops or 2 for loops and a while loop.
  • If you get stuck, review today's lesson notes.
  • When extraCredit.txt contains the above data, submit your program to Canvas.
  • Both partners must submit to receive credit.

In: Computer Science

In a certain city, 30% of the families have a MasterCard, 20% have an American Express...

In a certain city, 30% of the families have a MasterCard, 20% have an American Express card, and 25% have a Visa card. Eight percent of the families have both a MasterCard and an American Express card. Twelve percent have both a Visa card and a MasterCard. Six percent have both an American Express card and a Visa card.

31. Is possession of a Visa card independent of possession of a MasterCard? Why or why not?

No, because P (M | V) ≠ P (V)

No, because P (V | M) ≠ P (V)

Yes, because P (M) = P(V)

Yes, because P (V ∩ M) ≠ 0

No, because Visa and MasterCard are different things

32. If a family has a Visa card, what is the probability that it has a MasterCard?

0.25

0.12

0.39

0.48

0.40

33.Is possession of an American Express card mutually exclusive of possession of a Visa card? Why or why not?

No, because P (A ∩ V) ≠ P (V)

Yes, because P (A ∩ V) = .0000

No, because P (A ∩ V) ≠ .0000

Yes, because P (V ∩ A) ≠ P (A)

No, because American Express and Visa card are different things

34.What is the probability of selecting a family that has either a Visa card or an American Express card?

0.25

0.20

0.37

0.33

0.39

35.If a family has a MasterCard, what is the probability that it has a Visa card?

0.48

0.12

0.30

0.20

0.40

36.What is the probability of selecting a family that has either a Visa card or a MasterCard?

0.25

0.30

0.55

0.43

0.12

In: Statistics and Probability

1.What was the author's (or authors') primary goal in conducting this research?

Answer questions after reading the below article :

Article: Does Aspirin Reduce Heart Attack Rates?

In 1988, the Steering Committee of the Physicians ‘Health Study Research Group released the results of five-year randomized experiment conducted using 22,071 male physicians between the ages of 40 and 84. The purpose of the experiment was to determine whether taking aspirin reduces the risk of a heart attack. The physicians had been randomly assigned to one of the two treatment groups. One group took an ordinary aspirin tablet every other day, while the other group took a placebo. None of the physicians knew whether he was taking the actual aspirin or the placebo. The results, shown below, support the conclusion that taking aspirin does indeed help to reduce the risk of having a heart attack.

Treatment Heart Attacks Doctor in Group Attacks per 1000 Doctors
Aspirin 104 11,037 9.42
Placebo 189 11,034 17.13

The rate of heart attacks in the group taking aspirin was only about half the rate of heart attacks in the placebo group. In the aspirin group, there were 9.42 heart attacks per 1000 participating doctors, while in the placebo group, there were 17.13 heart attacks per 1000 participants. Because the men in this experiment were randomly assigned to the two conditions, other important risk factors such as age amount of exercise, dietary habits should have been similar for the two groups. The only important difference between the two groups should have been whether they took aspirin or a placebo. This makes it possible to conclude that taking aspirin actually caused the lower rate of heart attacks foe the group.

QUESTIONS

1.What was the author's (or authors') primary goal in conducting this research? (2 pts)

2.Identify the population of the study. (2 pts)

3. Identify the sample of the study. (2 pts)

4. Was the study observational or experimental? Explain. (2 pts)

5. Did you find the article interesting? Why or why not? (2 pts)

6. What type of data was analyzed: qualitative or quantitative? Explain. (2 pts)

7. How did the author choose to present the analysis (type of graphs/tables, etc.)? Was the table or graph appropriate for the type of data used? Explain. (2 pts)

8. Is the presentation of the study clear and concise? Why or why not?   (2 pts)

9. Using all of the data, summarize the final conclusions that were made.  (2 pts)

10. With the data and information provided, can you make any predictions or informed decisions? If not, why? If so, what are your predictions or decisions? (4 pts)

11. What are the practical implications for the results of this article? Explain. (4 pts)

12. Which statistical concepts could you identify from the concepts discussed so far in class? List the words/concepts used in the article that have been discussed in class.(2 pts)

In: Statistics and Probability

Simulate a fast-food ordering scenario by defining four Python classes: a) Lunch: Main class b) Customer:...

Simulate a fast-food ordering scenario by defining four Python classes: a) Lunch: Main class b) Customer: the person that buys food c) Employee: the person that accepts a customer order d) Food: what the customer buys

Create all the classes in one module and a separate test module where instances of the class are created, and the methods are tested with appropriate instances. To start, here are the classes and methods you should define and complete:

class Lunch:

def __init__(self) # include Customer and Employee

def order(self, foodName)# start a Customer order simulation

def result(self) # Ask the Customer food preference

class Customer:

def __init__(self) # initialize my food to None

def placeOrder(self, foodName, emp) # place order from Employee

def printFood(self) # print the name of my food

class Employee:

def takeOrder(self, foodName) # return name of Food requested

class Food: def __init__(self, name) # store food name

The simulation works as follows:

a. The Lunch class’s constructor should make and embed an instance of Customer and Employee, and export a method called order. When called, this order method should ask the Customer to place an order, by calling its placeOrder method. The Customer’s placeOrder method should in turn ask the Employee object for a new Food object, by calling the Employee’s takeOrder method.

b. Food objects should store a food name string (e.g., "biryani"), passed down from objects of Lunch.order to Customer.placeOrder, to Employee.takeOrder, and finally to Food’s constructor. The top-level Lunch class should also export a method called result, which SWE 321 – OOP Lab. College of Technological Innovations (CTI) 21 asks the customer to print the name of the food it received from the Employee via the order (this can be used to test your simulation).

c. Note that Lunch needs to either pass the Employee to the Customer, or pass itself to the Customer, in order to allow the Customer to call Employee methods

d. Experiment with your classes interactively by importing the Lunch class, calling its order method to run an interaction, and then calling its result method to verify that the Customer got what he or she ordered.

e. In this simulation, the Customer is the active agent; how would your classes change if Employee were the object that initiated customer/ employee interaction instead?

In: Computer Science