Hello,
first of all, don't use \left(...\right) in inline formulas, they prevent line breaking and can be extended arbitrarily, which is sometimes ok or even desired in displayed equations, but looks horrible in inline ones. Then you should place words like "-dimensional" outside of math mode. Additionally you can insert valid breakpoints with \allowbreak (breaks after binary and relational operators are permitted by default):
Code: Select all
\documentclass{minimal}
\begin{document}
\parbox{15mm}{% requires lots of line breaks
Say we have a dataset of $n$ observations in the form of a
$p$-dimensional feature vector: $x_i= ( x_{i1},
x_{i2}, \allowbreak x_{i3}, \ldots, x_{ip} )$
}
\end{document}
You might consider converting complex inline formulas like the definition of the feature vector to displayed equations.