Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider this small and simple dataset: points = pd . DataFrame ( [ [ 1 , 1 ] , [ 2 , 1 ] ,

Consider this small and simple dataset:
points = pd.DataFrame(
[[1,1],[2,1],[3,3],[6,5],[7,7],[7,6]],
columns=["X","y"]
)
base = alt.Chart(points).mark_point().encode(
x='X',
y='y'
)
base
Now consider these three **potential** lines we could fit for the same dataset:
lines = pd.DataFrame(
[
[0.93,0.017562, 'Line A'],
[7,5.9868, 'Line A'],
[0,0.1022, 'Line B'],
[7,6.965, 'Line B'],
[0.26,0.003564, 'Line C'],
[8,7.0965, 'Line C']
],
columns=["X","y", 'Name']
)
base + alt.Chart(lines).mark_line().encode(
x='X',
y='y',
color='Name'
)
Use the graph below to roughly calculate the average squared vertical distance between the points and the blue line ("Line A" above).**Read values of the graph to a precision of 0.25**(e.g.1,1.25,1.5,1.75,2). We reprint the plot for you with only a single line to make it easier to estimate the locations on the graph.
*Save your answer to a variable named `answer2_0`.*
base + alt.Chart(lines[lines['Name']== 'Line A']).mark_line().encode(
x='X',
y='y',
)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

Students also viewed these Databases questions

Question

I didnt know who to talk to.

Answered: 1 week ago

Question

Th e complaint department was closed over the lunch hour.

Answered: 1 week ago

Question

Th ey probably would have treated me like a criminal.

Answered: 1 week ago