Show that the density of Random Variable $Y=aX+b$ exists and if $X$ ~$mathcal{N}(mu,sigma^{2})$ then how is...












2












$begingroup$


Let $X$ be a real random variable and $f$ the density belonging to $X$. Let $aneq0$, and $b in mathbb R$, while $Y:=aX+b$. Show:



i) The density of $Y$ wrt the lebesgue measure exists and is $g(x):=frac{1}{|a|}f(frac{x-b}{a}), xinmathbb R$



ii) Find the distribution of $Y$ if $X$ ~ $mathcal{N}(mu,sigma^{2})$



My steps:



i) I think I've got a good grasp of the it, but still got a few questions.
I will just do the case $a>0$ here: Let $c in mathbb R$



$P(Yleq c)=P(aX+bleq c)=P(Xleqfrac{c-b}{a})$ and we know the distribution of RV $X$, thus: $P(Xleqfrac{c-b}{a})=int_{-infty}^{frac{c-b}{a}}f(x)dlambda(x)=int_{-infty}^{frac{c-b}{a}}f(x)dx$



now I set $y=ax + b Rightarrow dy=adx$



Therefore $int_{-infty}^{frac{c-b}{a}}f(x)dx=int_{-infty}^{c}frac{1}{a}f(frac{x-b}{a})dx$



Using that case $a < 0$ too, we get $frac{1}{|a|}f(frac{x-b}{a}), xinmathbb R$



Now I have the proposed density function, I need to show that it is indeed a pdf. On measurability, it is clear since $int_{-infty}^{c}frac{1}{|a|}f(frac{x-b}{a})dx$ exists that $g(x):=frac{1}{|a|}f(frac{x-b}{a})$ is measurable on $(infty, c], forall c in mathbb R$. And since ${ (infty, c] |c in mathbb R}$ is a generator of the $mathcal{B}(mathbb R)$, therefore $g$ is borel measurable. (Is this correct reasoning?)



First Question: I would think that an alternative way of showing that $g$ is Borel-Measurable is simply stating that $g$ is the product of borel-measurable functions $frac{1}{|a|}$ as well as $f(frac{x-b}{a})$, and is therefore borel-measurable. I have a feeling that this my however not be so simple because $f(x)$ being measurable does not imply that $f(frac{x-b}{a})$ is indeed borel-measurable. Any notes, clarification on this would be of great help.



ii) I get $Y$ ~ $mathcal{N}(b+amu,(asigma)^2)$










share|cite|improve this question











$endgroup$








  • 2




    $begingroup$
    Hint for ii): Apply i).
    $endgroup$
    – Did
    Dec 5 '18 at 22:46










  • $begingroup$
    @Did Is my reasoning for as to why g(x) is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x−b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x−b}{a})$??
    $endgroup$
    – SABOY
    Dec 6 '18 at 15:49


















2












$begingroup$


Let $X$ be a real random variable and $f$ the density belonging to $X$. Let $aneq0$, and $b in mathbb R$, while $Y:=aX+b$. Show:



i) The density of $Y$ wrt the lebesgue measure exists and is $g(x):=frac{1}{|a|}f(frac{x-b}{a}), xinmathbb R$



ii) Find the distribution of $Y$ if $X$ ~ $mathcal{N}(mu,sigma^{2})$



My steps:



i) I think I've got a good grasp of the it, but still got a few questions.
I will just do the case $a>0$ here: Let $c in mathbb R$



$P(Yleq c)=P(aX+bleq c)=P(Xleqfrac{c-b}{a})$ and we know the distribution of RV $X$, thus: $P(Xleqfrac{c-b}{a})=int_{-infty}^{frac{c-b}{a}}f(x)dlambda(x)=int_{-infty}^{frac{c-b}{a}}f(x)dx$



now I set $y=ax + b Rightarrow dy=adx$



Therefore $int_{-infty}^{frac{c-b}{a}}f(x)dx=int_{-infty}^{c}frac{1}{a}f(frac{x-b}{a})dx$



