# beta {#beta}

## Syntax {#syntax}

`beta(Y, X)`

## Arguments {#arguments}

**Y** and **X** are vectors of the same length.

## Details {#details}

Return the coefficient estimate of an ordinary-least-squares regression of *Y* on *X* \(with intercept\).

## Examples {#examples}

```
x=1 3 5 7 11 16 23
y=0.1 4.2 5.6 8.8 22.1 35.6 77.2;

beta(y,x);
// output: 3.378632
```

