Expectation: a random variable (binomial) is in the power

How can I calculate the following expectation
$Eleft[int_{0}^{1} t^{n+Y-1}dt right]$ where $Ysim B(S,delta)$

All topic

VBA HTML Scraping Error “Object Variable or With Variable not set”

I was following a tutorial of this video https://www.youtube.com/watch?v=sGw6r5GVA5g&t=2803s made by the WiseOwlTutorials channel and got stuck at a listing procedure he explains at the 36:00 position of the video.

At that point, he starts to explain how to return the video url and name of a video list from a specific category through a iteration method called Sub ListVideosOnPage(VidCatName As String, VidCatURL As String) used in another module which loops through all video categories of their website main video page https://www.wiseowl.co.uk/videos (left corner menu list).

When this procedure starts, it goes inside each video category and get the name and url of each video from that category in order to list it on a page which, in that part of the Youtube video cited above, is a debug page. However, the actual WiseOwl Video page is diferente from that when the tutorial video was made.

So, I changed his method a little in order to put the correct elements on the debbugin page, as shown below:

Sub ListVideosOnPage(VidCatName As String, VidCatURL As String)

Dim HTMLDoc As New MSHTML.HTMLDocument

Dim VidTables As MSHTML.IHTMLElementCollection
Dim VidTable As MSHTML.IHTMLElement
Dim VidRows As MSHTML.IHTMLElementCollection
Dim VidRow As MSHTML.IHTMLElement
Dim VidLink As MSHTML.IHTMLElement    

    XMLReq.Open "GET", VidCatURL, False

    If XMLReq.Status <> 200 Then
        MsgBox "Problem" & vbNewLine & XMLReq.Status & " - " & XMLReq.statusText
        Exit Sub
    End If

    HTMLDoc.body.innerHTML = XMLReq.responseText
        'get the table element in each video category found by other module
        'VidTables tag added by me to get the new element on the WiseOwl website
        Set VidTables = HTMLDoc.getElementsByTagName("table")
        'loop starts to search for row and link tags on the current table
        For Each VidTable In VidTables
            Set VidRows = VidTable.getElementsByTagName("tr")
            For Each VidRow In VidRows
                Set VidLink = VidRow.getElementsByTagName("a")(0) 'just pick the first link
                Debug.Print VidRow.innerText, VidRow.getattribute("href") 'objetc variable not set error happpens here
            Next VidRow
        Next VidTable           
End Sub

I found a way to circumvent this Object Variable or With Variable not set error by changing the code inside vidrow loop, adding a manual index to the code to get only the first link in each row:

       For Each VidTable In VidTables
            Set VidRows = VidTable.getElementsByTagName("tr")
            For Each VidRow In VidRows
                Index = 0
                For Each VidLink In VidLinks
                   If Index = 0 Then
                            Debug.Print VidLink.innerText, VidLink.getAttribute("href")
                            Index = Index + 1
                   End If
                Next VidLink
            Next VidRow
        Next VidTable

But, in the turorial video referenced above, the instructor doesnt get this error when he codes indexes in the way shown below:

        VidLink = VidRow.getElementsByTagName("a")(0) 
        Debug.Print VidRow.innerText, VidRow.getattribute("href")

So my question is how do I get these object variable not set errors and in the tutorial video the instructor doesnt? Looks like the same code to me, with each element defined in the right way and a much more efficient way to code then using if’s. Could anyone more used to VBA please help with an answer this? Maybe I missing something.

All topic

How can I make texdoc(1) recognize it’s configuration file instead of the environment variable?

I am using TeX Live 2018 on Debian GNU/Linux.
The texdoc(1) command’s configuration files are:

$ texdoc --files
/opt/tug/texlive/2018/texmf-dist/scripts/texdoc/texdoclib.tlu 3.0
Configuration files are:
    active  ~/opt/tug/texlive/texdoc/texdoc.cnf
    active  /opt/tug/texlive/2018/texmf-dist/texdoc/texdoc.cnf
Recommended file(s) for personal settings:

The contents of the personal configuration file ~/opt/tug/texlive/texdoc/texdoc.cnf is:

$ cat ~/opt/tug/texlive/texdoc/texdoc.cnf 
viewer_pdf = (nohup ${PDFVIEWER:-xpdf} %s) 2> /dev/null &

I expected that the texdoc(1) command will open a PDF file like that:

(nohup mupdf /opt/tug/texlive/2018/texmf-dist/doc/support/texdoc/texdoc.pdf) 2> /dev/null &

However, when I set the environment variables $PDFVIEWER, texdoc(1) command uses it, and ignores the personal configuration file.