Using that case $a < 0$ too, we get $frac{1}{|a|}f(frac{x-b}{a}), xinmathbb R$



Now I have the proposed density function, I need to show that it is indeed a pdf. On measurability, it is clear since $int_{-infty}^{c}frac{1}{|a|}f(frac{x-b}{a})dx$ exists that $g(x):=frac{1}{|a|}f(frac{x-b}{a})$ is measurable on $(infty, c], forall c in mathbb R$. And since ${ (infty, c] |c in mathbb R}$ is a generator of the $mathcal{B}(mathbb R)$, therefore $g$ is borel measurable. (Is this correct reasoning?)



First Question: I would think that an alternative way of showing that $g$ is Borel-Measurable is simply stating that $g$ is the product of borel-measurable functions $frac{1}{|a|}$ as well as $f(frac{x-b}{a})$, and is therefore borel-measurable. I have a feeling that this my however not be so simple because $f(x)$ being measurable does not imply that $f(frac{x-b}{a})$ is indeed borel-measurable. Any notes, clarification on this would be of great help.



ii) I get $Y$ ~ $mathcal{N}(b+amu,(asigma)^2)$










share|cite|improve this question











$endgroup$








  • 2




    $begingroup$
    Hint for ii): Apply i).
    $endgroup$
    – Did
    Dec 5 '18 at 22:46










  • $begingroup$
    @Did Is my reasoning for as to why g(x) is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x−b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x−b}{a})$??
    $endgroup$
    – SABOY
    Dec 6 '18 at 15:49
















2












2








2





$begingroup$


Let $X$ be a real random variable and $f$ the density belonging to $X$. Let $aneq0$, and $b in mathbb R$, while $Y:=aX+b$. Show:



i) The density of $Y$ wrt the lebesgue measure exists and is $g(x):=frac{1}{|a|}f(frac{x-b}{a}), xinmathbb R$



ii) Find the distribution of $Y$ if $X$ ~ $mathcal{N}(mu,sigma^{2})$



My steps:



i) I think I've got a good grasp of the it, but still got a few questions.
I will just do the case $a>0$ here: Let $c in mathbb R$



$P(Yleq c)=P(aX+bleq c)=P(Xleqfrac{c-b}{a})$ and we know the distribution of RV $X$, thus: $P(Xleqfrac{c-b}{a})=int_{-infty}^{frac{c-b}{a}}f(x)dlambda(x)=int_{-infty}^{frac{c-b}{a}}f(x)dx$



now I set $y=ax + b Rightarrow dy=adx$



Therefore $int_{-infty}^{frac{c-b}{a}}f(x)dx=int_{-infty}^{c}frac{1}{a}f(frac{x-b}{a})dx$



Using that case $a < 0$ too, we get $frac{1}{|a|}f(frac{x-b}{a}), xinmathbb R$



Now I have the proposed density function, I need to show that it is indeed a pdf. On measurability, it is clear since $int_{-infty}^{c}frac{1}{|a|}f(frac{x-b}{a})dx$ exists that $g(x):=frac{1}{|a|}f(frac{x-b}{a})$ is measurable on $(infty, c], forall c in mathbb R$. And since ${ (infty, c] |c in mathbb R}$ is a generator of the $mathcal{B}(mathbb R)$, therefore $g$ is borel measurable. (Is this correct reasoning?)



First Question: I would think that an alternative way of showing that $g$ is Borel-Measurable is simply stating that $g$ is the product of borel-measurable functions $frac{1}{|a|}$ as well as $f(frac{x-b}{a})$, and is therefore borel-measurable. I have a feeling that this my however not be so simple because $f(x)$ being measurable does not imply that $f(frac{x-b}{a})$ is indeed borel-measurable. Any notes, clarification on this would be of great help.



ii) I get $Y$ ~ $mathcal{N}(b+amu,(asigma)^2)$










share|cite|improve this question











$endgroup$




