Questions tagged [cumulative-frequency]
76 questions
1
vote
2 answers
Plotting cumulative distributions with y-axis scaled to normal distribution in R
This is the first time I have a R question that I couldn't find on Stack Overflow already - forgive me if the reason why I didn't find anything is a specific term for the type of thing I'm looking for that I'm not aware of (is there?).
I'd like to…
ursusminimus
- 108
- 1
- 9
1
vote
4 answers
How do I find the frequency of a given number into a range into an array?
The problem is:
You are given an array of size N. Also given q=number of queries; in queries you will be given l=lower range, u=upper range and num=the number of which you will have to count frequency into l~u.
I've implemented my code in C++ as…
user283207
- 11
- 4
1
vote
1 answer
expand frequency table in r
Hi everyone I am struggling with something that I think should be easy.
I have a dataset that looks as follows
Var1 Var2 Var3 Var4 Count
a b c d 10
z a c f 3
I just need a function that replicates the rows based on the…
blast00
- 539
- 1
- 8
- 18
1
vote
1 answer
Matplotlib: Avoid congestion in X axis
I'm using this code to plot a cumulative frequency plot:
lot = ocum.plot(x='index', y='cdf', yticks=np.arange(0.0, 1.05, 0.1))
plot.set_xlabel("Data usage")`
plot.set_ylabel("CDF")
fig = plot.get_figure()
fig.savefig("overall.png")
How it…
matnewguy
- 13
- 4
1
vote
1 answer
cumulative distribution in dictionary
Im trying to calculate a cumulative distribution into a dictionary. The distribution should take letters from a given text and find the probability over the times they appear in the text, and from this it should calculate the cumulative…
py.codan
- 89
- 1
- 10
0
votes
1 answer
Running Total in Django Template
I listed debit and credit for my account transactions. Now I want to running total in last column by debit subtracted by credit added with previous arrived amount as running total (as you know). Thanks for your support.
my view:
def…
0
votes
3 answers
Creating two columns of cumulative sum based on the categories of one column
I like to create two columns with cumulative frequency of "A" and "B" in the assignment columns.
df = data.frame(id = 1:10, assignment= c("B","A","B","B","B","A","B","B","A","B"))
id assignment
1 1 B
2 2 …
0
votes
1 answer
SAS Proc Freq with PySpark (Frequency, percent, cumulative frequency, and cumulative percent)
I'm looking for a way to reproduce the SAS Proc Freq code in PySpark. I found this code that does exactly what I need. However, it is given in Pandas.
I want to make sure it does use the best what Spark can offer, as the code will run with massive…
Bruno Ambrozio
- 340
- 2
- 12
0
votes
2 answers
R help needed for my cumulative percentage function
A recent change (be it in R or somewhere else) has made my previously working function stop working. The function is designed to generate two columns that tell me what the percentile score (see df2$CumPercent is for a given score on a survey (see…
aspark2020
- 185
- 8
0
votes
1 answer
density of ongoing events from density of starting time
I have a data frame containing a column of starting times of event A, and length of event A in hours, like so:
df = structure(list(StartTime = c(10.1401724605821, 8.34114734060131,
10.1930766354781, 9.49644518946297, 9.36002452136017,…
Omry Atia
- 2,195
- 7
- 23
0
votes
1 answer
How can I construct Histogram, Bar plot, frequency curve and Ogive curve in R for this problem?
Dr. Tillman is Dean of the School of Business Socastee University. He wishes prepare to a report showing the number of hours per week students spends studying. He selects a random sample of 30 students and determines the number of hours each student…
Tonmoy Sarkar
- 1
- 1
0
votes
1 answer
Reformatting cumulative data
I have data with the cumulative households against the cumulative wealth they posses. I've attached an image of a small amount of the data. Using the R diff() function allows me to get what % of households hold what % of wealth which is good.
I aim…
43zombiegit
- 75
- 1
- 7
0
votes
1 answer
Cumulative Counting in SQL
I am struggling to write a query that gets the cumulative distinct counts for values in a column.
table column: desired column:
a 1
b 1
c 1
c 2
c …
yxteh
- 30
- 4
0
votes
0 answers
Barplot of a table with frequency distribution
pizza burger drinks
dissatisfied 3 2 2
neutral 1 1 2
satisfied 1 2 1
The above is the table i have just formed with the dataset , now with the ggplot2 how should I go about for creating…
Devansh Gandhi
- 13
- 3
0
votes
1 answer
Plotting a cumulative histogram with exported data in Python
I am trying to plot a cumulative histogram similar to the one shown below. It shows the number of occurrences (y-axis) of the French pronoun “vous” in a text corpus (x-axis) represented from word 0 to 92,633. It’s been created using a corpus…
Clemclem
- 41
- 4