# Distribution from createProjection has erroneus plot

**URL:** <https://root-forum.cern.ch/t/distribution-from-createprojection-has-erroneus-plot/64136>\
**Category:** Roofit and RooStats\
**Tags:** roofit\
**Created:** [September 10, 2025, 6:25pm UTC](https://root-forum.cern.ch/t/distribution-from-createprojection-has-erroneus-plot/64136 "2025-09-10T18:25:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [September 11, 2025, 7:32pm UTC](https://root-forum.cern.ch/t/distribution-from-createprojection-has-erroneus-plot/64136/2 "2025-09-11T19:32:36Z")

</div>

To me, it looks like [a usual/known ROOT integrator’s misbehaviour](https://root-forum.cern.ch/t/wrong-convolution-of-2-functions/26205/3).

```auto
{
  RooRealVar x("x", "x", 1, 3);
  RooRealVar lambda("lambda", "rate", 1, 0, 100);
  RooGenericPdf expo("expo", "expo",
                     "lambda * exp(-lambda * x)",
                     RooArgList(x, lambda));
  auto marginal_x = expo.createProjection(RooArgSet(lambda));
  RooPlot *xFrame = x.frame();
  marginal_x->plotOn(xFrame);
  xFrame->Draw();
}

```

---

_[View the full topic](https://root-forum.cern.ch/t/distribution-from-createprojection-has-erroneus-plot/64136)._
