1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lana66690 [7]
3 years ago
8

In this problem, you will develop a model to predict whether a given car gets high or low gas mileage based on the auto data set

. (a) create a binary variable, mpg01, that contains a 1 if mpg contains a value above its median, and a 0 if mpg contains a value below its median. you can compute the median using the median() function. note you may find it helpful to use the data.frame() function to create a single data set containing both mpg01 and the other auto variables.
Mathematics
1 answer:
Charra [1.4K]3 years ago
8 0

We havep(X)=eβ0+β1X1+eβ0+β1X⇔eβ0+β1X(1−p(X))=p(X),p(X)=eβ0+β1X1+eβ0+β1X⇔eβ0+β1X(1−p(X))=p(X),which is equivalent top(X)1−p(X)=eβ0+β1X.p(X)1−p(X)=eβ0+β1X.
To use the Bayes classifier, we have to find the class (kk) for whichpk(x)=πk(1/2π−−√σ)e−(1/2σ2)(x−μk)2∑Kl=1πl(1/2π−−√σ)e−(1/2σ2)(x−μl)2=πke−(1/2σ2)(x−μk)2∑Kl=1πle−(1/2σ2)(x−μl)2pk(x)=πk(1/2πσ)e−(1/2σ2)(x−μk)2∑l=1Kπl(1/2πσ)e−(1/2σ2)(x−μl)2=πke−(1/2σ2)(x−μk)2∑l=1Kπle−(1/2σ2)(x−μl)2is largest. As the log function is monotonally increasing, it is equivalent to finding kk for whichlogpk(x)=logπk−(1/2σ2)(x−μk)2−log∑l=1Kπle−(1/2σ2)(x−μl)2log⁡pk(x)=log⁡πk−(1/2σ2)(x−μk)2−log⁡∑l=1Kπle−(1/2σ2)(x−μl)2is largest. As the last term is independant of kk, we may restrict ourselves in finding kk for whichlogπk−(1/2σ2)(x−μk)2=logπk−12σ2x2+μkσ2x−μ2k2σ2log⁡πk−(1/2σ2)(x−μk)2=log⁡πk−12σ2x2+μkσ2x−μk22σ2is largest. The term in x2x2 is independant of kk, so it remains to find kk for whichδk(x)=μkσ2x−μ2k2σ2+logπkδk(x)=μkσ2x−μk22σ2+log⁡πkis largest.
ng expression
∫0.950.0510dx+∫0.050(100x+5)dx+∫10.95(105−100x)dx=9+0.375+0.375=9.75.∫0.050.9510dx+∫00.05(100x+5)dx+∫0.951(105−100x)dx=9+0.375+0.375=9.75.So we may conclude that, on average, the fraction of available observations we will use to make the prediction is 9.75%9.75%.res. So when p→∞p→∞, we havelimp→∞(9.75%)p=0.

You might be interested in
Do 2 or more shapes with the same perimeter have to have the same area? Explain with examples. AND Do 2 or more shapes with the
Murljashka [212]
Yes. Take for example a square and an ellipsis with the same perimeter. The family of ellipses with the same perimeter can have any area between that of a circle to zero (if it is extremely “thin” i.e. if its eccentricity is large). The circle has the maximum area of any other shape with the same perimeter, so the square has the same area of one of the intermediate ellipses.

4 0
3 years ago
How much longer is 3 meters than 3 yards?
mojhsa [17]
3 meters is 9.84252 feet, and 3 yards is 9 feet
So 3 meters is .84252 feet more that 3 yards.
5 0
3 years ago
Roy is in a hot air balloon that has just taken off and is floating above its launching point.
leonid [27]

Answer:

7.1 meters

Step-by-step explanation:

Use the pythagorean theory:

10 would be the hypotenuse

7 would be one of the legs

and x (or whatever variable you'd like) would be the other leg.

7^2+x^2=10^2

49+x^2=100

subtract 49 from both sides

x^2=51

take the square root on both sides

x is approximately 7.1

6 0
3 years ago
What is 4/3 divided by 5/2
Anna [14]
<h2>4/3 divided by 5/2</h2>

<h3>=  \tt{ \dfrac{ \dfrac{4}{3} }{ \dfrac{5}{2} } }</h3><h3>=  \tt{ \dfrac{ \dfrac{4}{15} }{2} }</h3><h2>= \green{\boxed{\tt{{ \dfrac{2}{15} }}}}</h2>
3 0
3 years ago
Find the distance between the points G(-5, 4) and H(2, 6).
vladimir2022 [97]

Answer:

The answer is

<h2>\sqrt{53}  \:  \: or \:  \: 7.28 \:  \:  \:  \: units</h2>

Step-by-step explanation:

The distance between two points can be found by using the formula

d =  \sqrt{ ({x1 - x2})^{2} +  ({y1 - y2})^{2}  }  \\

where

(x1 , y1) and (x2 , y2) are the points

From the question the points are

G(-5, 4) and H(2, 6)

The distance between them is

|GH |  =  \sqrt{ ({ - 5 - 2})^{2}  +  ({4 - 6})^{2} }  \\  =  \sqrt{ ({ - 7})^{2} + ( { - 2})^{2}  }  \:  \\  =  \sqrt{49 + 4}   \\  =  \sqrt{53}  \:  \:  \:  \:  \:  \:  \:  \:   \\  = 7.280109

We have the final answer as

\sqrt{53}  \:  \: or \:  \: 7.28 \:  \:  \:  \: units

Hope this helps you

4 0
3 years ago
Other questions:
  • Terri Vogel, an amateur motorcycle racer, averages 129.71 seconds per 2.5 mile lap (in a 7 lap race) with a standard deviation o
    13·1 answer
  • Which ordered pair is the solution to the system of linear equations shown on the graph?
    13·1 answer
  • Solve <br> -2x-y=1<br> y=3x-1
    7·1 answer
  • What is the answer to this problem
    8·1 answer
  • What’s 3 times 72 in expanded Form?
    9·2 answers
  • (9x + 4) - (-5x2 - 5x + 7)
    15·1 answer
  • Tony wants to make a dog bed for his dog. He has a Golden Retriever and wants to make sure the bed is big enough so his dog can
    7·1 answer
  • What is the surface area of the net of this 3-dimensional figure?
    5·2 answers
  • What is the value of "x" at the y-intercept?
    14·1 answer
  • If 4 apples weigh the same as 3 grapefruit, how many grapefruit weigh the same as 16 apples?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!