# Conditional on Gaussian, need clarification

I'm reading Andrew Ng's notes on machine learning, and on page 12 of this document, he makes a step in his proof that I'm trying to decipher:

Let $$\textbf{x} = \left( 1 , x_1 , x_2 , \cdots , x_n \right)^T$$, a vector of variables, and $$\theta = \left( \theta_0 , \theta_1 , \theta_2 , \cdots , \theta_n \right)^T$$, a vector of linear coefficients of those variables. Let's define $$y$$ as

$$y = \theta ^T \textbf{x} + \epsilon$$ where $$\epsilon \sim \mathcal{N}(0,\sigma^2)$$, that is

$$p(\epsilon) = \frac{1}{\sqrt{2 \pi}}\exp \left( -\frac{\epsilon^2}{2\sigma^2}\right).$$

Next line says the following about conditional probability of $$y$$ given $$\textbf{x}$$ and coefficients $$\theta$$, which are treated as deterministic:

$$p(y|x;\theta) = \frac{1}{\sqrt{2 \pi}}\exp\left( -\frac{(y- \theta ^T \textbf{x})^2}{ 2\sigma^2}\right)$$

Can someone help me see how we get this conditional distribution?

In this context, $x$ and $\theta$ can be thought of as constants, as can their product $\theta^Tx$. It might be easier to follow if you replace this product with a single variable $C$. Then $y=\varepsilon+C \sim \mathcal{N}(C,\sigma^2)$, which has the density you give in the last line (this is just because adding a constant to a Gaussian random variable gives the same distribution with its mean increased by that constant). I think you are likely just overthinking things because you're not used to the vector notation used here.
{"ft_lang_label":"__label__en","ft_lang_prob":0.78416747,"math_prob":0.9998634,"size":893,"snap":"2020-34-2020-40","text_gpt3_token_len":295,"char_repetition_ratio":0.122609675,"word_repetition_ratio":0.0,"special_character_ratio":0.35274357,"punctuation_ratio":0.12790698,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.000005,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-29T08:11:45Z\",\"WARC-Record-ID\":\"<urn:uuid:97463658-b732-452b-b2ab-82bfd71fb7ae>\",\"Content-Length\":\"149592\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:13a73f67-d4d3-402a-9a1f-7cdac615f1e1>\",\"WARC-Concurrent-To\":\"<urn:uuid:4d414c6f-29cf-4f15-bdd6-afb5ed7566bb>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://stats.stackexchange.com/questions/27275/conditional-on-gaussian-need-clarification\",\"WARC-Payload-Digest\":\"sha1:6SVMCU7OZFLMBSLGY24KUC6ZGA4SUWGR\",\"WARC-Block-Digest\":\"sha1:GUFBR4US6OCJQXJENXOTVLW752DCVRCK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600401632671.79_warc_CC-MAIN-20200929060555-20200929090555-00206.warc.gz\"}"}