Questions tagged [frequency-distribution]

A frequency distribution is an arrangement of the values that one or more variables take in a sample

A frequency distribution is an arrangement of the values that one or more variables take in a sample. Each entry in the table contains the frequency or count of the occurrences of values within a particular group or interval, and in this way, the table summarizes the distribution of values in the sample.

220 questions
-1
votes
1 answer

how to find frequency distribution in a data frame with respect to a particular column using pandas in python

I have a data-frame like this, df, A B C D Final a b c d Valid a c Valid a c d Valid a Valid I want to calculate how many % of each column present in the Final Column. My desired output is, output…
Pyd
  • 6,017
  • 18
  • 52
  • 109
-1
votes
1 answer

Distribution of string array first character in PHP

Give an array in PHP with 100,000 string elements, I am looking for a way to count the distribution of the first character in the string. So essentially the output I am looking for is something like: array( 0 => 3563, 1 => 3146, ... …
Justin
  • 42,716
  • 77
  • 201
  • 296
-1
votes
1 answer

R convert fractions to integer percentages adding up to 100

I have computed a vector of the frequency of different events, represented as fractions and sorted in descending order. I need to interface to a tool that requires positive integer percentages that must sum up to exactly 100. I would like to…
verbamour
  • 945
  • 9
  • 16
-1
votes
2 answers

Calculate probability for two discrete variables in R

So, I have something like: V1 V2 X B Y A X A Y B X B X B And I need: A B X 0.17 0.5 Y 0.17 0.17 *Note: They do not sum up to 1 because I round 1.666 to 1.7.*
Edgar Derby
  • 2,543
  • 4
  • 29
  • 48
-2
votes
1 answer

How to include zero counts in a javascript frequency counting function for histograms

Need some help please - am using the excellent response to this histogram bucketing question as per code below. My question is what is the most elegant way to get my buckets with zero counts represented in the function output? Current Output is: [ […
Swiss23
  • 39
  • 6
-3
votes
1 answer

How to find the most frequent places in list for certain list of elements?

For example there is a list of elements [8,6,3,7,1,8,8,9,2,0,5,4,7,9,2,8,2,5,5,6,3,0,1,7,9,2,9,6,7,0,5,2,7,4,5,6,2,1,9,0,3,1,3,9,4,9,2,7,5,9,0,5,2,1,8,6,4] I'm trying to find places (indexes) inside above list to find hits of second [1,4,3,8] Is…
user12993750
-3
votes
1 answer

How to generate numbers that follows normal distribution but w.r.t. time in Matlab

As time moves along x-axis, the output value (may be freq or prob) be shown accordingly i.e. as time moves the values should increase initially till mean and then decrease. I have prespecified mean mu=10 and standard deviation sigma=2.
-3
votes
2 answers

Random numbers that follow a linear drop distribution in Python

I'd like to generate random numbers that follow a dropping linear frequency distribution, take n=1-x for an example. The numpy library however seems to offer only more complex distributions.
Martin
  • 121
  • 2
-4
votes
2 answers

Frequency distribution in R

I have five columns with numbers. I want to plot the frequency distribution of five columns in one graph with different colors in R. Can some one help me out how i can do this with an example. I am very new to R.
user2252362
  • 11
  • 1
  • 1
  • 1
-11
votes
1 answer

frequency of letters at position in string

I want to count the frequency of 4 letters at every position across strings. The letters are A, T, G, C TGAGGTAGTAGTTTGTGCTGTTAT TAGTAGTTTGTGCTGTTA TGAGGTAGTAGTTTGTAC TGAGAACTGAATTCCATAGG desired output: Pos1 Pos2 Pos3 and so on. A 0 1 T…
user3741035
  • 2,455
  • 4
  • 15
  • 20
1 2 3
14
15