I am new to desmos. I want to graph and calculate a line from the following array quickly

```
C=[27.94,31.34,34.625]
P=[0,-1,-2]
```

In google sheet, I can do that with this function

```
=SLOPE(C,P)
```

Thank you.

I am new to desmos. I want to graph and calculate a line from the following array quickly

```
C=[27.94,31.34,34.625]
P=[0,-1,-2]
```

In google sheet, I can do that with this function

```
=SLOPE(C,P)
```

Thank you.

It looks like you’re wanting a regression like this, where C is the dependent variable, and P the independent.

Hi, thank you for your response. I did not know about ~ syntax, wow.

However, why is the value I am getting from google sheets is different than that in desmos?

```
C=[27.94,31.34,34.625]
P=[0,-1,-2]
# google sheets
=SLOPE(C,P)
= -3.3425
# Desmos
C ~ mP
m=-20.118
```

Oops! I left out the intercept, b, so it sort of included (0,0) as a data point. Here’s the updated with the same result.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.