Method: ArrayList<Integer> diff(ArrayList<Integer> list1, ArrayList<Integer> list2) diff() method accepts two ArrayLists of Integer and returns the union of elements in two lists. For example: list1 contains elements [1, 2, 3, 4, 5] list2 contains elements [3, 4, 5, 6, 7] Diff() method should return an array list with elements [1, 2, 3, 4, 5, 6, 7].
In: Computer Science
Balance the following reactions in BASIC conditions. Show all steps.
1) Mg + NO3-1 ---> Mg +2 + N2
2) MnO4-1 + H2SO3 ---> Mn2+ + SO4-2
3) Cl-1 + MnO4-1---> ClO3-1 + MnO2
4) MnO4-(aq) + Fe2+(aq) ---> Mn2+(aq) + Fe3+(aq)
In: Chemistry
This is in Python I am getting an error when I run this program, also I cannot get any output. Please help!
#Input Section
def main():
name=input("Please enter the customer's name:")
age=int(input("Enter age of the customer: "))
number_of_traffic_violations=int(input("Enter the number of traffic
violations: "))
if age <=15 and age >= 105:
print('Invalid Entry')
if number_of_traffic_violations <0:
print('Invalid Entry')
#Poccessing Section
def Insurance():
if age < 25 and number_of_tickets >= 4 and riskCode ==
1:
insurancePrice = 480
elif age >= 25 and number_of_tickets >= 4 and riskCode ==
1:
insurancePrice = 410
elif age < 25 and number_of_tickets == 3 and riskCode ==
2:
insurancePrice = 450
elif age >= 25 and number_of_tickets == 3 and riskCode ==
2:
insurancePrice = 390
elif age < 25 and number_of_tickets == 2 and riskCode ==
2:
inurancePrice = 405
elif age >= 25 and number_of_tickets == 2 and riskCode ==
2:
insurancePrice = 365
elif age < 25 and number_of_tickets == 1 and riskCode ==
3:
insurancePrice = 380
elif age >= 25 and number_of_tickets == 1 and riskCode ==
3:
insurancePrice = 315
elif age < 25 and number_of_tickets == 0 and riskCode ==
4:
insurancePrice = 325
elif age >= 25 and number_of_tickets == 0 and riskCode ==
4:
insurancePirce = 275
else:
insurancePrice = 0
def calc():
if number_of_traffic_violations >=4:
riskCode = 1
riskType = 'high'
elif number_of_traffic_violations == 3:
riskCode = 2
riskType = 'moderate'
elif number_of_traffic_violations == 2:
riskCode =3
riskType = 'moderate'
elif number_of_traffic_violations == 1:
riskCode = 4
riskType = 'low'
elif number_of_traffic_violations == 0:
riskCode = 5
riskType = 'no'
else:
riskCode = 0
riskType = 0
# OUTPUT SECTION
print(name,' as a ', riskType , ' risk driver, insurance Price will
cost $', format(insurancePrice, '.2f'))
main()
In: Computer Science
The following data was collected to explore how a student's age and GPA affect the number of parking tickets they receive in a given year. The dependent variable is the number of parking tickets, the first independent variable (x1x1) is the student's age, and the second independent variable (x2x2) is the student's GPA.
Age GPA Number of Tickets
21 2 4
19 2 7
25 2 5
21 2 1
20 4 8
25 4 4
24 3 1
20 2 3
22 4 3
1.) Find the p-value for the regression equation that fits the given data. Round your answer to four decimal places.
2.) Determine if a statistically significant linear relationship exists between the independent and dependent variables at the 0.05 level of significance. If the relationship is statistically significant, identify the multiple regression equation that best fits the data, rounding the answers to three decimal places. Otherwise, indicate that there is not enough evidence to show that the relationship is statistically significant. y = ___ + ___x1+____x2 or there is not enough evidence
If you can guide me on how to find the p-value in excel that would be much appreciated!
Cheers
In: Statistics and Probability
Consider a simple linear model Yi = β1 + β2Xi + ui . Suppose that we have a sample with 50 observations and run OLS regression to get the estimates for β1 and β2. We get βˆ 2 = 3.5, P N i=1 (Xi − X¯) 2 = 175, T SS = 560 (total sum of squares), and RSS = 340 (residual sum of squares).
1. [2 points] What is the standard error of βˆ 2?
2. [4 points] Test the null hypothesis H0 : β2 = 3 against the alternative hypothesis H1 : β2 6= 3 (use 10% significance level).
3. [4 points] What is the 90% confidence interval for β2? 1
4. [2 points] How do we measure the goodness of fit of a regression? What can you say about the goodness of fit of this regression given the information above?
In: Statistics and Probability
2. Do the Maclaurin series expansion of 1 √(1−?) out to 3 terms
3. Find the Taylor series for the two functions:
i. ?(?) = ? −6? about ? = −4
ii. ?(?) = 7 ? 4 about ? = −3
In: Advanced Math
1. A retail store chain with 2 locations is worried that Store #2 is not being patroned by enough male customers. They want to run a hypothesis test that the percent of customers that are male is the same at both locations. They have collected the following data. Refer to Store #1 as Population 1 and Store #2 as Population 2, and answer the following questions leading up to the hypothesis test.
Store #1(population) 1 Customers surveyed = 400 ,Number that were male = 192
Store 2- (population -2) Customers surveyed = 300 , Number that were male = 138
(a) What is the estimate of the proportion in population 1? (b) What is the estimate of the proportion in population 2?
(c) What is the estimate of the difference between the two population proportions?
(d) What is the standard error of the difference between the two population proportions?
(e) Develop a 90% confidence interval for the difference between the two population proportions.
(f) Develop a 95% confidence interval for the difference between the two population proportions.
(g) Develop a 99% confidence interval for the difference between the two population proportions.
(h) What is the pooled estimate of p?
(i) What is the test statistic (z -value)?
(j) What is the p-value? (k) Given α = 0.10, what is your conclusion? (l) Given α = 0.05, what is your conclusion? (m) Given α = 0.01, what is your conclusion?
In: Statistics and Probability
"For a minimus of 2 pages, discuss the 1. Structure and 2. Post-translational modifications of the following protein:
Gene Name: CDK2
Uniport: P24941
Don't forget to include references."
Please help!
.
In: Biology
1) Construct a 2 × 2 examples to prove the following statements:
(a) λ ∈ σ(A) and µ ∈ σ(B) 6=⇒ λ + µ ∈ σ(A + B).
(b) λ ∈ σ(A) and µ ∈ σ(B) 6=⇒ λµ ∈ σ(AB).
In: Math
(a) A 1/2 kg book is shoved across the table with an initial velocity of 2 m/s. If it slides for a 1 meter before coming to a rest, (a) What was its acceleration? (Technically, this acceleration is negative, since the book is slowing down.) (b) What was the frictional force?
(b) A "synchronous" satellite is one that remains above the same point on the equator at all times. (a) What is the period of a synchronous satellite? (b) How high above the surface must it be?
In: Physics