How should I calculate mean CI – from raw data or mean values?

I have experimenatal data from medical industry. In the experiment 4 observations were weighted, each one 2 times for more precise measurement.

As a final weight, a mean from each pair is reported. So I have 8 values, a pair (2) for each observation and 4 means.

We assume a normal distrubution with unknown mean and standard deviation.

I need to calculate 95% CI for mean weight. I use this formula: $ $ X¯±t∗S/\sqrt{n}, $ $ where where S is the sample standard deviation and where $ t$ cuts probability $ 0.025$ from the upper tail of Student’s t distribution with $ n−1$

degrees of freedom.

Should I do this from 8 values (7 df, n=8) or from calculated mean values from each pair(3 df, n=4)?

Maybe a should use another formula? Why?

How to calculate Public Key exponent if I have p, q, Dp, Dq, QInv?

I have a private key components p, q, Dp, Dq, and QInv. I need to calculate the public key modulus and exponent. Modulus was super simple p*q, but exponent I can’t figure out. Have searched all the articles and often found how to go opposite way – generating public private key once you pick the exponenet.

I have been trying ModInverse from p-1 and q-1, and solve x with GCD on all the componenets, but nothing gave me the right value (I know the value I should get is x010001). Seems to be a little bit more complex that this…

Im really in to the code and less in math, so if I could get the answer which use simple math operations as ‘Add’, ‘Sub’, ‘Multiply’, ‘Mod’, ‘ModInverse’, ‘GCD’ etc. would be great!

How to make code calculate angle given 3 points?

I am trying to write a program that takes in 2 coordinates (one the front of an object and the destination) and takes an angle. It uses the current angle to calculate a third point (back of object). However, no solution is able to help me. How do I solve that issue?

One of my failed attempts is on the code link below. It uses the distance between all three points.

This is the code.

This code can change depending on the coordinates and the angles inputted but for what it is currently set to, it should output 90 degrees which is the actual angle measure yet still outputs 101 which is not correct.

How to calculate a direct mapped chace capacity with tag and valid bits?

I’ve seen some very useful posts about this, but none took into consideration both the tag and valid bits. This is a question I took from a notebook in my computer engineering course.

Consider a machine with a direct mapped cache, with 1 Byte blocks and 7 bits for the tag. This machine has a RAM with 2 KB capacity. Calculate the cache’s total capcity, counting the tag bits and valid bits.

Breaking a cache into parts, I have the tag bits, set index and block offset.

I already know I have 7 tag bits, but then I’m really not sure how to calculate the rest, because in this type of question we are usually given the words per block. I think the offset is 3, because 2^3 (8 bit blocks).

I feel like the question itself doesn’t give enough, shouldn’t it be stated how the system address is (byte/word addressable)? Also, is the RAM capacity relevant to the question at hand?

How does one calculate a margin position’s liquidation price for Bitfinex and other exchanges?

I’m learning how margin works and wanted to understand how does liquidation price work in a margin position when using an exchange like Bitfinex? Their requirements is 30% equity.

Let’s say I deposited $ 1000 in USD and purchased $ 2000 worth of Bitcoin at the price of $ 1000 each BTC.

I understand that my equity is $ 1000 which is what I deposited.

What is my liquidation price and how does one calculate it?

And what other factors do I need to know when if I wanted to hold onto this margin position for many months?

how to calculate wall thickness of a mesh?

based on similar questions on mesh volume, volume of a mesh can be calculated by following equation:

volume = ((vec1 x vec2) . vec3) /6

where vec1, vec2, and vec3 are the vectors from origin to a mesh triangle, and x is cross product and . is dot product.

vectors illustration

and for the volume of the whole mesh, that should be calculated for all triangles.

Afterwards, the area of the triangle can be calculated by the following equation:

area = || (vec2 – vec1) x (vec3 – vec1)|| /2

where vec1, vec2, and vec3 is the same as previous equation.

calculating volume and area, the height can be obtained by following equation:

height = 3*volume/area

However, I am not sure how to perform final calculation to obtain the wall thickness when I have all the heights of triangles (which are the vectors from origin perpendicular to triangles).

Calculate remaining duration based on percentage

Ultimately, all I’m trying to do is calculate completed hours based on percentages from an original duration. I have the following in Google Sheets (manually entered for display):

The only columns I would like to manually enter values in, is the “Course Hours” and “Complete %“. The “Completed Hours” and “Remaining Hours” columns are then calculated based on those values.

I couldn’t find any built-in functions on Google Sheets to do this and nothing out there seems to address the simple duration – % = remaining time scenario, unfortunately. I’ve also used some custom functions passing in values from the columns, however the JavaScript ends up outputting values where the final duration values are off (the usual floating point calc issues with JavaScript).

I’m sure there is a simple answer I’m overlooking here.

How would you calculate this limit? $\lim\limits_{n \rightarrow\infty}\frac{\pi}{2n}\sum\limits_{k=1}^{n}\cos(\frac{\pi}{2n}k)$

I decided to calculate $ \int_{0}^{\pi/2}cos(x)dx$ using the sum definition of the integral. Obviously the answer is $ 1$ . I managed to calculate the resulting limit using the geometric series, taking the real part of the complex exponential function and several iterations of l’hopital’s rule. Are you able to simplify this absolute mess, i.e. find a better way of arriving at the desired answer?

$ $ \lim\limits_{n \rightarrow\infty}\frac{\pi}{2n}\sum\limits_{k=1}^{n}\cos(\frac{\pi}{2n}k)$ $

Every answer is highly appreciated =)

PS: If you want to see my solution, feel free to tell me! =)

How to calculate this limit :$ \lim_{x\to 0} x^{(\frac{1}{x-1})}$

The graph of this function shows that the limit should be approximately $ 2.7$ , but I don’t know how to approach it mathematically, the form after direct putting of $ x = 1$ is $ 1^{\infty}$ , which is an indeterminate form, so we can proceed with L’-H$ \hat{o}$ pital’s rule, but I don’t really know how to do that. Please help me with this limit.

Calculate with values in a lookup

we have built a list which lookups an amount in another table. This value is depending on other criteria in this list and we need to calculate a total. The output is hourly salary x hours worked. I know you need somehow a workflow but I cannot find a workable explanations of this formula. Anyone a clear explanation? Thx