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
How much cm³ is it the cilinder?
pychu [463]

Answer:

one because it is cilinder

7 0
2 years ago
Read 2 more answers
What is the correct factorization of<br> х2 + 5х – 6?
nordsb [41]

The answer to your question is (x+6)(x-1)

6 0
3 years ago
Read 2 more answers
If x2 = 60, what is the value of x?
MArishka [77]

Answer:

x = ±2sqrt(15)

Step-by-step explanation:

x^2 = 60

Take the square root of each side

sqrt(x^2) = ±sqrt(60)

x = ±sqrt(60)

x = ±sqrt(4 *15)

x = ±2sqrt(15)

7 0
3 years ago
Read 2 more answers
Math (2) Help please
eduard
What am i supposed to help with, can you show me?

8 0
3 years ago
Choose the solutions to the quadratic equation
WITCHER [35]
29 I think but iam not sure if it’s right
4 0
3 years ago
Other questions:
  • Solve for x. <br> 2/3(x - 7) = -2
    13·2 answers
  • What function's domain consists of all real numbers greater than 3
    12·1 answer
  • I NEED HELPPP THIS DUE TODAY!!!! IT IS URGENT!!
    11·1 answer
  • Can someone help with this question? $32,000;7%decrease
    9·1 answer
  • 75 + 50x = 25 + 70x<br><br> a, 5<br> b, 5/6<br> c, 2<br> d, 2.5
    8·1 answer
  • at the beginning of the week Ana has $130 dollars in her account. she spends an average of $7 per day on lunch. what is the init
    8·1 answer
  • A survey of 1,000 men and women asked, "Do you earn over $50,000 per year?" The table below shows the responses for males and fe
    11·2 answers
  • When you walk across the carpet and touch a metal doorknob, you create a spark. This occurs because ______________.
    11·1 answer
  • which is the better deal to buy vegetables at a supermarket? $2.45/2.5lb of potatoes or $0.98/lb of potatoes
    10·1 answer
  • (On right polynomial) help find equivalent (Left equivalent expressions)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!