MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

# Thread Subject: How to use a discrete normal distribution to represent a normal distribution

 Subject: How to use a discrete normal distribution to represent a normal distribution From: Nick Jia Date: 18 Oct, 2008 09:01:05 Message: 1 of 8 I hope I'm making my question clear as follows, Give any continuous distribution, say, a normal distribution, I hope to use a vector a value, say (x_1, x_2, \cdots, x_n) and a vector of corresponding probablity value (p_1, p_2, \cdots, p_n) attached to those values, such that these two vectors represent a discrete distrubiton which approximate the normal "well" in some sense, say, the first m moments of normal disbutions are all equal to those of discrete distrubiton, and that the L_2 distance between the two disbutions are small enought. (Actually, any other creteria is fine, I'm just describing the one I come up with). btw, in the above question, let's say only n (and possibly m) is free to choose. Thanks for your help or thoughts, insights, and suggestions. best, Jia
 Subject: How to use a discrete normal distribution to represent a normal distribution From: Bruno Luong Date: 18 Oct, 2008 09:34:02 Message: 2 of 8 "Nick Jia" wrote in message ... > the L_2 distance between the two disbutions are small enought. Hummm, The L_2 norm is not even defined (infinity) for discrete ditributions (it's a sum of Dirac, which is not even integrable). Bruno
 Subject: How to use a discrete normal distribution to represent a normal distribution From: Nick Jia Date: 19 Oct, 2008 02:58:01 Message: 3 of 8 "Bruno Luong" wrote in message ... > "Nick Jia" wrote in message ... > > the L_2 distance between the two disbutions are small enought. > > Hummm, The L_2 norm is not even defined (infinity) for discrete ditributions (it's a sum of Dirac, which is not even integrable). > > Bruno I'm not sure about this, how about L_2 norm on cdf, where discrete one is an increasing step function? but as I said, I mean any cretia, I was just randomly propose one.
 Subject: How to use a discrete normal distribution to represent a normal distribution From: Bruno Luong Date: 19 Oct, 2008 07:06:02 Message: 4 of 8 "Nick Jia" wrote in message ... > "Bruno Luong" wrote in message ... > > "Nick Jia" wrote in message ... > > > the L_2 distance between the two disbutions are small enought. > > > > Hummm, The L_2 norm is not even defined (infinity) for discrete ditributions (it's a sum of Dirac, which is not even integrable). > > > > Bruno > > I'm not sure about this, how about L_2 norm on cdf, where discrete one is an increasing step function? > This now is well defined, but much weaker criteria than working of some sort of difference measure between original pdf, as you wanted to do initially. I'm afraid the fit might output some oscillation of fitted pdf. Not sure what is a good criteria. Bruno
 Subject: How to use a discrete normal distribution to represent a normal distribution From: Johannes Date: 26 Dec, 2008 11:42:02 Message: 5 of 8 "Nick Jia" wrote in message ... > I hope I'm making my question clear as follows, > > Give any continuous distribution, say, a normal distribution, I hope to use a vector a value, say (x_1, x_2, \cdots, x_n) and a vector of corresponding probablity value (p_1, p_2, \cdots, p_n) attached to those values, > such that these two vectors represent a discrete distrubiton which approximate the normal "well" in some sense, say, the first m moments of normal disbutions are all equal to those of discrete distrubiton, and that the L_2 distance between the two disbutions are small enought. > (Actually, any other creteria is fine, I'm just describing the one I come up with). > > btw, in the above question, let's say only n (and possibly m) is free to choose. > > Thanks for your help or thoughts, insights, and suggestions. > > best, > Jia Have you found a solution to this problem? I would be interested too.
 Subject: How to use a discrete normal distribution to represent a normal distribution From: Johannes Date: 26 Dec, 2008 11:42:02 Message: 6 of 8 "Nick Jia" wrote in message ... > I hope I'm making my question clear as follows, > > Give any continuous distribution, say, a normal distribution, I hope to use a vector a value, say (x_1, x_2, \cdots, x_n) and a vector of corresponding probablity value (p_1, p_2, \cdots, p_n) attached to those values, > such that these two vectors represent a discrete distrubiton which approximate the normal "well" in some sense, say, the first m moments of normal disbutions are all equal to those of discrete distrubiton, and that the L_2 distance between the two disbutions are small enought. > (Actually, any other creteria is fine, I'm just describing the one I come up with). > > btw, in the above question, let's say only n (and possibly m) is free to choose. > > Thanks for your help or thoughts, insights, and suggestions. > > best, > Jia Have you found a solution to this problem? I would be interested too.
 Subject: How to use a discrete normal distribution to represent a normal distribution From: Roger Stafford Date: 26 Dec, 2008 19:15:04 Message: 7 of 8 "Nick Jia" wrote in message ... > ....... > I'm not sure about this, how about L_2 norm on cdf, where discrete one is an increasing step function? > but as I said, I mean any cretia, I was just randomly propose one.   If you consider that your two vectors represent a step function cdf, then you would, in effect, be asking, "what is the best way to approximate a given continuous density distribution with one another continuous distribution which is composed entirely of a given number of linear segments?" In an idealized sense it seems to me the best match would be achieved by minimizing the L2 norm distance between these, totally ignoring their respective moment values.   However, I have to admit finding this best match may not be such an easy task. The difficult part of it is probably optimizing the discrete x-values. It is a nonlinear least squares problem involving cumulative distribution values for the given distribution at continuously variable points - that is, at the discrete x-values which are to be optimised. If you used something like "fminunc" in the Optimzation Toolbox, the objective function would need to continually refer to integrals involving the given distribution function taken over varying x intervals, which would imply a great amount of computation.   I'm afraid this isn't much help, but it is the best I can come up with at the moment. Roger Stafford
 Subject: How to use a discrete normal distribution to represent a normal distribution From: Roger Stafford Date: 26 Dec, 2008 20:10:04 Message: 8 of 8 "Roger Stafford" wrote in message ... > ........ > If you consider that your two vectors represent a step function cdf, then you would, in effect, be asking, "what is the best way to approximate a given continuous density distribution with one another continuous distribution which is composed entirely of a given number of linear segments?" In an idealized sense it seems to me the best match would be achieved by minimizing the L2 norm distance between these, totally ignoring their respective moment values. > > However, I have to admit finding this best match may not be such an easy task. The difficult part of it is probably optimizing the discrete x-values. It is a nonlinear least squares problem involving cumulative distribution values for the given distribution at continuously variable points - that is, at the discrete x-values which are to be optimised. If you used something like "fminunc" in the Optimzation Toolbox, the objective function would need to continually refer to integrals involving the given distribution function taken over varying x intervals, which would imply a great amount of computation. > .......   I want to clarify something I said a few minutes ago. Suppose we call the original density distribution function, f(x). In computing the objective function that 'fminunc' is to minimize, you would need to have available both  F(x) = int(f(t), t = -inf, x) <--- That is, its cdf function and  M1(x) = int(t*f(t), t = -inf, x) <--- Its "first moment" function These would have to be available to be called on as function handles. From them the objective function for 'fminunc' to use can be computed. Roger Stafford