What is the average number of draws it takes before you can not draw any more cards from the Deck of Many Things?

When thinking about this question regarding an upper limit on the number of draws, I wondered what would be the expected number of draws you can actually pull off if you called for a large number of draws.

The limiting factors I see are the cards Donjon and The Void which say:

You draw no more cards

…and Talons which would destroy the deck:

Every magic item you wear or carry disintegrates.

The ideal answer would discuss any difference between a 13-card and 22-card deck.

What is my average burst damage with this character and how do I calculate it?

I’m trying to figure out what my average burst damage with this character would be but I’m at a loss for how to calculate all of it. Assume the target has an AC of 15 but with theoretically infinite health (so don’t worry about it dying, I’m only interested in the numbers).

My character is a level 7 Warlock 5 / Fighter 2, Hexblade Patron, Pact of the Blade with the Hex spell (we can assume that was cast before we attack). Invocations are Thirsting Blade, Improved Pact Weapon, and Eldritch Smite. Fighter has the two weapon fighting style. I also took the feat Dual Wielder. I have an 18 (+4) Charisma stat. My pact weapon is a rapier and the other weapon is a dagger. Both are receiving the bonus from my patron in this case.

So to help consolidate the information here’s this.

Warlock/Fighter 5/2

Hexblade Patron

Pact of the Blade

18 (+4) Charisma

Rapier pact weapon + dagger hex weapon

Two weapon fighting style

Dual Wielder feat

Target AC 15

Target is Hexed and affected by Hexblade’s Curse

If any more info is needed I’ll be glad to provide it.

Why does the average selling price differ in this math equation?

A product is sold in 3 sizes small medium and large, at a price of 920,1035 and 1035 giving a an average selling price of 996.76 (920+1035+1035/3=996.76)

Total units sold is 2337.41 at a total cost of 2 479 315.45 why does the average selling price equals (2 479 315.45/2337.41=1060.71) and not 996.76? These are actual numbers and should equal the average price?

Calculating average in SSRS Matrix Table alongside filtered columns to separate out current versus previous years

I have a dataset, returned from a SQL query, that has the following data:

  • TYPE_CODE
  • YEAR

The data set spans the years 2014 through 2019. The TYPE_CODE has 6 different values.

How do I setup an SSRS matrix to provide the following layout and data:

enter image description here

So far I have a matrix setup (see the pic below) that has a row group (TYPE_CODE1) for the TYPE_CODE data, and two column groups (YEAR_PREV and YEAR_CURRENT) that are filtered as follows: – The second column in the matrix is the YEAR_PREV group, and is filtered to not show 2019 data (YEAR <> 2019) – The 4th column in the matrix is the YEAR_CURRENT group, and is filtered to only show 2019 data (YEAR = 2019)

 -

This method correctly splits my data, with the green highlighted columns in the pic below representing what is correct:

enter image description here

What is not correct is the average column, as I cannot figure out how to setup that column to only average the columns to the left (the previous years – 2015-2018) and not include the column to the right (2019).

I have tried several different expressions to no avail, primarily trying to limit the count function to only the YEAR_PREV group, like so:

  =count(Fields!TYPE_CODE.Value, "PREV_YEAR")/4 

This throws an error telling me that something along the lines of “group cannot be used in aggregate function…”.

How do I calculate the average column correctly?

Is there a regular tree language in which the average height of a tree of size $n$ is neither $\Theta(n)$ nor $\Theta(\sqrt{n})$?

We define a regular tree language as in the book TATA: It is the set of trees accepted by a non-deterministic finite tree automaton (Chapter 1) or, equivalently, the set of trees generated by a regular tree grammar (Chapter 2). Both formalisms hold close resemblances to the well-known string analogues.

Is there a regular tree language in which the average height of a tree of size $ n$ is neither $ \Theta(n)$ nor $ \Theta(\sqrt{n})$ ?

Obviously there are tree languages such that the height of a tree is linear in its size; and in the book Analytic Combinatorics it is shown e.g. that binary trees of size $ n$ have average height $ 2\sqrt{ \pi n}$ . If I understand Proposition VII.16 (p.537) of the mentioned book correctly, then there is a wide subset of regular tree languages that have average height of $ \Theta(\sqrt{n})$ , namely those in which the tree language is also a simple variety of trees fulfilling some extra conditions.

So I was wondering whether there is a regular tree language showing a different average height or if there is a true dichotomy for regular tree languages.

Calculation of the average of the values of a column in a matrix

I am trying to have a list of values which corresponds to the mean of the values of each column of a matrix. Here I show a quick example (my current matrix has a dimension of 1000 * 1000)

If I have matrix like this: matrixExample = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 9, 9, 9}} I would have to obtain a list like this: mean values={5, 5.7, 6.3, 7}.

How can I do that?