## Specifying statistical models / Equations between Random Variables

I’m new to Mathematica and confused about how random variables work.

Say I have a standard normal random variable $$X\sim \mathcal N(0,1)$$ and set $$Y := 2X$$. Then $$\operatorname{Cov}(X,Y) = 2$$. Now if I generate $$N$$-iid. draws for $$X$$, the sample covariance of $$X_1,\dots, X_N$$ and $$Y_1,\dots, Y_N$$ with $$Y_n := 2X_n$$ should be close to $$2$$.

My question is: how can I compute statistics (e.g. sample covariance) in Mathematica? Naively, I tried

x:=RandomVariate[NormalDistribution[], 5000] y:=2*x Covariance[x,y] 

but the result is clearly incorrect (usually not close to $$2$$), because in actuality (I presume) under this model $$Y$$ is independent of $$X$$.

What is the most convenient way of achieving the correct result?

## Random date for all comments in the range of 2 days

Tell me, please, is it possible to somehow update the date of all comments? I need to update them every day, i.e. it is necessary for each comment to change the date to a random one in the range of the last 2 days. Unfortunately, I don’t even have a beginning, no code, or anything else. Please tell me.

## Do identical bonuses from random properties of different Artifacts stack?

Some Artifacts have Major/Minor Beneficial/Detrimental Properties, rolled from the appropriate table.

If I were to have two attuned Artifacts, both with, say, the Minor Beneficial Property of "While attuned to the artifact, you gain a +1 bonus to Armor Class.", would I have a +2 or +1 AC bonus?

From the DMG Errata on Combining Game Effects (p. 252):

Different game features can affect a target at the same time. But when two or more game features have the same name, only the effects of one of them—the most potent one—apply while the durations of the effects overlap. […] Game features include spells, class features, feats, racial traits, monster abilities, and magic items.

"Artifact property" isn’t listed, which is evidence for +2. But Artifacts are magic items, which may mean it should only be +1 instead. Which is correct?

## Which 3rd party D&D nested random encounter resource includes combat/social/treasure/mystery encounters for each type of environment?

I had once found a nested random encounter resource, as in there was a master table to determine the whether the party discovered interesting terrain, combat, mysteries, etc and one could then find associated tables for those encounter types for various environments: arctic, trade road, forest, grassland, underwater…

This book was very similar to Necromancer Games 2003 Mother of All Encounter Tables except as I had stated previously unlike MOAET the book I am looking for includes many different types of possible discoveries to come across whereas MOAET simply lists possible monsters one might find and fight in a particular biome.

I do not remember many of the encounters from this book but one that had stuck out in my mind is one from the arctic table where the party comes across a metallic device generating heat in the snow, as if to imply alien or future technology.

Does anyone know the name of this resource or where to find it?

## Random Hyperlinks Not Working in Nested Columns with Lists

I am new here and have beginner level experience with WordPress so please bear with me if I am leaving out any pertinent information.

Towards the lower portion of this https://www.logicmanager.com/ca-solutions-menu/ landing page, I have a series of containers with columns and nested columns. Within these nested columns I have included hyperlinked text to list items. Ideally, all of the hyperlinked list items would click out to their respective landing pages.

However, for some reason unbeknownst to me, most of the hyperlinks are not working properly and the text items are un-clickable.

Does anyone know why this might be and how I can fix it? Are there any additional details I can provide to help resolve this issue? Is this forum even meant for questions like this?? Many thanks in advance!

## How do you handle random encounters if the GM isn’t supposed to roll dice?

I’m trying to deal with random encounters in DW. If my players are in a town, and suddenly decide to go into a random building how do I decide if the NPCs in there like the PCs? In D&D I’d just roll for a reaction and take it from there. Here I feel like I need to decide if the NPCs want to get along with PCs, and frankly I’m not sure what the NPCs think.

Sometimes I just think a roll of the die is exactly I want for my NPCs.

## Why the random positions are not random?

using System.Collections; using System.Collections.Generic; using UnityEngine;  [ExecuteAlways]  public class GenerateCurvedLines : MonoBehaviour {     public GameObject linesPointsPrefab;     public GameObject linesParent;     [Range(3, 100)]     public int numberOfLines;     [Range(5, 50)]     public int gap;     public bool randomLinesPositions;     public bool generateLines;     public bool clearPositions;      private List<Vector3> randomPositions = new List<Vector3>();     private GameObject instance;      // Start is called before the first frame update     void Start()     {         if (randomLinesPositions)         {             for (int i = 0; i < numberOfLines; i++)             {                 randomPositions.Add(new Vector3(UnityEngine.Random.Range(5, 50), UnityEngine.Random.Range(5, 50), UnityEngine.Random.Range(5, 50)));             }         }          GenerateLines();     }      // Update is called once per frame     void Update()     {         if (clearPositions)         {             var lr = GetComponent<LineRenderer>();             lr.positionCount = 0;              clearPositions = false;         }          if (generateLines)         {             GenerateLines();              generateLines = false;         }     }      private void GenerateLines()     {         for (int i = 0; i < numberOfLines; i++)         {             randomPositions.Add(new Vector3(UnityEngine.Random.Range(5, 50), UnityEngine.Random.Range(5, 50), UnityEngine.Random.Range(5, 50)));              if (randomLinesPositions)             {                 instance = Instantiate(                       linesPointsPrefab,                       randomPositions[i],                       Quaternion.identity                    );             }             else             {                 instance = Instantiate(                       linesPointsPrefab,                       Vector3.right * gap * i,                       Quaternion.identity                    );             }              instance.transform.parent = linesParent.transform;         }     } } 

At this part I’m trying to Instantiate random positions of the prefabs but each time I check true the flag generateLines it’s Instantiating the prefabs at the same positions instead each time to Instantiate them in a new random positions. It’s like it’s Instantiate once random positions and then using this positions each time and not Instantiating new random positions.

randomPositions.Add(new Vector3(UnityEngine.Random.Range(5, 50), UnityEngine.Random.Range(5, 50), UnityEngine.Random.Range(5, 50)));                      if (randomLinesPositions)                 {                     instance = Instantiate(                           linesPointsPrefab,                           randomPositions[i],                           Quaternion.identity                        );                 } 

## Probability distribution with random paremeters

Is it possible to set something like this? A probability distribution with random parameters

p = BetaDistribution[1, 1] count = BinomialDistribution[10, p]  (* and to calculate stuff like: *) Expectation[count] Probability[count == 3 \[Conditioned] p > 1/2] $$$$ `

## Can a random passerby enter a Rope Trick or Psychoportive Shelter?

Both effects have similar natures, end results, and wording. However, nothing in the wording of either power or spell seems to indicate that someone can’t come in wherever, assuming that they can reach the interface, pass through the plane of the interface, and assuming there is room for one more.

Area of effects and other special effects cannot cross the interface, as described, and the interface is one way visually (even when invisible), but the entrance of another creature after the fact does not seem to be contradicted?

Thus, can a random passerby enter a Rope Trick or Psychoportive Shelter, accidentally, or on purpose?

## Why does the server generate a random challenge for SSH authentication?

Wouldn’t it be more efficient if the client initiated the connection by generating their own message, and encrypting it using their private key, then sending both messages to the server so it would decrypt and compare the messages?