Let $X$ be a real random variable and $f$ the density belonging to $X$. Let $aneq0$, and $b in mathbb R$, while $Y:=aX+b$. Show:



i) The density of $Y$ wrt the lebesgue measure exists and is $g(x):=frac{1}{|a|}f(frac{x-b}{a}), xinmathbb R$



ii) Find the distribution of $Y$ if $X$ ~ $mathcal{N}(mu,sigma^{2})$



My steps:



i) I think I've got a good grasp of the it, but still got a few questions.
I will just do the case $a>0$ here: Let $c in mathbb R$



$P(Yleq c)=P(aX+bleq c)=P(Xleqfrac{c-b}{a})$ and we know the distribution of RV $X$, thus: $P(Xleqfrac{c-b}{a})=int_{-infty}^{frac{c-b}{a}}f(x)dlambda(x)=int_{-infty}^{frac{c-b}{a}}f(x)dx$



now I set $y=ax + b Rightarrow dy=adx$



Therefore $int_{-infty}^{frac{c-b}{a}}f(x)dx=int_{-infty}^{c}frac{1}{a}f(frac{x-b}{a})dx$



Using that case $a < 0$ too, we get $frac{1}{|a|}f(frac{x-b}{a}), xinmathbb R$



Now I have the proposed density function, I need to show that it is indeed a pdf. On measurability, it is clear since $int_{-infty}^{c}frac{1}{|a|}f(frac{x-b}{a})dx$ exists that $g(x):=frac{1}{|a|}f(frac{x-b}{a})$ is measurable on $(infty, c], forall c in mathbb R$. And since ${ (infty, c] |c in mathbb R}$ is a generator of the $mathcal{B}(mathbb R)$, therefore $g$ is borel measurable. (Is this correct reasoning?)



First Question: I would think that an alternative way of showing that $g$ is Borel-Measurable is simply stating that $g$ is the product of borel-measurable functions $frac{1}{|a|}$ as well as $f(frac{x-b}{a})$, and is therefore borel-measurable. I have a feeling that this my however not be so simple because $f(x)$ being measurable does not imply that $f(frac{x-b}{a})$ is indeed borel-measurable. Any notes, clarification on this would be of great help.



ii) I get $Y$ ~ $mathcal{N}(b+amu,(asigma)^2)$







real-analysis probability probability-theory probability-distributions random-variables






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 9 '18 at 19:16







SABOY

















asked Dec 5 '18 at 22:43









SABOYSABOY

526311




526311








  • 2




    $begingroup$
    Hint for ii): Apply i).
    $endgroup$
    – Did
    Dec 5 '18 at 22:46










  • $begingroup$
    @Did Is my reasoning for as to why g(x) is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x−b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x−b}{a})$??
    $endgroup$
    – SABOY
    Dec 6 '18 at 15:49
















  • 2




    $begingroup$
    Hint for ii): Apply i).
    $endgroup$
    – Did
    Dec 5 '18 at 22:46










  • $begingroup$
    @Did Is my reasoning for as to why g(x) is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x−b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x−b}{a})$??
    $endgroup$
    – SABOY
    Dec 6 '18 at 15:49










2




2




$begingroup$
Hint for ii): Apply i).
$endgroup$
– Did
Dec 5 '18 at 22:46




$begingroup$
Hint for ii): Apply i).
$endgroup$
– Did
Dec 5 '18 at 22:46












$begingroup$
@Did Is my reasoning for as to why g(x) is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x−b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x−b}{a})$??
$endgroup$
– SABOY
Dec 6 '18 at 15:49






$begingroup$
@Did Is my reasoning for as to why g(x) is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x−b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x−b}{a})$??
$endgroup$
– SABOY
Dec 6 '18 at 15:49












2 Answers
2






active

oldest

votes


















1












$begingroup$

In the language of measure theoretic probability $int, dx$ is same as $int , dlambda(x)$ where $lambda$ is Lebesgue measure. So there is no Riemann integral involved here.



