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
It costs $60 per hour to rent a jet ski. The total cost of a jet ski rental
Anastasy [175]

Answer:

y = 60x + 20

Step-by-step explanation:

The number of hours that we ski is a variable cost where each hour costs $60. On top of that, we have a fixed cost of $20 which stays the same no matter how long we ski.

So we can use an equation to find the totla cost C given the number of hours t as follows:

C(t) = 60t + 20

We can use this equation to find the cost of a skiing session by plugging in some value for t. For example, if we ski for 3 hours:

C(3) = 60(3) + 20 = $200

The equation can also be written using x and y and mean the same thing.

7 0
3 years ago
Help..................
Mariana [72]
Problem A,B,C, and D can be solved using 3*6=18 or 6*3=18
4 0
3 years ago
Read 2 more answers
1,Justin rides his bicycle 2.5 kilometers to school. Luke walks 1,950 meters to school.How much farther does Justin ride to scho
kirill [66]
1. A. 550 meters.
this is because 2.5 km = 2500 meters, since there are 1000 meters in one kilometer.
therefore, 2500 - 1950 = 550 meters.
2. B. 126 inches.
this is because there are 12 inches in one foot, so we multiply 12 by 10 since there are 10 full feet. this leaves us with 120. then, we add half a foot, which is 6 inches. therefore, it is 126 :)
6 0
3 years ago
Newton has 28 cows Sally has 17 what is the sum?<br>​
melamori03 [73]

Answer: 45

Step-by-step explanation:

Sum is addition so it would be

28+17=45

6 0
3 years ago
Read 2 more answers
8. Which number's underlined digit is worth 2?<br> 5,738<br> 8,888<br> 402<br> 6,100
pentagon [3]

Answer:

  402

Step-by-step explanation:

No number is shown with an underlined digit.

Only the number 402 has 2 in it that is in the units place. That digit has a value of 2.

5 0
3 years ago
Read 2 more answers
Other questions:
  • The statement below describes a situation in which opposite quantities combine to make 0. Is the statement true or false?
    14·2 answers
  • Which do you think is the best description of the area of the room? (circle your choice.)
    10·1 answer
  • Write the sentence as an equation.<br> 399 equals d more than 313
    15·2 answers
  • Classify the following triangle. Check all that apply.
    13·2 answers
  • 6b^3 (2a+7b), how to solve it?
    12·1 answer
  • Can somebody PLEASE help me with this :) ??
    14·2 answers
  • Determine an interest rate less than 15%, a period of investment greater than two years, and a regular payment that will result
    9·1 answer
  • Is y=20x+1 linear or nonlinear?
    6·2 answers
  • ___________ are reported in the business section of magazines or newspapers, as well as online.​
    15·1 answer
  • Which amount is largest?<br><br> 1 kg<br> 1 dg<br> 100 g<br> 1,000 mg
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!