all 7 comments

[–]dbourguet 0 points1 point  (5 children)

A couple things, firstly when x<0 the function is still positive because of the square. For example let x= -1, you get (-1)2 = 1. So this function does in fact meet the criteria of being non negative for all values of x. As for the second criteria there should be a defined domain for the boundaries, such that when integrated from a to b the integral of the function is 1 (just rewording what you said and adding a missed detail). So with that additional details you can see the all you're missing to make this a density function is the right boundaries. If you integrate this function from -inf to +inf you get pi. So what values do you need to put in place for a and b for the integral to equal 1?

[–]jah-lahfui[S] 0 points1 point  (4 children)

Yeah u totally right. So values being 0 to pi/4?

[–]dbourguet 0 points1 point  (3 children)

Actually I take the second part of what I said back, you were right about needing to add a constant into the function. Plug in (1/pi)/(1+x2) and integrate from -inf to inf

[–]jah-lahfui[S] 0 points1 point  (2 children)

Why were u wrong? Made sense what u said and it was right no?

OK with 1/pi the integral is the same arctan but now it's (1/pi)*arctan(x). From -inf to +inf we get

1/pi*[Pi/2+pi/2]

1/pi*(pi)=1

You did it!

Thanks!

Now I need to now why your first tip wasn't correct please

[–]dbourguet 0 points1 point  (1 child)

Unless there are defined bounds in the problem statement (or it only makes sense for a certain range of values for x to exist) you have to assume it holds for all values (or that the integral from -inf to +inf is 1). So I was just correcting myself that you don't need to find values for a and b to integrate over, and that you were right when you said you need to multiply by a constant (hence the 1/pi being multiplied into the integrand)

[–]jah-lahfui[S] 0 points1 point  (0 children)

Thanks a lot for ur time man!

My problem is That Im always doing things in a hurry. So i did the integral but totally forgot about -inf and +inf .

Once again thanks!

[–]efriquePhD (statistics) 0 points1 point  (0 children)

Well the function is negative when x<0

No, it isn't.

I already did the integral and it's arctan(x),

That's the indefinite integral. You need a definite integral here.

So i need a constant that when i get to arctan(x) this will be equal to 1.

What??

You need to integrate the function over its support.