statistics

NORMDIST function is not giving the correct output

限于喜欢 提交于 2019-12-24 01:26:00
问题 I'm trying to use NORMDIST function in Excel to create a bell curve, but the output is strange. My mean is 0,0000583 and standard deviation is 0,0100323 so when I plug this to the function NORMDIST(0,0000583; 0,0000583; 0,0100323; FALSE) I expect to get something close to 0,5 as I'm using the same value as the mean probability of this value should be 50% , but the function gives an output of 39,77 which is clearly not correct. Why is it like this? 回答1: A probability cannot have values greater

Scaling up a curve line such that it can be shown along side another curve line in R plot

一个人想着一个人 提交于 2019-12-24 00:46:14
问题 I have an R plot in which I want to show that IF the " red " curve (which is now at the bottom of plot not showing correctly) be multiplied by a constant , it can match the " blue " curve currently showing. I'm wondering how best I can scale up the "red" curve so that it exactly matches the "blue" curve? (My R code is provided below the picture.) Here is my R code: SIGMA = 2 # Population SIGMA known observations = seq(1, 30) # observations drawn n = length(observations) # number of

Getting errors while using neuralnet function

僤鯓⒐⒋嵵緔 提交于 2019-12-24 00:02:17
问题 I tried neural net in R on Boston data set available. data("Boston",package="MASS") data <- Boston Retaining only those variable we want to use: keeps <- c("crim", "indus", "nox", "rm" , "age", "dis", "tax" ,"ptratio", "lstat" ,"medv" ) data <- data[keeps] In this case the formula is stored in an R object called f. The response variable medv is to be “regressed” against the remaining nine attributes. I have done it as below: f <- medv ~ crim + indus + nox + rm + age + dis + tax + ptratio +

iTunes Connect - total installs vs current devices that have the app installed

我只是一个虾纸丫 提交于 2019-12-23 21:02:19
问题 How can I know or calculate an iOS app's total installs vs current devices that have the app installed? I have the totals units and as I understand that is the total install count and not how many devices have my app right now. 回答1: You can get more details about app statistics by using 3rd party frameworks such as Flurry. You won't be able to detect if a user uninstalls the app, but you can see how many unique users are using the app in a specific interval. You can also see which OS version

Why bivariate_normal returns NaNs even if covariance is semi-positive definite?

左心房为你撑大大i 提交于 2019-12-23 21:01:48
问题 I have the following normal distributed points: import numpy as np from matplotlib import pylab as plt from matplotlib import mlab mean_test = np.array([0,0]) cov_test = array([[ 0.6744121 , -0.16938146], [-0.16938146, 0.21243464]]) The covariance matrix is definite semi-positive so it can be used as a covariance # Semi-positive definite if all eigenvalues are 0 or # if there exists a Cholesky decomposition print np.linalg.eigvals(cov_test) print np.linalg.cholesky(cov_test) [ 0.72985988 0

Sample the average of values received in last X seconds

若如初见. 提交于 2019-12-23 20:12:07
问题 I have a class that dispatches a Success and a Failure event and I need to maintain a statistic on the average number of failure/total number of events in the last X seconds from that class. I was thinking something along the lines of using a circular linked list and append a success or failure node for each event. Then count the numbers of failure nodes vs. total nodes in the list, but this has two major drawbacks: I need to constantly scale the list size up/down to account for the "last X

Estimate pdf of a vector using Gaussian Kernel

懵懂的女人 提交于 2019-12-23 18:59:26
问题 I am using Gaussian kernel to estimate a pdf of a data based on the equation where K(.) is Gaussian kernel, data is a given vector. z is bin from 1 to 256. size of bin is 1. I implemented by matlab code. However, the result show the amplitude of my pdf estimation (blue color) is not similar with real pdf of data. Could you see my code and give me some comment about my code? MATLAB CODE function pdf_est=KDE() close all; %%Random values of 20 pixels, range=[1 256] data=randi([1 256],1,20); %%

Finding the elbow point of a curve in a stable way?

落爺英雄遲暮 提交于 2019-12-23 18:37:35
问题 I am aware of the existence of this, and this on this topic. However, I would like to finalize on an actual implementation in Python this time. My only problem is that the elbow point seems to be changing from different instantiations of my code. Observe the two plots shown in this post. While they appear to be visually similar, the value of the elbow point changed significantly. Both the curves were generated from an average of 20 different runs. Even then, there is a significant shift in

Random samples from each column of a data.frame

北城余情 提交于 2019-12-23 17:24:07
问题 I want to draw random sample from each row of a data.frame independently from other rows. Here is an example. This code selects the same column for each row but I require independent selection of columns for each row. library(plyr) set.seed(12345) df1 <- mdply(data.frame(mean=c(10, 15)), rnorm, n = 5, sd = 1) df1 mean V1 V2 V3 V4 V5 1 10 10.58553 10.70947 9.890697 9.546503 10.60589 2 15 13.18204 15.63010 14.723816 14.715840 14.08068 > df1[ , -1] V1 V2 V3 V4 V5 1 10.58553 10.70947 9.890697 9

Zipf Distribution: How do I measure Zipf Distribution

牧云@^-^@ 提交于 2019-12-23 17:21:53
问题 How do I measure or find the Zipf distribution ? For example, I have a corpus of english words. How do I find the Zipf distribution ? I need to find the Zipf ditribution and then plot a graph of it. But I am stuck in the first step which is to find the Zipf distribution. Edit: From the frequency count of each word, it is clear that it obeys the Zipf law. But my aim is to plot a zipf distribution graph. I have no idea about how to calculate the data for the distribution graph 回答1: I don't