# Non-continuous integrals and discrete variables

#### skatenerd

##### Active member
Quantum Phys Homework:
I am given a function:
$$f(x)=\frac{1}{10}(10-x)^2\,;\,0\leq{x}\leq{10}$$
and
$$f(x)=0$$
for all other $$x$$.
I need to find the average value of $$x$$ where
$$\bar{x}=\frac{\int_{-\infty}^{\infty}x\,f(x)\,dx}{\int_{-\infty}^{\infty}f(x)\,dx}$$
I am not really even sure where to start with this. If the denominator is equal to zero for every value through the integral except for 0 to 10, would I just be able to change it (just the denominator) to
$$\int_{0}^{10}f(x)\,dx$$
I don't think the same would apply for the numerator, because the function is multiplied by $$x$$, making it a different function, which is possibly still integratable from $$-\infty$$ to $$\infty$$.
But wait, there's more. Part (b) is asking to suppose that the variable $$x$$ is discrete rather than continuous. Assume $$\Delta{x}=1$$ so that $$x$$ takes on only integral values 0, 1, 2, ..., 10. Then I need to compute $$\bar{x}$$ again and compare to the first part.
So I think after doing part (a), I could maybe know how to attack part (b) if I knew what a discrete variable was...I've never taken a class that ever dealt with discrete variables so I am kind of in the dark here. Any guidance would be very appreciated.

#### Prove It

##### Well-known member
MHB Math Helper
Quantum Phys Homework:
I am given a function:
$$f(x)=\frac{1}{10}(10-x)^2\,;\,0\leq{x}\leq{10}$$
and
$$f(x)=0$$
for all other $$x$$.
I need to find the average value of $$x$$ where
$$\bar{x}=\frac{\int_{-\infty}^{\infty}x\,f(x)\,dx}{\int_{-\infty}^{\infty}f(x)\,dx}$$
I am not really even sure where to start with this. If the denominator is equal to zero for every value through the integral except for 0 to 10, would I just be able to change it (just the denominator) to
$$\int_{0}^{10}f(x)\,dx$$
I don't think the same would apply for the numerator, because the function is multiplied by $$x$$, making it a different function, which is possibly still integratable from $$-\infty$$ to $$\infty$$.
But wait, there's more. Part (b) is asking to suppose that the variable $$x$$ is discrete rather than continuous. Assume $$\Delta{x}=1$$ so that $$x$$ takes on only integral values 0, 1, 2, ..., 10. Then I need to compute $$\bar{x}$$ again and compare to the first part.
So I think after doing part (a), I could maybe know how to attack part (b) if I knew what a discrete variable was...I've never taken a class that ever dealt with discrete variables so I am kind of in the dark here. Any guidance would be very appreciated.
First of all, \displaystyle \begin{align*} E(X) = \int_{-\infty}^{\infty}{x\,f(x)\,dx} \end{align*}, not \displaystyle \begin{align*} \frac{\int_{-\infty}^{\infty}{x\,f(x)\,dx}}{\int_{-\infty}^{\infty}{f(x)\,dx}} \end{align*}, and then since the integral will be 0 everywhere where the function is 0, this would be equal in this case to \displaystyle \begin{align*} \int_0^{10}{x\,f(x)\,dx} = \int_0^{10}{x\left[ \frac{1}{10}(10 - x)^2 \right] \, dx} \end{align*}.

Go from here.

#### skatenerd

##### Active member
I'm sorry, I don't know what $$E(X)$$ means. And the problem clearly states that
$$\bar{x} = \frac{\int_{-\infty}^{\infty}xf(x)dx}{\int_{-\infty}^{\infty}f(x)dx}$$
so I don't think I can use what you just gave to go about solving it.

Last edited:

#### Prove It

##### Well-known member
MHB Math Helper
Yes you can, your f(x) is 0 everywhere other than between 0 to 10, and so must be \displaystyle \begin{align*} x f(x) \end{align*}.

#### Ackbach

##### Indicium Physicus
Staff member
First of all, \displaystyle \begin{align*} E(X) = \int_{-\infty}^{\infty}{x\,f(x)\,dx} \end{align*}, not \displaystyle \begin{align*} \frac{\int_{-\infty}^{\infty}{x\,f(x)\,dx}}{\int_{-\infty}^{\infty}{f(x)\,dx}} \end{align*}, and then since the integral will be 0 everywhere where the function is 0, this would be equal in this case to \displaystyle \begin{align*} \int_0^{10}{x\,f(x)\,dx} = \int_0^{10}{x\left[ \frac{1}{10}(10 - x)^2 \right] \, dx} \end{align*}.

Go from here.
I'm sorry, I don't know what $$E(X)$$ means. And the problem clearly states that
$$\bar{x} = \frac{\int_{-\infty}^{\infty}xf(x)dx}{\int_{-\infty}^{\infty}f(x)dx}$$
so I don't think I can use what you just gave to go about solving it.
As $\displaystyle \int_{- \infty}^{ \infty}f(x) \, dx \not=1$, this distribution function must be normalized. Prove It would be correct if the function was already normalized, but since it is not (the integral in question is equal to $100/3$), you must normalize to find the expectation value of $x$.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9110064,"math_prob":0.9997718,"size":2498,"snap":"2021-43-2021-49","text_gpt3_token_len":760,"char_repetition_ratio":0.09542903,"word_repetition_ratio":0.94,"special_character_ratio":0.32666132,"punctuation_ratio":0.12615955,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999865,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-17T21:37:37Z\",\"WARC-Record-ID\":\"<urn:uuid:038fd425-e607-4a35-8e3d-52665e0a8449>\",\"Content-Length\":\"74033\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e2310e38-8d0b-41df-bef1-aea39b01ac70>\",\"WARC-Concurrent-To\":\"<urn:uuid:60d705cd-b35e-4acb-bdb2-dd495d5c5725>\",\"WARC-IP-Address\":\"50.31.99.218\",\"WARC-Target-URI\":\"https://mathhelpboards.com/threads/non-continuous-integrals-and-discrete-variables.6750/\",\"WARC-Payload-Digest\":\"sha1:QUPU2LPYZET36WPDHWWY44MPIIKKPI3M\",\"WARC-Block-Digest\":\"sha1:NQN2FK2XHWVSSTLP3YY2DVH56SFAMZXN\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585183.47_warc_CC-MAIN-20211017210244-20211018000244-00262.warc.gz\"}"}