Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Problem with Syntax in Mathematica Summation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84425] Re: [mg84419] Re: Problem with Syntax in Mathematica Summation
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 23 Dec 2007 04:37:09 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Needs["HypothesisTesting`"];

The function NormalPValue returns a rule rather than a value

NormalPValue[x]

OneSidedPValue -> 
   (1/2)*(1 - Erf[Abs[x]/Sqrt[2]])

Consequently, in an expression it would be used in a form similar to

(OneSidedPValue /. NormalPValue[x])

(1/2)*(1 - Erf[Abs[x]/Sqrt[2]])

(TwoSidedPValue /. NormalPValue[x, TwoSided -> True])

1 - Erf[Abs[x]/Sqrt[2]]


Bob Hanlon

---- magma <maderri2 at gmail.com> wrote: 
> There were a couple of syntax errors:
> in the summation with ebitda and in kinv0
> Below is the corrected code.
> 
> wacc = ((rf + \[Beta] ((1 + tax) (d/(d + e))) (rf - rm)) (e/(d +
> 
>         e))) ((rf + (1 - (NormalPValue[(Log[(d/(d + e))]/((d/(d +
>                                       e)) - 1)) (1/
>               stde)])) r) (d/(d + e)))
> value = \!\(
> \*UnderoverscriptBox[\(\[Sum]\), \(t = 1\), \(\[Infinity]\)]
> \*FractionBox[\((
> \*SubscriptBox[\(ebitda\), \(t\)]\ \((1 - tax)\))\), \(\((1 + wacc)\)^
>      t\)]\) + \!\(
> \*UnderoverscriptBox[\(\[Sum]\), \(t = 1\), \(\[Infinity]\)]
> \*FractionBox[\(\((
> \*SubscriptBox[\(dep\), \(t\)])\)\ tax\), \(\((1 + wacc)\)^
>      t\)]\) - \!\(
> \*UnderoverscriptBox[\(\[Sum]\), \(t = 1\), \(n\)]
> \*FractionBox[\(\((
> \*SubscriptBox[\(d\), \(0\)] -
> \*UnderoverscriptBox[\(\[Sum]\), \(t = 1\), \(n\)]
> \*SubscriptBox[\(d\), \((t - 1)\)])\) \((rf + 1 - \((NormalPValue[\((
> \*FractionBox[\(Log[\((d/\((d + e)\))\)]\), \(\((d/\((d + e)\))\) -
>              1\)])\) \((
> \*FractionBox[\(1\), \(stde\)])\)])\))\)
>      r \((1 - tax)\)\), \(\((1 + wacc)\)^t\)]\) - \!\(
> \*UnderoverscriptBox[\(\[Sum]\), \(t = 1\), \(n\)]
> \*FractionBox[\(
> \*SubscriptBox[\(d\), \(0\)]/n\), \(\((1 + wacc)\)^t\)]\) - Subscript[
>   kinv, 0]
> 



  • Prev by Date: how fill PolarPlot?
  • Next by Date: Re: Mathematica 6 Documentation - how does one add to it?
  • Previous by thread: Re: Problem with Syntax in Mathematica Summation
  • Next by thread: sum over i+j+k==n