Hi I just want to flatten a function, I tied it with Joined->True, but it did not work, hope somebody of you can help me.
This is my code:
Remove["Global`*"]
m = 30; (*number of banks*)
n = 5;(*number of defaults*)
AssetV = 100;(*asset value at T*)
DebtV = 80;(*debt value at T*)
μ = 0.2;(*annual drift*)
σ = 0.3;(*annual volatility*)
T = 5;(*years*)
ρ = 0.8;
Since I want to use a BinomialDistribution I calculated the individual probabilities through:
P = (CDF[NormalDistribution[], -(Log[
AssetV/DebtV] + (μ - 0.5*σ^2)*T)/(σ*Sqrt[
T])])
In the following I generated a table where I wanted to see the probabilities where k=n1, varies from 0 to 30 since n=30, and this is given by:
data1 = Table[
Probability[x >= n1,
x \[Distributed] BinomialDistribution[30, P]], {n1, 0, 30, 1}]
In order to plot the probabilities I entered:
Plot[Probability[x >= n1,
x \[Distributed] BinomialDistribution[30, P]], {n1, 0, 30},
PlotRange -> All, AxesLabel -> {"# of Defaults", "PD"},
Filling -> Axis]
and now I just want to flatten this function. I tried it with Joined-True, which did not work out.
I want also to show the density by:
DiscretePlot[PDF[BinomialDistribution[30, P], n1], {n1, 0, 30},
PlotRange -> All, AxesLabel -> {"# of Defaults", "PD"},
Joined -> True]
However, is there the possibility to implement data1=Table[...] into the two functions, would it be then possible to generate the plot by the ListLinePlot function?
thank you for your help.
Exclusions -> None
is the option you're looking for? $\endgroup$