C3_W1 chi squared distribution

in this video. Please can any one show me how to use the standard normal PDF formula to calculate f(z ^2).
f(z^2)= {1/ (2*pi)^1/2} * e^ -((z^2)/2) this is going to be equal to 1/some number greater than 1 because when z=zero numerator is equal to 1 and the result is going to a fraction? what am I doing wrong here

1 Like

Hello @Hassan_Mohamed6,

I moved your topic back to the category for your Math for Machine Learning course.

  1. It is f(z)= {1/ (2*pi)^1/2} * e^ -((z^2)/2), not f(z^2). z follows Gaussian distribution; z^2 follows Chi-square distribution and it has a different PDF formula.

  2. Putting z = 0 does make the numerator 1, but the denominator is > 1, so the result is still < 1.

  3. A PDF’s value does not have to be smaller than 1. We only need the integration over the domain of the PDF to be equal to 1. To see what I am talking about, go to the course’s Week 1 Lesson 2 Interactive Tool: Relationship between PMF/PDF and CDF of some distributions, choose “Uniform Distribution”, set a = -0.1 and b = 0.1 and see what happens, then experiment more for better understanding. You might also google “probability density function larger than 1” for more readings.

  4. After step 3, try to explain to yourself (and us if you like to), why can a PDF’s value > 1. Think about the difference in meanings between “probability” and “probability density”.

  5. If we want to compute the probability density of a variable that follows the Chi-square distribution, we don’t use the Gaussian PDF. Instead, we use the Chi-square PDF, but it seems not introduced in the lecture? So you will find it yourself (like in wikipedia?)

Cheers,
Raymond

1 Like

thanks Raymond for your patience , talking to some one always help me to understand better. I actually wanted to get z^2 for different z values and plot them to see if I get chi distribution. I expected z^2 at z==0 to be infinity but I do not see how find this from f(z)= {1/ (2*pi)^1/2} * e^ -((z^2)/2)

1 Like

Well, one way is for you to write a program, that it generates many z out of a Gaussian distribution, and then you square those z value into z^2, and plot the distribution of the squared-z. This way, you can visualize it. The graphs below are from this Wikipedia, perhaps you can also try a few different k values and see what you will get?

Feel free to share your graphs, @Hassan_Mohamed6.

If you want to derive the Chi-Square from the Gaussian and have no idea how, then I would google “derive chi-square from gaussian” and see what I find. Make the most of this internet database of most people in this world who had discussed this.

Cheers,
Raymond

2 Likes

Thanks Raymond. let me move on will see you later

1 Like