$ texdoc --debug=config texdoc
texdoc debug-version: /opt/tug/texlive/2018/texmf-dist/scripts/texdoc/texdoclib.tlu version 3.0
texdoc debug-config: Setting 'debug_list=config' from command line option "--debug".
texdoc debug-config: Setting 'viewer_pdf=mupdf' from environment variable "PDFVIEWER".
texdoc debug-config: Ignoring 'viewer_pdf=(nohup ${PDFVIEWER:-xpdf} %s) 2> /dev/null &' in file "~/opt/tug/texlive/texdoc/texdoc.cnf" on line 1.
texdoc info: View command: mupdf "/opt/tug/texlive/2018/texmf-dist/doc/support/texdoc/texdoc.pdf"

How can I make the texdoc(1) command recognize the value of viewer_pdf in it’s personal configuration file instead of the environment variable $PDFVIEWER?


All topic

Issues using a variable to get a image in batch

I was trying to make a batch file that would create a random number between 1 and 13 and get the file called “[random number].jpg”, but it isn’t working.

The code:

`SET /A rand=%RANDOM% * 13 / 32768 + 1
IF NOT EXIST "IMGS%rand%.jpg" (
    ECHO ERR: File " %rand%.jpg " not found

The output:
ERR: File " 6.jpg " not found

Any thoughts on why it’s doing this?

All topic

Absolute convergence of a random variable in a countable space

I am reading Jacod and Protter’s Probability Essentials and I am struggling to understand the following string of inequalities:

enter image description here

where $L^1$ is the space of real valued random variables on ($Omega$, $A$, $P$) for $sigma$-algebra $A$ and probability measure $P$. Note that in this chapter, $A$ is defined s.t. $A$=$2^Omega$ for a countable $Omega$.

Specifically, I do not understand why the expecation would be “bifurcated” in to the sum of the two subsets of the image of $omega$ such that $lvert X( omega) rvert <1$ and $lvert X( omega) rvert ge 1$.

All topic

Analysis of Multiple Count Dependent Variable and Multiple Binary Independent Variable

I am wondering if Point Biserial Correlation is applicable for multiple binary independent variables and a dependent count variable. I have read how it was derive for a two variable system of one dependent and one independent, and I have extended it to cover multivariable, and wondering if such is an applicable form, or are there any additional assumptions that I should make that will change everything.

Here is the output of my extension:

$frac{overline{X}_{Catergory_{1}=1}-overline{X}_{Caterogry_{1}=0}}{s_{N}} sqrt{frac{N_{Category_{1}=1}N_{Catergory_{1}=0}}{N^{2}}}+ frac{overline{X}_{Catergory_{2}=1}-overline{X}_{Caterogry_{2}=0}}{s_{N}} sqrt{frac{N_{Category_{2}=1}N_{Catergory_{2}=0}}{N^{2}}}+frac{overline{X}_{Catergory_{3}=1}-overline{X}_{Caterogry_{3}=0}}{s_{N}} sqrt{frac{N_{Category_{3}=1}N_{Catergory_{3}=0}}{N^{2}}}+……$

Now, what if I have multiple count dependent variable and multiple binary independent variables, will the assumptions of MANCOVA still apply? Are there any other statistical methods that can be used for the said condition?

All topic

C# – Run multiple methods with custom variable

I know my title is quite confusing
Here’s what I plan on doing –

I use cases to run different loops – (different class)Commands.runningmodule = “GoogleSearchLoop”

If there’s a problem, I restart the loop from the method it is running at –
runningmodule(“Page/Proxy issue detected! Restarting”)

I have multiple loops/methods using multiple commands/methods so I can’t just do [GoogleSearchLoop(“Page/Proxy issue detected! Restarting”)]

The problem I have is I don’t know how to call a specific loop because I don’t know what to assign [runningmodule] as.

All topic

PHP Variable “Templates”?

I’ve found similar questions to this but none as direct. Say I have an HTML file containing an undefined PHP variable like so:


And a PHP file that defines that variable and reads in the HTML file like:


If I echo the $page variable the output will still be:

Processed Template.html:

Rather than:

Expected Template.html:

I’ve tried using escape character quotes like:

Alternative Template.html:

To no avail. Am I looking over something obvious? Is this an example of the “variable variable” problem?

All topic

Absolute value of a random variable

I have never encountered this concept before. Is this equation valid for $y>0$?

$$mathbb{P}(|X|>y) = mathbb{P}(-|X|

What about this?

$$mathbb{P}(|X|>y) = mathbb{P}(X>y) + mathbb{P}(X<-y)$$

All topic

Solving for variable with Gamma and Exponential Function

I am trying to solve for the dl parameter knowing all the remaining variables and as t->Infinity or very large number

m = 1.000001; a = 0.566837276858827; q1 = 35931.22171;
(E^(dl+a dl^(-1+m) Gamma[1-m,dl]-a dl^(-1+m) Gamma[1-m,dl t]) q1)/a ==25000

Mathematica responds with unsolvable with methods available. All variables are positive ($>0$).

Is there anyway to simplify this equation? Only real values are of interest.

All topic