# Ordinary Least Squares with Different Error Variances

My textbook says the following

Consider the no-intercept model $$y_i = \beta x_i+\epsilon_i, \ i = 1,2,...,N$$ where $$\epsilon_1, \epsilon_2,...,\epsilon_N$$ are independent errors with $$\mathbb{E}[\epsilon_i] = 0, \ \text{Var}(\epsilon_i) = v_i \sigma^2$$, for known constants $$v_i$$.

If $$v_i =1$$ for all $$i$$, the OLS estimate of $$\beta$$ is $$\hat\beta = \frac{\sum_{i \in {\bf S}}x_iy_i}{\sum_{i \in {\bf S}}x_i^2}$$

What I don't understand is why $$v_i$$ has to be $$1$$ for $$\hat\beta$$ to be the OLS estimate of $$\beta$$, or even how $$v_i$$ has an effect on this quantity. What would happen if $$v_i \neq 1$$?

The key property here is that $$v_{i}$$ is constant for all $$i$$. If $$v_{i}$$ were some other positive constant like $$2$$, this factor could be 'absorbed' into $$\sigma^{2}$$, and we could assume $$v_{i} = 1$$ for all $$i$$ anyway.
So the question now becomes: what would happen if $$v_{i}$$ were not constant for all $$i$$?
The name for this concept is called heteroskedasticity. And since the OLS formula for $$\hat{\beta}$$ does not contain $$v_{i}$$, you're right in suspecting that it should not have an affect there. The textbook seems to be ambiguous in that regard, since it doesn't explicitly confirm the OLS estimates would be any different, but the phrasing does slightly lean towards that implication. Where it does have an affect however, is through the standard errors of $$\hat{\beta}$$. If heteroskedasticity is suspected in the data, one option is to compute the standard errors using a heteroskedasticity-consistent formula.
There is another train of thought which asks whether OLS is the correct estimator to use in this setting. There is another estimator called weighted least squares where the formula will contain the $$v_{i}$$s. The weighted least squares estimator is 'better' than OLS in the sense that the estimate will still be unbiased, but it will have less variance.