Create a MATLAB code that does the following
Given the vector y=[0,-0.2,0.4,-0.6,0.8,-1.0,-1.2,-1.4,1.6]. If z=sin(y), then:
Determine the minimum and maximum of only the negative values of z and then determine the square root of only the positive values of z.
In: Computer Science
A buffer composed of 0.50 mol acetic acid (HC2H3O2) and 0.50 mol sodium acetate (Na+C2H3O2-) is diluted to a volume of 1.0 liter. The pH of the buffer is 4.74. How many moles of NaOH must be added to the buffer to raise its pH to 5.74?
In: Chemistry
At 25 degrees celsius only .0640 mol of the generic salt AB2 is soluble in 1.00 L of water. What is the Ksp of the salt at 25 degrees celsius. I got 1.0 X 10^-3 but the computer says its wrong. Plse help
In: Chemistry
Estimate the mass of the Sun from the orbital period of the Earth (it’s presumed you know what this is !) and the Earth’s orbital radius of 93 million miles. If the Sun’s radius is 109 times that of the Earth, what is the Sun’s mean density? What is the acceleration due to gravity on the Sun’s surface? Is it sensible to go and measure this at night?
In: Physics
The average stopping distances for a population of school buses traveling 50 miles per hour, measured in feet, are normally distributed, with a standard deviation of 6 feet. Using a random sample of 23 buses having a sample mean of 262 feet, construct a 95% confidence interval for the mean stopping distance of the population.
In: Statistics and Probability
Suppose you sample 19 high school baseball pitchers and find that they have an average pitching speed of 87 miles per hour with a standard deviation of 0.98 mph. Find a 95% confidence interval for the average pitching speed of all high school baseball pitchers. Assume that the population is normally distributed.
In: Statistics and Probability
A fisherman can row upstream at 4mph and downstream at 6mph. He started rowing upstream until he got tired and then rowed downstream to his starting point. How far did the fisherman row if the entire trip too 6 hours?
The distance the fisherman rowed in ----- miles
(Type an integer or a decimal)
In: Math
We know how difficult it is to find a convincing instrumental variable Zi to overcome the “unobserved ability” problem in a wage regression to measure the returns to education. Critically discuss whether Zi =”distance in miles of high school location of workeri to closest four year college”satisfies the two properties of a valid instrument.
In: Economics
Java homework problem. This is my hotel reservation system. I'm trying to add a few things to it.
You will be changing your Hotel Reservation system to allow a user to serve more rooms and the rooms will be created as objects.
For this project you will be modifying the Hotel Reservation system to allow a user to serve more rooms and the rooms will be created as objects.
You will be create a Room object that will allow the user to set the type of room, if they want pets, and if they want Oceanview.
OV is $50 more
Pets $25 more
King, Suite and Queen style rooms and you can set the prices
You will have an array for username and password that hold 3 userNames and 3 passwords. These will be parallel arrays. I am allowed to enter username and password 3 times and then I get kicked out.
Main
The main method will keep track of information for 5 room reservations objects all for 1 night
Be sure to use looping, somewhere in the main java file.
Create a method that will catch the object and create it. Remember you can pass by reference or return the object back to the main.
Create a method to handle printing out each of the objects to the screen and the total for each room. (You can set this total in the Room Class if you wish.)
Finally Create a method that will show out the grand total.
Here is my original code to be modified:
import java.util.Scanner;
import javax.swing.JOptionPane;
import java.text.DecimalFormat;
public class hotelreservation {
public static double
roomSelection(Scanner scan)
{
String roomSelection;
System.out.print("Please enter
the type of room desired for your stay (King/Queen/Suite/Two
doubles): ");
roomSelection =
scan.nextLine();
if(roomSelection.equalsIgnoreCase("Suite"))
return
275;
else
if(roomSelection.equalsIgnoreCase("Queen"))
return
150;
else
if(roomSelection.equalsIgnoreCase("King"))
return
150;
else
return
125;
}
public static double roomOceanView(Scanner
scan)
{
String response;
System.out.print("Would you
like an oceanview room (Yes/No) ? ");
response =
scan.nextLine();
if(response.equalsIgnoreCase("Yes"))
return
45;
else
return
0;
}
public static double roomPets(Scanner scan)
{
String response;
System.out.print("Do you have
any pets (Yes/No) ? ");
response =
scan.nextLine();
if(response.equalsIgnoreCase("Yes"))
return
50;
else
return
0;
}
public static void main(String[] args) {
DecimalFormat decFormat = new
DecimalFormat("0.00");
Scanner scan = new
Scanner(System.in);
double roomReservation[] = new
double[3];
double subTotal = 0;
for(int x=0;x
{
System.out.println("Welcome to our Hotel Room Reservation Pricing
System.");
System.out.println("Please answer the following questions regarding
your reservation of room #"+(x+1)+" : ");
roomReservation[x] = roomPets(scan);
roomReservation[x] += roomSelection(scan);
roomReservation[x] += roomOceanView(scan);
}
for(int x=0;x
{
System.out.println("Total cost for room #"+(x+1)+" :
$"+decFormat.format(roomReservation[x]));
subTotal += roomReservation[x];
}
System.out.println("Subtotal:
$"+decFormat.format(subTotal));
double tax =
subTotal*0.05;
System.out.println("Total Tax
(5%): $"+decFormat.format(tax));
System.out.println("Grand
Total: $"+(decFormat.format(subTotal+tax)));
scan.close();
}
}
In: Computer Science
Discussion Question - There is an ongoing debate about the roles of quantitative and qualitative inputs in demand estimation and forecasting. Those in the qualitative camp argue that statistical analysis can only go so far. Demand estimates can be further improved by incorporating purely qualitative factors. Quantitative advocates insist that qualitative, intuitive, holistic approaches only serve to introduce errors, biases, and extraneous factors into the estimation task.
Suppose the executive for the theater chain is convinced that any number of bits of qualitative information (the identity of the director, the film’s terrific script and rock-music sound track, the Hollywood “buzz” about the film during production, even the easing of his ulcer) influence the film’s ultimate box-office revenue.
How might one test which approach—purely qualitative or statistical— provides better demand or revenue estimates? Are there ways to combine the two approaches? Provide concrete suggestions.
In: Economics