1 Starting With Matlab 2 Creating Arrays 3 Mathematical Operations With Arrays 4 Using Script Files And Managing Data 5 Two-dimensional Plots 6 Programming In Matlab 7 User-defined Functions And Function Files 8 Polynomials, Curve Fitting, And Interpolation 9 Applications In Numerical Analysis 10 Three-dimensional Plots 11 Symbolic Math Chapter1: Starting With Matlab
Chapter Questions Section: Chapter Questions
Problem 1P Problem 2P: Calculate: (a) 8+802.6+e3.53 (b) 175)+733.131/4+550.41 Problem 3P: Calculate: (a) 23+453160.7+log10589006 (b) (36.12.25)(e2.3+20) Problem 4P: Calculate: (a) 3.822.754125+5.2+1.853.5 (b) 2.110615.21053610113 Problem 5P: Calculate: (a)sin0.2cos/6+tan72 (b) (tan64cos15)+sin237cos220 Problem 6P: Define the varialbe z as z = 4.5; than evaluate: (a) 0.44+3.1z2162.3z80.7 (b) z323/z2+17.53 Problem 7P: Define the variable t as t= 3.2; then evalute: (a) 12e2t3.81t3 (b) 6t2+6t2t21 Problem 8P: Define the variable xandy as x = 6.5 and y = 3.8; then evaluate: (a) x2+y22/3+xyyx (b) x+yxy2+2x2xy2 Problem 9P: Define the variables a, b, c, and d as: c= 4.6, d = 1.7, a = cd2, and b=c+acd; then evaluate: (a)... Problem 10P: Two trigonometric identities are given by: (a) cos2xsin2x=12sin2x (b) tanxsinx2tanx=1cosx2 For each... Problem 11P: Two trigonometric identities are given by: (a) sinx+cosx2=1+2sinxcosx (b)... Problem 12P: Define two variables: alpha =8, and beta = 6. Using these variables, show that the following... Problem 13P: Given: x2cosxdx=2xcosx+x22sinx . Use MATLAB to calculaet the following difinite integral:... Problem 14P: A rectangular box has the dimensions shown. (a) Determine the angle BAC to the nearest degree. (b)... Problem 15P: The are length of a segment of a parabola ABC is given by: LABC=a2+4h2+2ha+2ha2+1 Determine LABC if... Problem 16P: The three shown circles, with radius 15 in., 10.5 in., and 4.5 in., are tangent to each other. (a)... Problem 17P: A frustum of cone is filled with ice cream such that the portion above the cone is a hemisphere.... Problem 18P: 18. In the triangle shown a =27 in., b 43 in., c=57 in. Define a, b, and c as variables, and then:... Problem 19P: For the triangle shown, a = 72°, ß=43°, and its perimeter is p = 114 mm. Define a, ß, and p, as... Problem 20P: The distance d from a point P (xp,yp,zp) to the line that passes through the two points A (xA,yA,zA)... Problem 21P: The perimeter of an ellipse can be approximated by: P=(a+b)3(3a+b)(a+3b)a+b Calculate the perimeter... Problem 22P: A total of 4217 eggs have w be packed in boxes that can hold 36 eggs each. By typing one line... Problem 23P: A total of 777 people have to be transported using buses that have 46 seats and vans that have 12... Problem 24P: Change the display to format long g. Assign the number 7E8/13 to a variable, and then use the... Problem 25P: The voltage difference Vabbetween points a and b in the Wheatstone bride circuit is given by:... Problem 26P: The current in a series RCL circuit is given by: I=VR2(L1C)2 Where =2 f. Calculate I for the... Problem 27P: The monthly payment M of a mortgage P for n years with a fixed annual interest rate r can be... Problem 28P: The number of permutations nProf taking r Objects out of n objects without repetition is given by:... Problem 29P: The number of combinations Cn,r of taking r objects out of n objects is given by: aye In the... Problem 30P: The equivalent resistance of two resistors R1and R2connected in parallel is given by Req=R1R2R1+R2 .... Problem 31P: The output voltage Voutin the circuit shown is given by (Millman’s theorem):... Problem 32P: Radioactive decay of carbon-14 is used for estimating the age of organic material. The decay is... Problem 33P: The greatest common divisor is the largest positive integer that divides the numbers without a... Problem 34P: The amount of energy E (in joules) that is released by an earthquake is given by: E=1.741019101.44M... Problem 35P: According to the Doppler effect of light, the perceived wavelength ?p, of a light source with a... Problem 36P: Newton’s law of cooling gives the temperature T(t) of an object at time tin terms of T0, its... Problem 37P: The velocity v and the falling distance d as a function of time of a skydiver that experience the... Problem 38P: Use the Help Window to find a display format that displays the output as a ratio of integers. For... Problem 39P: Gosper’s approximation for factorials is given by: n!=2n+13nnen Use the formula for calculating 19!.... Problem 40P: According to Newton’s law of universal gravitation, the attraction force between two bodies is given... Problem 1P
Related questions
Please do questions 2.5 with R code. Please do not use t.test nor power.t.test. Please use t or z test without using functions.
Transcribed Image Text: balance
2000
1500
1000
C.
d.
500
5)
0
South
region
Answer the following questions. You may use R on your own computer.
1) [
State the assumption of ANOVA. Then using the boxplot given above, comment the assump-
tions of ANOVA are satisfied or not.
T
2) [
Describe how dummy variables regionSouth, regionWest (in output from summary() fune-
tion) are used to indicate each class.
VS
a. [
b.
T
3) |
Write down the estimated regression equation for each group separately. Give interpretation
of these equations. Compute the values of these equations.
4) I
We wish to test of hypothesis
East
1
Use the significance level a=0.01.
Ho: ₁1₂=143
H₁ : Not all group means are the same.
Find the value of the test statistic and its distribution.
Find the rejection region.
Find the p-value of the test.
Make a conclusion.
We wish to test of hypothesis
West
Ho: 41 = 42 V8 Hy : μη # 12.
Use the significance level a = 0.01.
a. [
b. [
c. I
d. [
¹ Find the value of the test statistic and distribution of the test statistic.
Find the p-value of the test or rejection region.
Find the 99% confidence interval of the difference 2-11.
Make a conclusion.
Transcribed Image Text: Q2.
We wish to compare Balance in 3 different Region.
• Region: A factor with levels East, South, and West indicating the individual's geographical location.
• Balance: Average credit card balance in 8.
The mean balance for East, South and West are denoted, respectively, by #1, #2 and a.
Data set
The following code create the data set called dat that including balance and balance as variables.
library (ISLR2)
head (Credit)
# Income Linit Rating Cards Age Education Own Student Married Region Balance
#1 14.891 3606 283 2 34
11 No
Yes South
15 Yes
Yes West
3 82
4 71
11 No
No West
## 2 106.025 6645 483
#3 104.593 7075 514
## 4 148.924 9504 681
#5 55.882 4897 357
##6 80.180 8047 569
3 36
11 Yes
No West
16 No
10 No
balance < Credit$Balance
region <- as.factor (Credit$Region)
dat < data.frame (region, balance)
str(dat)
2 68
4 77
#
region
## East: 99
# South: 199
# West :102
#
#
No
Yes
No
No
## 'data.frame': 400 obs. of 2 variables:
# $ region: Factor v/ 3 levels "East", "South",..: 2 3 3 3 2 2 1 321...
## $ balance: num 333 903 580 964 331...
sunnary (dat)
balance
Min.: 0.00
1st Qu.: 68.75
Median 459.50
Mean : 520.01
3rd Qu.: 863.00
Max. :1999.00
No
No
Yes South
No South
333
903
580
964
331
1151
Regression model
The regression equation for ANOVA is given by
y = Bo +31 + region South + B regionWest + E
where ~ N(0,²). The dummy variables regionSouth and regionWest are created by the In() function
and appear in the output below.
Fitting the ANOVA model and output from sunmary() and anova () functions
The following R code fit the ANOVA model with 1n() function and print outputs from summary() function
and anova () function.
anov_out <- In (balance region, data = dat)
summary (anov_out)
##
## Call:
# In (formula = balance region, data = dat)
# Residuals:
10 Median
## Min
3Q Max
## -531.00 -457.08 -63.25 339.25 1480.50
**
## Coefficients:
#
Estimate Std. Error t value Pr(>ltl)
46.32 11.464
56.68 -0.221
65.02 -0.287
# (Intercept) 531.00
#regionSouth -12.50
#regionWest -18.69
** Signif. codes: 00.001 0.01 0.05 0.11
##
#Residual standard error: 460.9 on 397 degrees of freedom
## Multiple R-squared: 0.0002188, Adjusted R-squared: -0.004818
# F-statistic: 0.04344 on 2 and 397 DF, p-value: 0.9575
anova (anov_out)
## Analysis of Variance Table
#
#Response: balance
<2e-16 ***
0.826
0.774
##
## region
##Residuals 397 84321458 212397
Box plot
Df Sun Sq Mean Sq F value Pr(>F)
2 18454 9227 0.0434 0.9575
boxplot (balance region, data dat)
-
Expression, rule, or law that gives the relationship between an independent variable and dependent variable. Some important types of functions are injective function, surjective function, polynomial function, and inverse function.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step 1: Defining the problem
VIEW
Step 2: R Code and Output
VIEW
Step by step
Solved in 4 steps with 1 images