$int f(frac {x-b} a), dx$ is not $1$. You have to make substitution $y= frac {x-b} a$ to evaluate this integral. If you do this you will get $int g(x), dx=1$.



The variance of $Y$ is $a^{2}sigma^{2}$ not $asigma^{2}$.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Is my reasoning for as to why $g(x)$ is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x-b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x-b}{a})$??
    $endgroup$
    – SABOY
    Dec 6 '18 at 12:03





















0












$begingroup$

I am going to address just the measurability part: it is a fallacy to claim that since some integrals involving $g$ exist, then $g$ is measurable.
There would be no way to define the integral if $g$ was not measurable.



The sound reasoning, in this case, is to write before starting any kind of computation: let $g=frac{1}{|a|}f(frac{x-b}{a})$.
Then $g=h_1 circ f circ h_2$, where $h_1=|a|^{-1}Id$ and $f$ and $h_2= frac{Id-b}{a}$ are $(mathbb{R},mathcal{B}) rightarrow (mathbb{R},mathcal{B})$ measurable, therefore $g$ is measurable.



Then you can make the computations and change variables in your integrals and everything else.






share|cite|improve this answer









$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3027762%2fshow-that-the-density-of-random-variable-y-axb-exists-and-if-x-mathcaln%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    In the language of measure theoretic probability $int, dx$ is same as $int , dlambda(x)$ where $lambda$ is Lebesgue measure. So there is no Riemann integral involved here.



    $int f(frac {x-b} a), dx$ is not $1$. You have to make substitution $y= frac {x-b} a$ to evaluate this integral. If you do this you will get $int g(x), dx=1$.



    The variance of $Y$ is $a^{2}sigma^{2}$ not $asigma^{2}$.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      Is my reasoning for as to why $g(x)$ is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x-b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x-b}{a})$??
      $endgroup$
      – SABOY
      Dec 6 '18 at 12:03


















    1












    $begingroup$

    In the language of measure theoretic probability $int, dx$ is same as $int , dlambda(x)$ where $lambda$ is Lebesgue measure. So there is no Riemann integral involved here.



    $int f(frac {x-b} a), dx$ is not $1$. You have to make substitution $y= frac {x-b} a$ to evaluate this integral. If you do this you will get $int g(x), dx=1$.



    The variance of $Y$ is $a^{2}sigma^{2}$ not $asigma^{2}$.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      Is my reasoning for as to why $g(x)$ is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x-b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x-b}{a})$??
      $endgroup$
      – SABOY
      Dec 6 '18 at 12:03
















    1












    1








    1





    $begingroup$

    In the language of measure theoretic probability $int, dx$ is same as $int , dlambda(x)$ where $lambda$ is Lebesgue measure. So there is no Riemann integral involved here.



    $int f(frac {x-b} a), dx$ is not $1$. You have to make substitution $y= frac {x-b} a$ to evaluate this integral. If you do this you will get $int g(x), dx=1$.



    The variance of $Y$ is $a^{2}sigma^{2}$ not $asigma^{2}$.






    share|cite|improve this answer









    $endgroup$



    In the language of measure theoretic probability $int, dx$ is same as $int , dlambda(x)$ where $lambda$ is Lebesgue measure. So there is no Riemann integral involved here.



    $int f(frac {x-b} a), dx$ is not $1$. You have to make substitution $y= frac {x-b} a$ to evaluate this integral. If you do this you will get $int g(x), dx=1$.



    The variance of $Y$ is $a^{2}sigma^{2}$ not $asigma^{2}$.







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Dec 5 '18 at 23:58









    Kavi Rama MurthyKavi Rama Murthy

    52.6k32055




    52.6k32055












    • $begingroup$
      Is my reasoning for as to why $g(x)$ is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x-b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x-b}{a})$??
      $endgroup$
      – SABOY
      Dec 6 '18 at 12:03




















    • $begingroup$
      Is my reasoning for as to why $g(x)$ is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x-b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x-b}{a})$??
      $endgroup$
      – SABOY
      Dec 6 '18 at 12:03


















    $begingroup$
    Is my reasoning for as to why $g(x)$ is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x-b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x-b}{a})$??
    $endgroup$
    – SABOY
    Dec 6 '18 at 12:03






    $begingroup$
    Is my reasoning for as to why $g(x)$ is measurable sound? Surely, as an alternative, why can I not say $frac{1}{|a|}f(frac{x-b}{a})$ is measurable simply as the product of two measurable functions $frac{1}{|a|}$ and $f(frac{x-b}{a})$??
    $endgroup$
    – SABOY
    Dec 6 '18 at 12:03













    0












    $begingroup$

    I am going to address just the measurability part: it is a fallacy to claim that since some integrals involving $g$ exist, then $g$ is measurable.
    There would be no way to define the integral if $g$ was not measurable.



    The sound reasoning, in this case, is to write before starting any kind of computation: let $g=frac{1}{|a|}f(frac{x-b}{a})$.
    Then $g=h_1 circ f circ h_2$, where $h_1=|a|^{-1}Id$ and $f$ and $h_2= frac{Id-b}{a}$ are $(mathbb{R},mathcal{B}) rightarrow (mathbb{R},mathcal{B})$ measurable, therefore $g$ is measurable.



    Then you can make the computations and change variables in your integrals and everything else.






    share|cite|improve this answer









    $endgroup$


















      0












      $begingroup$

      I am going to address just the measurability part: it is a fallacy to claim that since some integrals involving $g$ exist, then $g$ is measurable.
      There would be no way to define the integral if $g$ was not measurable.



      The sound reasoning, in this case, is to write before starting any kind of computation: let $g=frac{1}{|a|}f(frac{x-b}{a})$.
      Then $g=h_1 circ f circ h_2$, where $h_1=|a|^{-1}Id$ and $f$ and $h_2= frac{Id-b}{a}$ are $(mathbb{R},mathcal{B}) rightarrow (mathbb{R},mathcal{B})$ measurable, therefore $g$ is measurable.



      Then you can make the computations and change variables in your integrals and everything else.






      share|cite|improve this answer









      $endgroup$
















        0












        0








        0





        $begingroup$

        I am going to address just the measurability part: it is a fallacy to claim that since some integrals involving $g$ exist, then $g$ is measurable.
        There would be no way to define the integral if $g$ was not measurable.



        The sound reasoning, in this case, is to write before starting any kind of computation: let $g=frac{1}{|a|}f(frac{x-b}{a})$.
        Then $g=h_1 circ f circ h_2$, where $h_1=|a|^{-1}Id$ and $f$ and $h_2= frac{Id-b}{a}$ are $(mathbb{R},mathcal{B}) rightarrow (mathbb{R},mathcal{B})$ measurable, therefore $g$ is measurable.



        Then you can make the computations and change variables in your integrals and everything else.






        share|cite|improve this answer









        $endgroup$



        I am going to address just the measurability part: it is a fallacy to claim that since some integrals involving $g$ exist, then $g$ is measurable.
        There would be no way to define the integral if $g$ was not measurable.



        The sound reasoning, in this case, is to write before starting any kind of computation: let $g=frac{1}{|a|}f(frac{x-b}{a})$.
        Then $g=h_1 circ f circ h_2$, where $h_1=|a|^{-1}Id$ and $f$ and $h_2= frac{Id-b}{a}$ are $(mathbb{R},mathcal{B}) rightarrow (mathbb{R},mathcal{B})$ measurable, therefore $g$ is measurable.



        Then you can make the computations and change variables in your integrals and everything else.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 14 '18 at 23:40









        MindlackMindlack

        2,70717




        2,70717






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3027762%2fshow-that-the-density-of-random-variable-y-axb-exists-and-if-x-mathcaln%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Berounka

            Fiat S.p.A.

            Type 'String' is not a subtype of type 'int' of 'index'