Message Boards Message Boards

Uniform Distribution with support?

Posted 9 years ago

Hey, i got a small issue and im pretty sure that the community will easely solve this. The Problem: 1. we have Epsilon which is uniformely distributed with support {epsilonL , epsilonH} and epsilonL = - epsilonH and mean(epsilon) = 0 with g(epsilon) the density function.

2 My Code:

\[Epsilon] = 
 UniformDistribution[{Subscript[\[Epsilon], L], Subscript[\[Epsilon], 
   H]}]
g[\[Epsilon]] = PDF[\[Epsilon], x]

The Problem is that Mathematica has an issue to execute this and i think its the subscripts that create this issue. I am new to Mathematica and i would be happy if someone can help me. What are my mistakes and could somebody explain me in other words what the message Hold{} means? i read the documentation about that but i am not sure if i got it completely. Thx in advance

POSTED BY: Claude Dax
3 Replies
Posted 9 years ago

My recommendation is to avoid subscripts (now and maybe forever). If I understand what you want, the code can be written as:

\[Epsilon]L = -5;
\[Epsilon]H = -\[Epsilon]L;
\[Epsilon] = UniformDistribution[{\[Epsilon]L, \[Epsilon]H}]
g[x_] := PDF[\[Epsilon], x]

and

 g[z]
 g[3.5]
 g[50]

results in

uniform distribution

POSTED BY: Jim Baldwin
Posted 9 years ago

hey Jim Baldwin,

ok ty for your reply. I got some further questions to your answer.

Considering the subscript, what about time indices. Lets say we have xt and xt+1 . Are subscripts not fine for time indices? How would you handle a model with more periods when you cant use subscripts?

The other question is related to the ":=" (delayed) . How can i use this kind of a function in SOLVE ? Because to do Solve for equations and/or in-equations you need to have equations of the form of "==" ">""<" etc but not ":=" . How can i Use this density function g[epsilon_] with Solve?

POSTED BY: Claude Dax
Posted 9 years ago

Using lists handles multiple observations. Look in the online documentation about lists, set ("="), set delayed (":="), and Solve. If you have a specific example about the use of Solve (including in code you've attempted), then I think the Community could give you a lot of assistance. Looking at "Core Language & Structure" in the Documentation Center is also highly recommended.

POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract